Public Member Functions | |
float | Area () |
float3 | CalculateBarycentricCoordinates (float2 point) |
float | Determinant () |
Rect | GetBounds () |
Calculates the bounding rectangle of this triangle. | |
float2 | GetCenter () |
int | GetNearestEdge (float2 point) |
Returns the index of the closest edge to the given point i.e. AB = 0, BC = 1, CA = 2. | |
float2 | GetPointFromBarycentricCoordinates (float u, float v, float w) |
Transforms barycentric coordinates of this triangle to cartesian coordinates. | |
bool | HasRightAngle (float threshold) |
Returns true if the triangle contains a right angle (within a threshold) | |
bool | IsPointInside (float2 point) |
NativeTriangle2D (float2 a, float2 b, float2 c) | |
Static Public Member Functions | |
static void | CalculateCircumcircle (NativeTriangle2D triangle, out float2 center, out float radiusSq) |
Calculates the circle that circumscribes all three points of the triangle. | |
static bool | IsInsideTriangleCircumcircle (NativeTriangle2D triangle, float2 point) |
Returns true, if the point is inside the circumcircle of the triangle. Only works if the triangle is sorted counter clockwise. | |
Public Attributes | |
float2 | a |
float2 | b |
float2 | c |
float3 CalculateBarycentricCoordinates | ( | float2 | point | ) |
point |
|
static |
Calculates the circle that circumscribes all three points of the triangle.
triangle | |
center | |
radiusSq |
Rect GetBounds | ( | ) |
Calculates the bounding rectangle of this triangle.
float2 GetCenter | ( | ) |
int GetNearestEdge | ( | float2 | point | ) |
Returns the index of the closest edge to the given point i.e. AB = 0, BC = 1, CA = 2.
point |
float2 GetPointFromBarycentricCoordinates | ( | float | u, |
float | v, | ||
float | w ) |
Transforms barycentric coordinates of this triangle to cartesian coordinates.
u | |
v | |
w |
bool HasRightAngle | ( | float | threshold | ) |
Returns true if the triangle contains a right angle (within a threshold)
threshold |
|
static |
Returns true, if the point is inside the circumcircle of the triangle. Only works if the triangle is sorted counter clockwise.
triangle | |
point |
bool IsPointInside | ( | float2 | point | ) |
point |