Ray

class cee.Ray()

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

Constructors

Accessors


Constructors

constructor

cee.Ray.constructor(origin, direction)

Creates a Ray object

Arguments
Return type

cee.Ray

Accessors

cee.Ray.direction

The direction vector of the ray in world coordinates.

cee.Ray.origin

The origin of the ray in world coordinates.

Methods

clone

cee.Ray.clone()

Returns a clone of the ray.

Return type

cee.Ray

pointDistanceSquared

cee.Ray.pointDistanceSquared(point)

Returns the squared distance from the point to the ray

Arguments
Return type

number

transform

cee.Ray.transform(matrix)

Transforms the ray with the given matrix.

Arguments
Return type

void

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