SceneVolumeclass
A generic way to represent volumes in a scene. If we all end up using this instead of defining our own version in everything, we can improve this and improve everything at the same time.
Constructors1
Showing 1 constructors
public SceneVolume()
Creates a box volume with editable defaults for every shape.
No results match this filter.
Methods7
Showing 7 methods
public BBox GetBounds()
Returns the axis-aligned bounding box that encloses the current volume.
public float GetEdgeDistance(Transform worldTransform, Vector3 worldPosition)
Calculates the shortest distance from the specified world position to the edge of this volume.
| Parameter | Type | Description |
|---|---|---|
| worldTransform | Transform | The world transform of the volume. |
| worldPosition | Vector3 | The position in world space to measure from. |
floatThe distance, in world units, from the position to the volume edge.public float GetVolume()
Get the actual amount of volume in this shape. This is useful if you want to make a system where you prioritize by volume size. Don't forget to multiply by scale!
float—No results match this filter.
Properties1
Showing 1 properties
public Vector3 Sandbox.Volumes.SceneVolume.Center { get; set; }
Center of the active primitive; the origin for infinite volumes.
No results match this filter.