s&box docs

public sealed struct Sandbox.Sphere

Represents a sphere.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 5 methods

public bool Contains(Vector3 value)

Returns true if sphere contains point. False if the point falls outside the sphere.

public float GetEdgeDistance(Vector3 localPos)

Calculates the shortest distance from the specified local position to the nearest edge of the object.

public float GetVolume()Obsolete

Get the volume of this sphere

Obsolete: Use Sphere.Volume instead.

Properties

Showing 4 properties

public Vector3 Sandbox.Sphere.RandomPointInside { get; set; }

Returns a random point within this sphere.

public Vector3 Sandbox.Sphere.RandomPointOnEdge { get; set; }

Returns a random point on the edge of this sphere.

public static Sandbox.Sphere Sandbox.Sphere.Unit { get; set; }

A sphere centered at the origin, with radius 1.

public float Sandbox.Sphere.Volume { get; set; }

Volume of this sphere

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.System
Doc IDT:Sandbox.Sphere

On this page