Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VRageRender.Utils.MyWingedEdgeMesh Class Reference

Classes

struct  Edge
 Note: This is invalid after the mesh changes! More...
 
struct  EdgeEnumerator
 Note: This is invalid after the mesh changes! More...
 
struct  Face
 Note: This is invalid after the mesh changes! More...
 
struct  FaceEdgeEnumerator
 Note: This is invalid after the mesh changes! More...
 
struct  FaceVertexEnumerator
 Note: This is invalid after the mesh changes! More...
 
struct  VertexEdgeEnumerator
 Note: This is invalid after the mesh changes! More...
 

Public Member Functions

 MyWingedEdgeMesh ()
 
MyWingedEdgeMesh Copy ()
 For testing purposes only! The copy is only a shallow copy (i.e. userdata is not copied) More...
 
void Transform (Matrix transformation)
 
Edge GetEdge (int edgeIndex)
 
EdgeEnumerator GetEdges (HashSet< int > preallocatedHelperHashset=null)
 
Face GetFace (int faceIndex)
 
VertexEdgeEnumerator GetVertexEdges (int vertexIndex)
 
Vector3 GetVertexPosition (int vertexIndex)
 
int MakeEdgeFace (int vert1, int vert2, int edge1, int edge2, object faceUserData, out int newEdge)
 Creates a new face by closing the gap between vertices vert1 and vert2 by a new edge More...
 
void MergeEdges (int edge1, int edge2)
 Merges two edges together into one. These edges have to border on the edge of the mesh (i.e. face -1) Note that this also merges the corresponding vertices! More...
 
int ExtrudeTriangleFromEdge (ref Vector3 newVertex, int edge, object faceUserData, out int newEdgeS, out int newEdgeP)
 Creates a new triangle by adding a vertex to an existing edge More...
 
void MergeAngle (int leftEdge, int rightEdge, int commonVert)
 
int MakeFace (object userData, int incidentEdge)
 Makes a face by filling in the empty edge loop incident to incidentEdge More...
 
int MakeNewTriangle (object userData, ref Vector3 A, ref Vector3 B, ref Vector3 C, out int edgeAB, out int edgeBC, out int edgeCA)
 
int MakeNewPoly (object userData, List< Vector3 > points, List< int > outEdges)
 
void RemoveFace (int faceIndex)
 
bool IntersectEdge (ref MyWingedEdgeMesh.Edge edge, ref Plane p, out Vector3 intersection)
 
void SortFreeFaces ()
 Sorts the list of free faces. This ensures that subsequent face allocations will return increasing sequence of face indices, unless interrupted by face deallocation. This can be useful in some algorithms that rely on ordering of the face indices. More...
 
void DebugDraw (ref Matrix drawMatrix, MyWEMDebugDrawMode draw)
 
void CustomDebugDrawFaces (ref Matrix drawMatrix, MyWEMDebugDrawMode draw, Func< object, string > drawFunction)
 
void CheckFaceIndexValidQuick (int index)
 
void CheckEdgeIndexValidQuick (int index)
 
void CheckVertexIndexValidQuick (int index)
 
void PrepareFreeEdgeHashset ()
 
void PrepareFreeFaceHashset ()
 
void PrepareFreeVertexHashset ()
 
void CheckMeshConsistency ()
 
int ApproximateMemoryFootprint ()
 

Static Public Member Functions

static void DebugDrawEdgesReset ()
 
static void DebugDrawEdgesAdd (int edgeIndex)
 

Static Public Attributes

static bool BASIC_CONSISTENCY_CHECKS = false
 
static bool ADVANCED_CONSISTENCY_CHECKS = false
 
static int INVALID_INDEX = -1
 

Detailed Description

Definition at line 24 of file MyWingedEdgeMesh.cs.

Constructor & Destructor Documentation

VRageRender.Utils.MyWingedEdgeMesh.MyWingedEdgeMesh ( )
inline

Definition at line 797 of file MyWingedEdgeMesh.cs.

Member Function Documentation

int VRageRender.Utils.MyWingedEdgeMesh.ApproximateMemoryFootprint ( )
inline

Definition at line 2130 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.CheckEdgeIndexValidQuick ( int  index)
inline

Definition at line 1961 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.CheckFaceIndexValidQuick ( int  index)
inline

Definition at line 1953 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.CheckMeshConsistency ( )
inline

Definition at line 2016 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.CheckVertexIndexValidQuick ( int  index)
inline

Definition at line 1969 of file MyWingedEdgeMesh.cs.

MyWingedEdgeMesh VRageRender.Utils.MyWingedEdgeMesh.Copy ( )
inline

For testing purposes only! The copy is only a shallow copy (i.e. userdata is not copied)

Definition at line 810 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.CustomDebugDrawFaces ( ref Matrix  drawMatrix,
MyWEMDebugDrawMode  draw,
Func< object, string >  drawFunction 
)
inline

Definition at line 1835 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.DebugDraw ( ref Matrix  drawMatrix,
MyWEMDebugDrawMode  draw 
)
inline

Definition at line 1675 of file MyWingedEdgeMesh.cs.

static void VRageRender.Utils.MyWingedEdgeMesh.DebugDrawEdgesAdd ( int  edgeIndex)
inlinestatic

Definition at line 761 of file MyWingedEdgeMesh.cs.

static void VRageRender.Utils.MyWingedEdgeMesh.DebugDrawEdgesReset ( )
inlinestatic

Definition at line 745 of file MyWingedEdgeMesh.cs.

int VRageRender.Utils.MyWingedEdgeMesh.ExtrudeTriangleFromEdge ( ref Vector3  newVertex,
int  edge,
object  faceUserData,
out int  newEdgeS,
out int  newEdgeP 
)
inline

Creates a new triangle by adding a vertex to an existing edge

Parameters
newVertexPosition of the new vertex
edgeThe edge from which we want to extrude
faceUserDataUser data that will be saved in the face
newEdgeSIndex of the new edge that follows edge "edge" in the new triangle.
newEdgePIndex of the new edge that precedes edge "edge" in the new triangle.
Returns

Definition at line 1075 of file MyWingedEdgeMesh.cs.

Edge VRageRender.Utils.MyWingedEdgeMesh.GetEdge ( int  edgeIndex)
inline

Definition at line 842 of file MyWingedEdgeMesh.cs.

EdgeEnumerator VRageRender.Utils.MyWingedEdgeMesh.GetEdges ( HashSet< int >  preallocatedHelperHashset = null)
inline

Definition at line 847 of file MyWingedEdgeMesh.cs.

Face VRageRender.Utils.MyWingedEdgeMesh.GetFace ( int  faceIndex)
inline

Definition at line 852 of file MyWingedEdgeMesh.cs.

VertexEdgeEnumerator VRageRender.Utils.MyWingedEdgeMesh.GetVertexEdges ( int  vertexIndex)
inline

Definition at line 857 of file MyWingedEdgeMesh.cs.

Vector3 VRageRender.Utils.MyWingedEdgeMesh.GetVertexPosition ( int  vertexIndex)
inline

Definition at line 862 of file MyWingedEdgeMesh.cs.

bool VRageRender.Utils.MyWingedEdgeMesh.IntersectEdge ( ref MyWingedEdgeMesh.Edge  edge,
ref Plane  p,
out Vector3  intersection 
)
inline

Definition at line 1506 of file MyWingedEdgeMesh.cs.

int VRageRender.Utils.MyWingedEdgeMesh.MakeEdgeFace ( int  vert1,
int  vert2,
int  edge1,
int  edge2,
object  faceUserData,
out int  newEdge 
)
inline

Creates a new face by closing the gap between vertices vert1 and vert2 by a new edge

Parameters
vert1Point that will be shared by the new edge and edge1
vert2Point that will be shared by the new edge and edge2
edge1Predecessor of the new edge
edge2Successor of the new edge
faceUserDataUser data for the newly created face

Definition at line 875 of file MyWingedEdgeMesh.cs.

int VRageRender.Utils.MyWingedEdgeMesh.MakeFace ( object  userData,
int  incidentEdge 
)
inline

Makes a face by filling in the empty edge loop incident to incidentEdge

Parameters
userData
incidentEdge
Returns

Definition at line 1209 of file MyWingedEdgeMesh.cs.

int VRageRender.Utils.MyWingedEdgeMesh.MakeNewPoly ( object  userData,
List< Vector3 points,
List< int >  outEdges 
)
inline

Definition at line 1277 of file MyWingedEdgeMesh.cs.

int VRageRender.Utils.MyWingedEdgeMesh.MakeNewTriangle ( object  userData,
ref Vector3  A,
ref Vector3  B,
ref Vector3  C,
out int  edgeAB,
out int  edgeBC,
out int  edgeCA 
)
inline

Definition at line 1228 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.MergeAngle ( int  leftEdge,
int  rightEdge,
int  commonVert 
)
inline

Definition at line 1126 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.MergeEdges ( int  edge1,
int  edge2 
)
inline

Merges two edges together into one. These edges have to border on the edge of the mesh (i.e. face -1) Note that this also merges the corresponding vertices!

Parameters
edge1The edge that will be merged
edge2The edge that will be kept

Definition at line 948 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.PrepareFreeEdgeHashset ( )
inline

Definition at line 1977 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.PrepareFreeFaceHashset ( )
inline

Definition at line 1990 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.PrepareFreeVertexHashset ( )
inline

Definition at line 2003 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.RemoveFace ( int  faceIndex)
inline

Definition at line 1335 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.SortFreeFaces ( )
inline

Sorts the list of free faces. This ensures that subsequent face allocations will return increasing sequence of face indices, unless interrupted by face deallocation. This can be useful in some algorithms that rely on ordering of the face indices.

Definition at line 1527 of file MyWingedEdgeMesh.cs.

void VRageRender.Utils.MyWingedEdgeMesh.Transform ( Matrix  transformation)
inline

Definition at line 822 of file MyWingedEdgeMesh.cs.

Member Data Documentation

bool VRageRender.Utils.MyWingedEdgeMesh.ADVANCED_CONSISTENCY_CHECKS = false
static

Definition at line 27 of file MyWingedEdgeMesh.cs.

bool VRageRender.Utils.MyWingedEdgeMesh.BASIC_CONSISTENCY_CHECKS = false
static

Definition at line 26 of file MyWingedEdgeMesh.cs.

int VRageRender.Utils.MyWingedEdgeMesh.INVALID_INDEX = -1
static

Definition at line 28 of file MyWingedEdgeMesh.cs.


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