Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Ray

A ray that emits from an origin in a certain direction. This is used by the Raycaster to assist with raycasting.e Raycasting is used for mouse picking (working out what objects in the 3D space the mouse is over) amongst other things. See the ngx3js docs page for details.

Hierarchy

  • Ray

Index

Constructors

constructor

Properties

direction

direction: I3JS.Vector3

The direction of the Ray. This must be normalized (with Vector3.normalize) for the methods to operate properly. Default is a Vector3 at (0, 0, -1).

default

new THREE.Vector3( 0, 0, - 1 )

origin

origin: I3JS.Vector3

The origin of the Ray. Default is a Vector3 at (0, 0, 0).

default

new THREE.Vector3()

Methods

applyMatrix4

at

clone

closestPointToPoint

copy

distanceSqToPoint

distanceSqToSegment

  • Get the squared distance between this Ray and a line segment.

    Parameters

    • v0: I3JS.Vector3

      The start of the line segment.

    • v1: I3JS.Vector3

      The end of the line segment.

    • Optional optionalPointOnRay: I3JS.Vector3

      if this is provided, it receives the point on this Ray that is closest to the segment.

    • Optional optionalPointOnSegment: I3JS.Vector3

      if this is provided, it receives the point on the line segment that is closest to this Ray.

    Returns number

distanceToPlane

distanceToPoint

equals

intersectBox

intersectPlane

intersectSphere

intersectTriangle

intersectsBox

intersectsPlane

intersectsSphere

lookAt

recast

set

Generated using TypeDoc