class
Torus
Represents a torus at the world center.
Outer radius represents the distance from the center, and inner radius represents the radius of the tube. Inner radius must be less or equal than the outer radius.
Public
Constructors
Torus
Torus() = default
Torus
Torus(const Vector3 &normal, float outerRadius, float innerRadius)
Methods
Intersects
std::pair<bool, float> Intersects(const Ray &ray) const
Ray/torus intersection, returns boolean result and distance to nearest intersection point.
Fields
Normal
Vector3 Normal
OuterRadius
float OuterRadius
InnerRadius
float InnerRadius