KrisLibrary  1.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
Meshing::TriMeshWithTopology Struct Reference

A triangle mesh that contains connectivity relations between vertices and triangles. More...

#include <TriMeshTopology.h>

Inheritance diagram for Meshing::TriMeshWithTopology:
Meshing::TriMesh Geometry::CollisionMesh

Public Types

typedef IntTriple TriNeighbors
 index 0,1,2=neighbor along edge 0,1,2 (or -1 if none)
 
- Public Types inherited from Meshing::TriMesh
typedef IntTriple Tri
 

Public Member Functions

void ClearTopology ()
 
void CalcVertexNeighbors ()
 
void CalcIncidentTris ()
 
void CalcTriNeighbors ()
 
bool IsConsistent ()
 
Editing
void SplitEdge (int tri, int e, const Vector3 &newPt)
 
Tri/vertex traversal
void TriBFS (TriMeshTraversalCallback &callback)
 
void VertexBFS (TriMeshTraversalCallback &callback)
 
void BeginTriWalk ()
 
void BeginVertexWalk ()
 
void _TriBFS (int start, TriMeshTraversalCallback &callback)
 
void _VertexBFS (int start, TriMeshTraversalCallback &callback)
 
- Public Member Functions inherited from Meshing::TriMesh
bool Load (const char *fn)
 
bool Save (const char *fn) const
 
Vector3TriangleVertex (int tri, int v)
 Returns the v'th vertex of triangle tri.
 
const Vector3TriangleVertex (int tri, int v) const
 
Vector3 TriangleNormal (int tri) const
 Calculates the normal of triangle tri.
 
void GetTriangle (int tri, Triangle3D &t) const
 Returns a Triangle3D structure for triangle tri.
 
void GetIncidentTris (int v, vector< int > &tris) const
 Calculates a list of triangle indices incident to vertex v. O(T) time.
 
void AppendIncidentTris (int v, vector< int > &t) const
 Same as above, but appends the triangles to the end of t.
 
void GetEdge (int tri, int e, int &v1, int &v2) const
 Returns the vertex indices (v1,v2) of the e'th edge of triangle tri.
 
int GetAdjacentTri (int tri, int e) const
 
bool IsValid () const
 
void GetAABB (Vector3 &bmin, Vector3 &bmax) const
 
int ClosestPoint (const Vector3 &pt, Vector3 &cp) const
 
int RayCast (const Ray3D &r, Vector3 &pt) const
 
bool Intersects (const Plane3D &) const
 
bool PlaneSplits (const Plane3D &, Real &dmin, Real &dmax) const
 
void Transform (const Matrix4 &mat)
 
void FlipFaces ()
 
void Merge (const vector< TriMesh > &meshes)
 
void MergeWith (const TriMesh &mesh)
 
void RemoveUnusedVerts ()
 

Public Attributes

vector< vector< int > > vertexNeighbors
 neighboring vertices of vertices
 
vector< vector< int > > incidentTris
 triangles incident on vertices
 
vector< TriNeighborstriNeighbors
 neighboring triangles of triangles
 
vector< int > visited
 temporary
 
- Public Attributes inherited from Meshing::TriMesh
vector< Vector3verts
 
vector< Tritris
 

Detailed Description

A triangle mesh that contains connectivity relations between vertices and triangles.


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