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

mitkMesh Class Reference

mitkMesh - an abstract class for mesh types More...

#include <mitkMesh.h>

Inherits mitkDataObject.

Inherited by mitkHEMesh, and mitkTriangleMesh.

Inheritance diagram for mitkMesh:

Inheritance graph
[legend]
Collaboration diagram for mitkMesh:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
virtual void Initialize ()
virtual void ShallowCopy (mitkDataObject *src)
virtual void DeepCopy (mitkDataObject *src)
bool CopyMesh (mitkMesh *src)
virtual int GetDataObjectType () const
virtual void SetVertexNumber (size_type number)=0
virtual size_type GetVertexNumber () const =0
virtual void SetFaceNumber (size_type number)=0
virtual size_type GetFaceNumber () const =0
virtual float * GetVertexData ()=0
virtual index_type * GetFaceData ()=0
float const * GetBoundingBox ()
void GetBoundingBox (float &minX, float &maxX, float &minY, float &maxY, float &minZ, float &maxZ)
void GetBoundingBox (float bounds[6])
void SetBoundingBox (float minX, float maxX, float minY, float maxY, float minZ, float maxZ)
void SetBoundingBox (float bounds[6])
bool IsNormalReversed () const
bool IsClockwise () const
void SetClockwise (bool isClockwise=true)
virtual bool TestClockwise ()=0
virtual void ReverseNormals ()
index_type AddVertex (Vertex3f &vert)
template<typename IndexType, unsigned int indexNum>
index_type AddFace (_face_type< IndexType, indexNum > &face)
index_type AddFace (TriangleFace &face)
bool GetVertex (index_type vertIdx, Vertex3f &vert)
size_type GetVertices (index_type startIdx, size_type num, Vertex3f *verts)
template<typename IndexType, unsigned int indexNum>
bool GetFace (index_type faceIdx, _face_type< IndexType, indexNum > &face)
bool GetFace (index_type faceIdx, TriangleFace &face)
size_type GetTriangleFaces (index_type startIdx, size_type num, TriangleFace *faces)
size_type GetTriangleFaces (index_type startIdx, size_type num, Vertex3f *verts)
bool SetVertex (index_type vertIdx, Vertex3f const &vert)
template<typename IndexType, unsigned int indexNum>
bool SetFace (index_type faceIdx, _face_type< IndexType, indexNum > &face)
bool SetFace (index_type faceIdx, TriangleFace &face)

Detailed Description

mitkMesh - an abstract class for mesh types

mitkMesh is an abstract class for mesh types which are used to represent 3D objects with their surfaces.

See also:
mitkTriangleMesh

mitkHEMesh

mitkHETriangleMesh


Member Function Documentation

index_type mitkMesh::AddFace TriangleFace &  face  )  [inline]
 

An explicit instantiation of AddFace().

Reimplemented in mitkTriangleMesh.

template<typename IndexType, unsigned int indexNum>
index_type mitkMesh::AddFace _face_type< IndexType, indexNum > &  face  )  [inline]
 

A general interface for adding a face.

Parameters:
face the face to add
Returns:
Return the index of the face added.
Note:
The template struct _face_type is defined as follows in mitkGeometryTypes.h:
        template <typename IndexType, unsigned int indexNum>
        struct _face_type
        {
            enum { vertNum = indexNum };
            IndexType verts[indexNum];
        };
Warning:
Each index in the ``verts'' array of the face must be valid, i.e. represents a existent vertex in the mesh (has been added before).
See also:
mitkGeometryTypes.h

Reimplemented in mitkTriangleMesh.

index_type mitkMesh::AddVertex Vertex3f &  vert  )  [inline]
 

A general interface for adding a vertex.

Parameters:
vert the vertex to add
Returns:
Return the index of the vertex added.
Note:
The struct Vertex3f is equal to follows:
        struct Point3f
        {
            union
            {
                struct { float x, y, z; };
                float coord[3];
            };
        };
       
        struct Vertex3f
        {
            Point3f point;
            Point3f normal;
        };
See also:
mitkGeometryTypes.h

bool mitkMesh::CopyMesh mitkMesh src  ) 
 

Copy the contents from another mesh. It is used to transfer between different concrete mesh type, i.e. in-core mesh <=> out-of-core mesh.

Parameters:
src the mesh copy from
Returns:
Return true if success, otherwise return false.

virtual void mitkMesh::DeepCopy mitkDataObject src  )  [virtual]
 

Deep copy.

Parameters:
src pointer to the source mitkDataObject

Implements mitkDataObject.

Reimplemented in mitkHEICTriangleMesh, mitkHEMesh, mitkHEOoCTriangleMesh, mitkICTriangleMesh, mitkOoCTriangleMesh, and mitkTriangleMesh.

void mitkMesh::GetBoundingBox float  bounds[6]  )  [inline]
 

Get the bounds for this mesh data as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Parameters:
bounds[0] return minimum coordinate value in x-axis
bounds[1] return maximum coordinate value in x-axis
bounds[2] return minimum coordinate value in y-axis
bounds[3] return maximum coordinate value in y-axis
bounds[4] return minimum coordinate value in z-axis
bounds[5] return maximum coordinate value in z-axis

void mitkMesh::GetBoundingBox float &  minX,
float &  maxX,
float &  minY,
float &  maxY,
float &  minZ,
float &  maxZ
[inline]
 

Get the bounds for this mesh data as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Parameters:
minX return minimum coordinate value in x-axis
maxX return maximum coordinate value in x-axis
minY return minimum coordinate value in y-axis
maxY return maximum coordinate value in y-axis
minZ return minimum coordinate value in z-axis
maxZ return maximum coordinate value in z-axis

float const* mitkMesh::GetBoundingBox  )  [inline]
 

Get the bounds for this mesh data as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Returns:
Return a float array which contains Xmin, Xmax, Ymin, Ymax, Zmin and Zmax in turn.

virtual int mitkMesh::GetDataObjectType  )  const [inline, virtual]
 

Return what type of data object this is.

Returns:
Return the type of this data object.

Reimplemented from mitkDataObject.

Reimplemented in mitkHEICTriangleMesh, mitkHEMesh, mitkHEOoCTriangleMesh, mitkICTriangleMesh, mitkOoCTriangleMesh, and mitkTriangleMesh.

bool mitkMesh::GetFace index_type  faceIdx,
TriangleFace &  face
[inline]
 

An explicit instantiation of GetFace().

template<typename IndexType, unsigned int indexNum>
bool mitkMesh::GetFace index_type  faceIdx,
_face_type< IndexType, indexNum > &  face
[inline]
 

A general interface for getting a face.

Parameters:
faceIdx the index of the face to get
face contain the returned face
Returns:
Return true if success, otherwise return false.

virtual index_type* mitkMesh::GetFaceData  )  [pure virtual]
 

Get data pointer of this face data.

Returns:
Return a unsigned int pointer to the face data (indices to vertices).
Warning:
This function is obsolete. It is provided to keep old codes working. We strongly advise against using it in new codes.

Implemented in mitkHEICTriangleMesh, mitkHEOoCTriangleMesh, mitkICTriangleMesh, and mitkOoCTriangleMesh.

virtual size_type mitkMesh::GetFaceNumber  )  const [pure virtual]
 

Get the mesh's face number.

Returns:
Return the number of faces.

Implemented in mitkHEMesh, and mitkTriangleMesh.

size_type mitkMesh::GetTriangleFaces index_type  startIdx,
size_type  num,
Vertex3f *  verts
[inline]
 

A general interface for getting all the vertices of a set of triangle faces.

Parameters:
startIdx the index of the first face to get
num the number of faces to get
verts contain the vertices of the triangle faces to get (3 vertices for each face)
Returns:
Return the actual number of gotten faces.

size_type mitkMesh::GetTriangleFaces index_type  startIdx,
size_type  num,
TriangleFace *  faces
[inline]
 

A general interface for getting a set of triangle faces.

Parameters:
startIdx the index of the first face to get
num the number of faces to get
faces contain the returned faces (from startIdx to startIdx+num-1)
Returns:
Return the actual number of gotten faces.

bool mitkMesh::GetVertex index_type  vertIdx,
Vertex3f &  vert
[inline]
 

A general interface for getting a vertex.

Parameters:
vertIdx the index of the vertex to get
vert contain the returned vertex
Returns:
Return true if success, otherwise return false.

virtual float* mitkMesh::GetVertexData  )  [pure virtual]
 

Get data pointer of this vertex data.

Returns:
Return a float pointer to the vertex data.
Warning:
This function is obsolete. It is provided to keep old codes working. We strongly advise against using it in new codes.

Implemented in mitkHEICTriangleMesh, mitkHEOoCTriangleMesh, mitkICTriangleMesh, and mitkOoCTriangleMesh.

virtual size_type mitkMesh::GetVertexNumber  )  const [pure virtual]
 

Get the mesh's vertex number.

Returns:
Return the number of vertices.

Implemented in mitkHEMesh, and mitkTriangleMesh.

size_type mitkMesh::GetVertices index_type  startIdx,
size_type  num,
Vertex3f *  verts
[inline]
 

A general interface for getting a set of vertices.

Parameters:
startIdx the index of the first vertex to get
num the number of vertices to get
verts contain the returned vertices (from startIdx to startIdx+num-1)
Returns:
Return the actual number of gotten vertices.

virtual void mitkMesh::Initialize  )  [virtual]
 

Delete the allocated memory (if any) and initialize to default status.

Note:
Pure virtual function. Its concrete subclass must implement this function.

Implements mitkDataObject.

Reimplemented in mitkHEICTriangleMesh, mitkHEMesh, mitkHEOoCTriangleMesh, mitkHETriangleMesh, mitkICTriangleMesh, mitkOoCTriangleMesh, and mitkTriangleMesh.

bool mitkMesh::IsClockwise  )  const [inline]
 

Get the orientation of front-facing polygons.

Returns:
Return true if selects clockwise polygons as front-facing.

bool mitkMesh::IsNormalReversed  )  const [inline]
 

Indicate if the normals are reversed.

Returns:
Return true if the normals are reversed, otherwise return false.

virtual void mitkMesh::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 mitkDataObject.

Reimplemented in mitkHEICTriangleMesh, mitkHEMesh, mitkHEOoCTriangleMesh, mitkHETriangleMesh, mitkICTriangleMesh, mitkOoCTriangleMesh, and mitkTriangleMesh.

virtual void mitkMesh::ReverseNormals  )  [inline, virtual]
 

Reverse normals.

Reimplemented in mitkICTriangleMesh, and mitkOoCTriangleMesh.

void mitkMesh::SetBoundingBox float  bounds[6]  )  [inline]
 

Set the bounds for this mesh data as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Parameters:
bounds[0] minimum coordinate value in x-axis
bounds[1] maximum coordinate value in x-axis
bounds[2] minimum coordinate value in y-axis
bounds[3] maximum coordinate value in y-axis
bounds[4] minimum coordinate value in z-axis
bounds[5] maximum coordinate value in z-axis

void mitkMesh::SetBoundingBox float  minX,
float  maxX,
float  minY,
float  maxY,
float  minZ,
float  maxZ
[inline]
 

Set the bounds for this mesh data as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Parameters:
minX minimum coordinate value in x-axis
maxX maximum coordinate value in x-axis
minY minimum coordinate value in y-axis
maxY maximum coordinate value in y-axis
minZ minimum coordinate value in z-axis
maxZ maximum coordinate value in z-axis

void mitkMesh::SetClockwise bool  isClockwise = true  )  [inline]
 

Set the orientation of front-facing polygons to isClockwise.

Parameters:
isClockwise if selects clockwise polygons as front-facing

bool mitkMesh::SetFace index_type  faceIdx,
TriangleFace &  face
[inline]
 

An explicit instantiation of SetFace().

template<typename IndexType, unsigned int indexNum>
bool mitkMesh::SetFace index_type  faceIdx,
_face_type< IndexType, indexNum > &  face
[inline]
 

A general interface for setting a face.

Parameters:
faceIdx the index of the face to set
face the face to set
Returns:
Return true if success, otherwise return false.

virtual void mitkMesh::SetFaceNumber size_type  number  )  [pure virtual]
 

Set the mesh's faces' number and allocate memory.

Parameters:
number the number of faces

Implemented in mitkHEICTriangleMesh, mitkHEOoCTriangleMesh, mitkICTriangleMesh, and mitkOoCTriangleMesh.

bool mitkMesh::SetVertex index_type  vertIdx,
Vertex3f const &  vert
[inline]
 

A general interface for setting a vertex.

Parameters:
vertIdx the index of the vertex to set
vert the vertex to set
Returns:
Return true if success, otherwise return false.

virtual void mitkMesh::SetVertexNumber size_type  number  )  [pure virtual]
 

Set the mesh's vertices' number and allocate memory.

Parameters:
number the number of vertices

Implemented in mitkHEICTriangleMesh, mitkHEOoCTriangleMesh, mitkICTriangleMesh, and mitkOoCTriangleMesh.

virtual void mitkMesh::ShallowCopy mitkDataObject src  )  [virtual]
 

Shallowcopy.

Parameters:
src pointer to the source mitkDataObject

Implements mitkDataObject.

Reimplemented in mitkHEICTriangleMesh, mitkHEMesh, mitkHEOoCTriangleMesh, mitkICTriangleMesh, mitkOoCTriangleMesh, and mitkTriangleMesh.

virtual bool mitkMesh::TestClockwise  )  [pure virtual]
 

Test the orientation of front-facing polygons.

Returns:
Return true if the orientation of front-facing polygons is clockwise, otherwise return false.

Implemented in mitkHEMesh, mitkICTriangleMesh, and mitkOoCTriangleMesh.


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