Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 2.52 KB

decentraland-ecs.plane.md

File metadata and controls

33 lines (26 loc) · 2.52 KB

Home > decentraland-ecs > Plane

Plane class

Represens a plane by the equation ax + by + cz + d = 0

Properties

Property Access Modifier Type Description
d number d component of the plane
normal Vector3 Normal of the plane (a,b,c)

Methods

Method Access Modifier Returns Description
constructor(a, b, c, d) Creates a Plane object according to the given floats a, b, c, d and the plane equation : ax + by + cz + d = 0
asArray() number[]
clone() Plane
copyFromPoints(point1, point2, point3) Plane Updates the current Plane from the plane defined by the three given points.
dotCoordinate(point) number Calcualtte the dot product between the point and the plane normal
FromArray(array) Plane Creates a plane from an array
FromPoints(point1, point2, point3) Plane Creates a plane from three points
FromPositionAndNormal(origin, normal) Plane Creates a plane from an origin point and a normal
getClassName() string
getHashCode() number
isFrontFacingTo(direction, epsilon) boolean Checks if the plane is facing a given direction
normalize() Plane Normalize the current Plane in place.
signedDistanceTo(point) number Calculates the distance to a point
SignedDistanceToPlaneFromPositionAndNormal(origin, normal, point) number Calculates the distance from a plane and a point
transform(transformation) Plane Applies a transformation the plane and returns the result