Ray

clay. Ray

# new Ray(originopt, directionopt)

Source:
Parameters:
Name Type Attributes Description
origin clay.Vector3 <optional>
direction clay.Vector3 <optional>

Members

# direction :clay.Vector3

Source:
Type:

# intersectSphere

Source:

Calculate intersection point between ray and sphere

# intersectTriangle

Source:

Calculate intersection point between ray and three triangle vertices

# origin :clay.Vector3

Source:
Type:

Methods

# applyTransform() → {clay.Matrix4}

Source:

Apply an affine transform matrix to the ray

Returns:

matrix

Type
clay.Matrix4

# clone() → {clay.Ray}

Source:

Clone a new ray

Returns:
Type
clay.Ray

# copy(ray)

Source:

Copy values from another ray

Parameters:
Name Type Description
ray clay.Ray

# intersectBoundingBox(bbox) → {clay.Vector3}

Source:

Calculate intersection point between ray and bounding box

Parameters:
Name Type Description
bbox clay.BoundingBox
clay.Vector3
Returns:
Type
clay.Vector3

# intersectPlane(plane, outopt) → {clay.Vector3}

Source:

Calculate intersection point between ray and a give plane

Parameters:
Name Type Attributes Description
plane clay.Plane
out clay.Vector3 <optional>
Returns:
Type
clay.Vector3

# mirrorAgainstPlane(plane)

Source:

Mirror the ray against plane

Parameters:
Name Type Description
plane clay.Plane