DOTS Geometry
 
Loading...
Searching...
No Matches
NativeTriangle3D Struct Reference

Public Member Functions

float Area ()
 
float3 GetCenter ()
 
float3 GetNormal ()
 
float3 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)
 
 NativeTriangle3D (float3 a, float3 b, float3 c)
 

Static Public Member Functions

static void CalculateCircumcircle (NativeTriangle3D triangle, out float3 center, out float radiusSq, float mergeDistance=10e-5f, float epsilon=10e-5f)
 Calculates a circle with the property that all three points of the triangle lie on that circle.
 

Public Attributes

float3 a
 
float3 b
 
float3 c
 

Member Function Documentation

◆ CalculateCircumcircle()

static void CalculateCircumcircle ( NativeTriangle3D triangle,
out float3 center,
out float radiusSq,
float mergeDistance = 10e-5f,
float epsilon = 10e-5f )
static

Calculates a circle with the property that all three points of the triangle lie on that circle.

Parameters
triangle
center
radiusSq
mergeDistance
epsilon

◆ GetCenter()

float3 GetCenter ( )
Returns
The barycenter of the triangle

◆ GetPointFromBarycentricCoordinates()

float3 GetPointFromBarycentricCoordinates ( float u,
float v,
float w )

Transforms barycentric coordinates of this triangle to cartesian coordinates.

Parameters
u
v
w
Returns

◆ HasRightAngle()

bool HasRightAngle ( float threshold)

Returns true if the triangle contains a right angle (within a threshold)

Parameters
threshold
Returns