Threepp.Ray¶
Ray class
Members¶
Constructors¶
Methods¶
- set
- clone
- copy
- at
- lookAt
- recast
- closestPointToPoint
- distanceToPoint
- distanceSqToPoint
- distanceSqToSegment
- intersectSphere
- intersectsSphere
- intersectBox
- intersectsBox
- intersectPlane
- intersectsPlane
- applyMatrix4
- equals
Ray¶
Constructor
Arguments
| Arguments | Default | Description |
|---|---|---|
origin |
|
Origin (Vector3). |
direction |
|
Direction (Vector3). |
Description
Constructor
set¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
origin |
|
|
direction |
|
Description
Sets the values
clone¶
Method
Description
Clones the ray
copy¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
ray |
|
Description
Copies another ray
at¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
t |
|
Description
Gets a point on the ray
lookAt¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
v |
|
Description
Sets the direction
recast¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
t |
|
Description
Moves the origin along the ray
closestPointToPoint¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
point |
|
Description
Gets the closest point
distanceToPoint¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
point |
|
Description
Distance to a point
distanceSqToPoint¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
point |
|
Description
Squared distance to a point
distanceSqToSegment¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
v0 |
|
|
v1 |
|
Description
Squared distance to a line segment
intersectSphere¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
sphere |
|
Description
Intersection point with a sphere
intersectsSphere¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
sphere |
|
Description
Whether the ray intersects a sphere
intersectBox¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Intersection point with a box
intersectsBox¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Whether the ray intersects a box
intersectPlane¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
plane |
|
Description
Intersection point with a plane
intersectsPlane¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
plane |
|
Description
Whether the ray intersects a plane
applyMatrix4¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
m |
|
Description
Applies a matrix
equals¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
ray |
|
Description
Equality test