public readonly struct SpherePostProcessShapeAn ellipsoid in an entity's own space, as a shape.
Remarks
The second built-in shape, and it exists so that the first non-box case is not the water body — see IPostProcessShape. It is also the shape a designer actually wants for a light shaft, a fire's warmth or a pool of damp: a box fading over a radius has corners, and corners are visible in a grade.
⚠ The exterior distance is exact for a sphere and a bound for an ellipsoid. There is no closed form for the distance to an ellipsoid's surface, so non-uniform radii use (‖p ⁄ r‖ − 1) · min r, which never overstates the distance and therefore never fades a volume out earlier than its blend radius says. A volume authored with uniform radii — the common one — gets the exact answer.
Fields and properties (1)
public Vector3 RadiiThe ellipsoid's radii, in the entity's own space.
Methods (3)
public SpherePostProcessShape(in Matrix4x4 transform, Vector3 radii)Creates one.
public bool Contains(Vector3 world, out float distanceOutside)Whether a world-space point is inside, and how far outside it is when it is not.
public static float ExteriorDistance(Vector3 local, Vector3 radii)How far a point in the ellipsoid's own space is outside its surface.
Used by (2)
- PostProcessVolumeVixen.Rendering
- PostProcessVolumeSystemVixen.Rendering