Creates a new Triangle.
The first corner of the triangle. Default is a Vector3 at (0, 0, 0).
The second corner of the triangle. Default is a Vector3 at (0, 0, 0).
The final corner of the triangle. Default is a Vector3 at (0, 0, 0).
Read-only flag to check if a given object is of type Triangle.
Create a new triangle with the same a, b and c properties as this one.
A new Triangle instance equal to this triangle.
Returns the closest point on the triangle to point.
Algorithm thanks to Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc., under the accompanying license; see chapter 5.1.5 for detailed explanation. basically, we're distinguishing which of the voronoi regions of the triangle the point lies in with the minimum amount of redundant computation.
The closest point.
Determine if a point, when projected onto the plane of the triangle, lies within the triangle.
True if the triangle contains the point.
Vector3 to check.
Determing if the two triangles have identical a, b and c properties.
True if triangle has the same component values as this triangle.
The source triangle
Copmute the area of the triangle.
The area of the triangle.
Compute the uv coordinates for the given point on the triangle.
The UV coordinate
The point on the triangle.
The uv coordinate of the triangle's first vertex.
The uv coordinate of the triangle's second vertex.
The uv coordinate of the triangle's third vertex.
— (optional) The result will be copied into this Vector2
Determines whether or not this triangle intersects box.
True if the box intersects this triangle.
Box to check for intersection against.
Determine if the triangle is oriented towards the given direction or not.
True if the triangle is oriented towards the direction parameter.
The direction to test.
Sets the triangle's a, b and c properties to the passed vector3s. Please note that this method only copies the values from the given objects.
This instance.
Static
containsStatic
getStatic
getStatic
getUVStatic
is
A geometric triangle as defined by three Vector3s representing its three corners.