API ReferenceSandbox
Sphereclass
Represents a sphere.
object→Sphere
Constructors1
Showing 1 constructors
No results match this filter.
Methods5
Showing 5 methods
public bool Contains(Vector3 value)
Returns true if sphere contains point. False if the point falls outside the sphere.
| Parameter | Type | Description |
|---|---|---|
| value | Vector3 | — |
Returns:
bool—public float GetEdgeDistance(Vector3 localPos)
Calculates the shortest distance from the specified local position to the nearest edge of the object.
| Parameter | Type | Description |
|---|---|---|
| localPos | Vector3 | — |
Returns:
float—public float GetVolume()
Get the volume of this sphere
Obsolete: Use Sphere.Volume instead.
Returns:
float—No results match this filter.
Properties4
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
Returns:
float—No results match this filter.