TorusPrimitive

A quadric primitive representing a donut shaped torus.

Constructor

new L3D.TorusPrimitive()

Extends

Properties

Overrides:

Quadrics only have a single point, the center of the quadric.

Methods

rayIntersect(geom, ray, rayHit) → bool

Test for a ray intersection with this geometry.

Parameters
geom Geometry

The geometry that owns the primitive

ray Ray

The ray to test against

rayHit RayHitInfo

Storage for the results of the intersection

Returns
bool

Whether or not there was an intersection found.

scale(s)

Overrides:

Apply a scale to the quadric transform.

Parameters
s Vector3

transformBy(geom, matrix)

Overrides:

If the primitive requires any additional transformation beyond just transforming the points, the transformation can be applied here.

Parameters
geom Geometry
matrix Matrix4