Class Ray

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(origin?: Vector3, direction?: Vector3): Ray

Parameters

Returns

Ray

Properties

public direction: Vector3

public origin: Vector3

Methods

public applyMatrix4(matrix4: Matrix4): Ray

Parameters

Returns

Ray

public at(t: number, optionalTarget?: Vector3): Vector3

Parameters

  • t: number
  • optionalTarget?: Vector3 optional

Returns

Vector3

public clone(): Ray

Returns

Ray

public closestPointToPoint(point: Vector3, optionalTarget?: Vector3): Vector3

Parameters

Returns

Vector3

public copy(ray: Ray): Ray

Parameters

Returns

Ray

public distanceSqToSegment(v0: Vector3, v1: Vector3, optionalPointOnRay?: Vector3, optionalPointOnSegment?: Vector3): number

Parameters

Returns

number

public distanceToPlane(plane: Plane): number

Parameters

Returns

number

public distanceToPoint(point: Vector3): number

Parameters

Returns

number

public equals(ray: Ray): boolean

Parameters

Returns

boolean

public intersectBox(box: Box3, optionalTarget?: Vector3): Vector3

Parameters

Returns

Vector3

public intersectPlane(plane: Plane, optionalTarget?: Vector3): Vector3

Parameters

Returns

Vector3

public intersectTriangle(a: Vector3, b: Vector3, c: Vector3, backfaceCulling: boolean, optionalTarget?: Vector3): Vector3

Parameters

Returns

Vector3

public isIntersectionBox(box: Box3): boolean

Parameters

Returns

boolean

public isIntersectionPlane(plane: Plane): boolean

Parameters

Returns

boolean

public isIntersectionSphere(sphere: Sphere): boolean

Parameters

Returns

boolean

public recast(t: number): Ray

Parameters

  • t: number

Returns

Ray

public set(origin: Vector3, direction: Vector3): Ray

Parameters

Returns

Ray