Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkHETriangleMesh Class Reference

mitkHETriangleMesh - an abstract class for triangle meshes represented by Half Edges More...

#include <mitkHETriangleMesh.h>

Inherits mitkHEMesh.

Inherited by mitkHEICTriangleMesh, and mitkHEOoCTriangleMesh.

Inheritance diagram for mitkHETriangleMesh:

Inheritance graph
[legend]
Collaboration diagram for mitkHETriangleMesh:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkHETriangleMesh ()
bool CreateFrom (mitkTriangleMesh *mesh)
bool CreateFrom (size_type vertNum, Vertex3f const *verts, size_type faceNum, TriangleFace const *faces, float const *boundingBox=NULL)
virtual int GetDataObjectType ()
virtual void Initialize ()
FaceHandle AddFace (VertexHandle v0, VertexHandle v1, VertexHandle v2)
FaceHandle AddFace (VertexHandle vertices[3])
bool IsCollapseOk (HalfEdgeHandle he)
VertexHandle Collapse (HalfEdgeHandle he)
HalfEdgeHandle VertexSplit (VertexHandle v0, VertexHandle v1, VertexHandle vL, VertexHandle vR)
HalfEdgeHandle VertexSplit (Vertex &vert, VertexHandle v1, VertexHandle vL, VertexHandle vR)
bool IsFlipOk (EdgeHandle edge) const
void Flip (EdgeHandle edge)

Detailed Description

mitkHETriangleMesh - an abstract class for triangle meshes represented by Half Edges

mitkHETriangleMesh is an abstract class for triangle meshes represented by Half Edges. This implementation of half edge references to OpenMesh written by Computer Graphics Group, RWTH Aachen.

See also:
mitkHEMesh, mitkHEICTriangleMesh (for in-core storage) and mitkOoCTriangleMesh (for out-of-core storage)


Constructor & Destructor Documentation

mitkHETriangleMesh::mitkHETriangleMesh  ) 
 

Default constructor.


Member Function Documentation

FaceHandle mitkHETriangleMesh::AddFace VertexHandle  vertices[3]  )  [inline]
 

Add face.

Parameters:
vertices[0] the handle of the first vertex
vertices[1] the handle of the second vertex
vertices[2] the handle of the third vertex
Returns:
Return the handle of the face added.
Warning:
Each VertexHandle must be valid, i.e. represents a existent vertex in the mesh (has been ``Add*''ed before).

FaceHandle mitkHETriangleMesh::AddFace VertexHandle  v0,
VertexHandle  v1,
VertexHandle  v2
[inline]
 

Add face.

Parameters:
v0 the handle of the first vertex
v1 the handle of the second vertex
v2 the handle of the third vertex
Returns:
Return the handle of the face added.
Warning:
Each VertexHandle must be valid, i.e. represents a existent vertex in the mesh (has been ``Add*''ed before).

VertexHandle mitkHETriangleMesh::Collapse HalfEdgeHandle  he  ) 
 

Collapse the from-vertex of a half edge into its to-vertex.

Parameters:
he the handle of the half edge to be collapsed
Returns:
Return the handle of the vertex the half edge collapsed into.

bool mitkHETriangleMesh::CreateFrom size_type  vertNum,
Vertex3f const *  verts,
size_type  faceNum,
TriangleFace const *  faces,
float const *  boundingBox = NULL
 

Create mitkHETriangleMesh object from the arrays of vertices and faces.

Parameters:
vertNum number of vertices in the vertex array
verts the vertex array
faceNum number of faces in the face array
faces the face array
boundingBox the 6-float array for bounding box
Returns:
Return true if this operation succeed, otherwise return false.
Note:
Each Vertex3f struct contains 3 float values for coordinates and 3 float values for normal. Each TriangleFace struct contains 3 indices to vertex array. If boundingBox is NULL, this function will calculate the actual bounding box itself.

bool mitkHETriangleMesh::CreateFrom mitkTriangleMesh mesh  ) 
 

Create mitkHETriangleMesh object from a mitkTriangleMesh object which is not based on half edge structure.

Parameters:
mesh the pointer to a mitkTriangleMesh object this mitkHETriangleMesh object is created from
Returns:
Return true if this operation succeed, otherwise return false.

void mitkHETriangleMesh::Flip EdgeHandle  edge  ) 
 

Flip edge.

Parameters:
edge the handle of the edge to be flipped

virtual int mitkHETriangleMesh::GetDataObjectType  )  [inline, virtual]
 

Return what type of data object this is.

Returns:
Return the type of this data object.

virtual void mitkHETriangleMesh::Initialize  )  [virtual]
 

Make the output data ready for new data to be inserted.

Reimplemented from mitkHEMesh.

Reimplemented in mitkHEICTriangleMesh, and mitkHEOoCTriangleMesh.

bool mitkHETriangleMesh::IsCollapseOk HalfEdgeHandle  he  ) 
 

Check whether collapsing half edge he is ok or would lead to topological inconsistencies.

Parameters:
he the handle of the half edge to be tested
Returns:
Return true if collapsing is ok, otherwise return false.

bool mitkHETriangleMesh::IsFlipOk EdgeHandle  edge  )  const
 

Check whether flipping edge is topologically correct.

Parameters:
edge the handle of the edge to be flipped
Returns:
Return true if flipping is ok, otherwise return false.

virtual void mitkHETriangleMesh::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkHEMesh.

Reimplemented in mitkHEICTriangleMesh, and mitkHEOoCTriangleMesh.

HalfEdgeHandle mitkHETriangleMesh::VertexSplit Vertex &  vert,
VertexHandle  v1,
VertexHandle  vL,
VertexHandle  vR
[inline]
 

Split vertex v1 into edge v0v1. It is the inverse operation to Collapse().

Parameters:
v0 a new vertex
v1 the handle of the vertex to be splited
vL the handle of the vertex to the left hand of the splited vertex
vL the handle of the vertex to the right hand of the splited vertex
Returns:
Return the handle of the half edge from v0 to v1.

HalfEdgeHandle mitkHETriangleMesh::VertexSplit VertexHandle  v0,
VertexHandle  v1,
VertexHandle  vL,
VertexHandle  vR
 

Split vertex v1 into edge v0v1. It is the inverse operation to Collapse().

Parameters:
v0 the handle of a new vertex
v1 the handle of the vertex to be splited
vL the handle of the vertex to the left hand of the splited vertex
vL the handle of the vertex to the right hand of the splited vertex
Returns:
Return the handle of the half edge from v0 to v1.
Warning:
v0 must be valid, i.e. represents a existent vertex in the mesh (has been ``Add*''ed before).


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:03:03 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3