struct
Sphere
public sealed struct Sphere Represents a sphere.
Constructors
Sphere(Vector3 center, Single radius) Properties
Methods
Boolean Trace(Ray ray, Single maxDistance, Single distance) Performs an intersection test between this sphere and given ray.
Boolean Trace(Ray ray, Single maxDistance) Performs an intersection test between this sphere and given ray.
Boolean Contains(Vector3 value) Returns true if sphere contains point. False if the point falls outside the sphere.
Single GetVolume() Get the volume of this sphere
Single GetEdgeDistance(Vector3 localPos) Calculates the shortest distance from the specified local position to the nearest edge of the object.
Fields
| Name | Type | Description |
|---|---|---|
Center | Vector3 | Center of the sphere. |
Radius | Single | Radius of the sphere. |