Skip to content

@orillusion/core


Class: Plane ​

Defined in: src/math/Plane.ts:8

Plane mathematics class

Constructors ​

Constructor ​

new Plane(pos, normal): Plane

Defined in: src/math/Plane.ts:29

Constructs a new plane object

Parameters ​

pos ​

Vector3

Plane position

normal ​

Vector3

Plane normal quantity

Returns ​

Plane

Properties ​

point ​

point: Vector3

Defined in: src/math/Plane.ts:12

Center position of plane


normal ​

normal: Vector3 = Vector3.UP

Defined in: src/math/Plane.ts:17

Plane normal vector

Methods ​

clone() ​

clone(): Plane

Defined in: src/math/Plane.ts:38

Clones the current plane object

Returns ​

Plane

New plane object


intersectsLine() ​

intersectsLine(start, end, point): boolean

Defined in: src/math/Plane.ts:50

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

Parameters ​

start ​

Vector3

Starting point of line segment

end ​

Vector3

End point of line segment

point ​

Vector3

Point of output intersection

Returns ​

boolean

Returns whether it intersects


intersectsRay() ​

intersectsRay(ray, targetPoint?): boolean

Defined in: src/math/Plane.ts:70

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

Parameters ​

ray ​

Ray

Ray of input

targetPoint? ​

Vector3

Returns ​

boolean

Returns whether it intersects

Released under the MIT License