Ray

class cee.Ray()

A 3d ray used, for example, for picking on the 3D model.

Constructors

Accessors

  • direction

  • origin


Constructors

Ray.constructor(origin, direction)
Arguments:

Creates a Ray object

Return type:

Ray

Accessors

cee.direction()

The direction vector of the ray in world coordinates.

Return type:

Vec3Like

cee.direction(direction)
Arguments:
Return type:

void

cee.origin()

The origin of the ray in world coordinates.

Return type:

Vec3Like

cee.origin(origin)
Arguments:
Return type:

void

Methods

clone

Ray.clone()

Returns a clone of the ray.

Return type:

Ray

pointDistanceSquared

Ray.pointDistanceSquared(point)
Arguments:

Returns the squared distance from the point to the ray

Return type:

number

transform

Ray.transform(matrix)
Arguments:
  • matrix (Mat4) – None

Transforms the ray with the given matrix.

The origin will be transformed as a point, and the direction as a vector.

Return type:

void