Skip to content

Class: Plane

Plane mathematics class

Constructors

Properties

Methods

Constructors

constructor

new Plane(pos, normal): Plane

Constructs a new plane object

Parameters

NameTypeDescription
posVector3Plane position
normalVector3Plane normal quantity

Returns

Plane

Defined in

src/math/Plane.ts:29

Properties

point

point: Vector3

Center position of plane

Defined in

src/math/Plane.ts:12


normal

normal: Vector3 = Vector3.UP

Plane normal vector

Defined in

src/math/Plane.ts:17

Methods

clone

clone(): Plane

Clones the current plane object

Returns

Plane

New plane object

Defined in

src/math/Plane.ts:38


intersectsLine

intersectsLine(start, end, point): boolean

Determine whether the plane intersects a line segment and calculate the intersection point

Parameters

NameTypeDescription
startVector3Starting point of line segment
endVector3End point of line segment
pointVector3Point of output intersection

Returns

boolean

Returns whether it intersects

Defined in

src/math/Plane.ts:50


intersectsRay

intersectsRay(ray, targetPoint?): boolean

Determine whether the plane intersects a ray and calculate the intersection point

Parameters

NameTypeDescription
rayRayRay of input
targetPoint?Vector3-

Returns

boolean

Returns whether it intersects

Defined in

src/math/Plane.ts:70