Triangle
A geometric triangle as defined by three vectors representing its three corners.
Triangles are mutable and not thread-safe; confine an instance (and any object graph holding it) to a single thread, exactly as in three.js. Most methods mutate this and return it for chaining.
The constructor stores the given Vector3 instances by reference, so Triangle(v, v, v) shares v across all three corners.
Constructors
Properties
Functions
Returns the closest point on the triangle to the given point.
Returns true if the given point, when projected onto the plane of the triangle, lies within the triangle.
Computes a barycentric coordinates from the given vector. Returns null if the triangle is degenerate.
Computes the midpoint of the triangle.
Returns true if this triangle intersects with the given box.
Returns true if the triangle is oriented towards the given direction.
Sets the triangle's vertices by copying the given attribute values.