Struct HalfEdgeFinder

Struct Documentation

struct legion::physics::HalfEdgeFinder

Responsible for creating a half-edge data structure for a mesh.

Public Functions

inline void FindHalfEdge(mesh &mesh, const math::mat4 &transform, std::queue<meshHalfEdgePtr> &meshHalfEdges)

Given a mesh and its associated transform, populates the meshHalfEdges queue with the created meshHalfEdgePtrs.

inline meshHalfEdgePtr InstantiateEdge(int vertexIndex, const std::pair<int, int> uniqueIndexPair, const mesh &mesh, std::queue<meshHalfEdgePtr> &edgePtrs, VertexIndexToHalfEdgePtr &indexToEdgeMap)

Instantiate a new half edge and returns it if its unique.

inline meshHalfEdgePtr UniqueAdd(meshHalfEdgePtr newEdge, VertexIndexToHalfEdgePtr &indexToEdgeMap, edgeVertexIndexPair uniqueIndexPair)

Checks if a certain edge identified with ‘uniqueIndexPair’ is unique. If it is, it will be added to ‘edgePtrs’. If its not, the original will take its place.

Return

a unique meshHalfEdgePtr

Public Members

meshHalfEdgePtr currentPtr