Class: Plane

pc.Plane

An infinite plane.

Constructor

(private) new Plane(pointopt, normalopt)

Create an infinite plane.
Parameters:
Name Type Attributes Description
point pc.Vec3 <optional>
Point position on the plane. The constructor takes a reference of this parameter.
normal pc.Vec3 <optional>
Normal of the plane. The constructor takes a reference of this parameter.
Source:

Methods

intersectsLine(start, end, pointopt) → {Boolean}

Test if the plane intersects between two points.
Parameters:
Name Type Attributes Description
start pc.Vec3 Start position of line.
end pc.Vec3 End position of line.
point pc.Vec3 <optional>
If there is an intersection, the intersection point will be copied into here.
Source:
Returns:
True if there is an intersection.
Type
Boolean

intersectsRay(ray, pointopt) → {Boolean}

Test if a ray intersects with the infinite plane
Parameters:
Name Type Attributes Description
ray pc.Ray Ray to test against (direction must be normalized)
point pc.Vec3 <optional>
If there is an intersection, the intersection point will be copied into here
Source:
Returns:
True if there is an intersection
Type
Boolean