Space Engineers
Public Member Functions | Properties | List of all members
Sandbox.Engine.Utils.MyTriangle Struct Reference

Defines a 3d triangleVertexes. Each edge goes from the origin. Cross(edge0, edge1) gives the triangleVertexes normal. More...

Public Member Functions

 MyTriangle (Vector3 pt0, Vector3 pt1, Vector3 pt2)
 Points specified so that pt1-pt0 is edge0 and p2-pt0 is edge1 More...
 
 MyTriangle (ref Vector3 pt0, ref Vector3 pt1, ref Vector3 pt2)
 Points specified so that pt1-pt0 is edge0 and p2-pt0 is edge1 More...
 
Vector3 GetPoint (int i)
 Same numbering as in the constructor More...
 
void GetPoint (int i, out Vector3 point)
 Same numbering as in the constructor More...
 
void GetPoint (ref Vector3 point, int i)
 
Vector3 GetPoint (float t0, float t1)
 Returns the point parameterised by t0 and t1 More...
 
void GetSpan (out float min, out float max, Vector3 axis)
 Gets the minimum and maximum extents of the triangleVertexes along the axis More...
 
void GetSpan (out float min, out float max, ref Vector3 axis)
 Gets the minimum and maximum extents of the triangle along the axis More...
 

Properties

Vector3 Centre [get]
 
Vector3 Origin [get, set]
 
Vector3 Edge0 [get, set]
 
Vector3 Edge1 [get, set]
 
Vector3 Edge2 [get]
 Edge2 goes from pt1 to pt2 More...
 
VRageMath.Plane Plane [get]
 Gets the plane containing the triangleVertexes More...
 
Vector3 Normal [get]
 Gets the triangleVertexes normal. If degenerate it will be normalised, but the direction may be wrong! More...
 

Detailed Description

Defines a 3d triangleVertexes. Each edge goes from the origin. Cross(edge0, edge1) gives the triangleVertexes normal.

Definition at line 14 of file MyTriangle.cs.

Constructor & Destructor Documentation

Sandbox.Engine.Utils.MyTriangle.MyTriangle ( Vector3  pt0,
Vector3  pt1,
Vector3  pt2 
)
inline

Points specified so that pt1-pt0 is edge0 and p2-pt0 is edge1

Parameters
pt0
pt1
pt2

Definition at line 26 of file MyTriangle.cs.

Sandbox.Engine.Utils.MyTriangle.MyTriangle ( ref Vector3  pt0,
ref Vector3  pt1,
ref Vector3  pt2 
)
inline

Points specified so that pt1-pt0 is edge0 and p2-pt0 is edge1

Parameters
pt0
pt1
pt2

Definition at line 39 of file MyTriangle.cs.

Member Function Documentation

Vector3 Sandbox.Engine.Utils.MyTriangle.GetPoint ( int  i)
inline

Same numbering as in the constructor

Parameters
value
Returns

Definition at line 51 of file MyTriangle.cs.

void Sandbox.Engine.Utils.MyTriangle.GetPoint ( int  i,
out Vector3  point 
)
inline

Same numbering as in the constructor

Parameters
value
Returns

Definition at line 68 of file MyTriangle.cs.

void Sandbox.Engine.Utils.MyTriangle.GetPoint ( ref Vector3  point,
int  i 
)
inline

Same numbering as in the constructor

Parameters
i
Returns

Definition at line 84 of file MyTriangle.cs.

Vector3 Sandbox.Engine.Utils.MyTriangle.GetPoint ( float  t0,
float  t1 
)
inline

Returns the point parameterised by t0 and t1

Parameters
t0
t1
Returns

Definition at line 112 of file MyTriangle.cs.

void Sandbox.Engine.Utils.MyTriangle.GetSpan ( out float  min,
out float  max,
Vector3  axis 
)
inline

Gets the minimum and maximum extents of the triangleVertexes along the axis

Parameters
min
max
axis

Definition at line 123 of file MyTriangle.cs.

void Sandbox.Engine.Utils.MyTriangle.GetSpan ( out float  min,
out float  max,
ref Vector3  axis 
)
inline

Gets the minimum and maximum extents of the triangle along the axis

Parameters
min
max
axis

Definition at line 140 of file MyTriangle.cs.

Property Documentation

Vector3 Sandbox.Engine.Utils.MyTriangle.Centre
get

Definition at line 156 of file MyTriangle.cs.

Vector3 Sandbox.Engine.Utils.MyTriangle.Edge0
getset

Definition at line 167 of file MyTriangle.cs.

Vector3 Sandbox.Engine.Utils.MyTriangle.Edge1
getset

Definition at line 173 of file MyTriangle.cs.

Vector3 Sandbox.Engine.Utils.MyTriangle.Edge2
get

Edge2 goes from pt1 to pt2

Definition at line 182 of file MyTriangle.cs.

Vector3 Sandbox.Engine.Utils.MyTriangle.Normal
get

Gets the triangleVertexes normal. If degenerate it will be normalised, but the direction may be wrong!

Definition at line 203 of file MyTriangle.cs.

Vector3 Sandbox.Engine.Utils.MyTriangle.Origin
getset

Definition at line 161 of file MyTriangle.cs.

VRageMath.Plane Sandbox.Engine.Utils.MyTriangle.Plane
get

Gets the plane containing the triangleVertexes

Definition at line 191 of file MyTriangle.cs.


The documentation for this struct was generated from the following file: