public sealed struct Sandbox.Sphere
Represents a sphere.
Related Guides
Broader workflow and conceptual references connected to this API.
If you're just opting for default Vertex and Pixel inputs which are usable on the default shading model, these are the reference member variables for each:
Networked GameObjects can be owned by a connection.
Scenes can be traced against using Scene.Trace - which uses a builder pattern to make construction a bit easier. At a minimum, traces have a shape, start, and end. You can also filter which specific tags will be hit or ignored, or opt-in to using your project's collision rule matrix by calling WithCollisionRules(tag).
S&box includes a full 3D and 2D physics system powered by the Source 2 engine, with great performance and stability. Rigidbodies, colliders, joints, raycasting, and trigger volumes are all usable through Components on GameObjects.
PostProcessVolume It is a component that applies a set of post-processing components when a camera is inside it.
Constructors
Showing 1 constructors
No results match this filter.
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.
No results match this filter.
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
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:Sandbox.Sphere |