struct Sphere

in global :: Sandbox

Represents a sphere.


public static Sphere Unit { get; }

A sphere centered at the origin, with radius 1.

public Vector3 Center

Center of the sphere.

public float Radius

Radius of the sphere.

public bool Trace( Ray ray, float maxDistance, ref float distance )

Performs an intersection test between this sphere and given ray.

public bool Trace( Ray ray, float maxDistance )

Performs an intersection test between this sphere and given ray.

public bool Contains( ref Vector3 value )

Returns true if sphere contains point. False if the point falls outside the sphere.

public float Volume { get; }

Volume of this sphere

public Vector3 RandomPointInside { get; }

Returns a random point within this sphere.

public Vector3 RandomPointOnEdge { get; }

Returns a random point on the edge of this sphere.

public string ToString( )

😔 No documentation found.

public float GetVolume( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public Sphere( Vector3 center, float radius )

😔 No documentation found.