Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MCMesh::MCVertex Class Reference

Represents one vertex in the net. More...

Collaboration diagram for MCMesh::MCVertex:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MCVertex (int idx)
 This is the only way to create an object of this type.
virtual ~MCVertex ()
 Destructor does not destroy _neighbours because this is done by MCMesh.
void AddNeigbour (MCVertex *v)
 Adds the vertex v to the _neighbours list.
void Vertex (vuVector &v)
 Sets the vertex position to v.
vuVectorVertex ()
 Return the vertex as vuVector.
void Idx (index_t idx)
 Sets the index of the vertex in the data array.
index_t Idx ()
 Returns the index of the vertex in the data array.
bool Indexed ()
 Returns true, if a index has been assigned with the vertex.
void resetIndexing ()
 Restets the indexing.

Private Member Functions

 MCVertex ()
 Default constructor should not be used.

Private Attributes

index_t _idx
 The index of the vertex data in the vertex array.
bool _indexed
 True if a index is assigned with the vertex.
vuVector _vertex
 Reference to the vertex data in MCData.
std::list< MCVertex * > _neighbours
 List of all neighbouring vertices.

Detailed Description

Represents one vertex in the net.

Definition at line 230 of file MarchingCubesData.h.


Constructor & Destructor Documentation

MCMesh::MCVertex::MCVertex  )  [inline, private]
 

Default constructor should not be used.

Definition at line 256 of file MarchingCubesData.h.

MCMesh::MCVertex::MCVertex int  idx  ) 
 

This is the only way to create an object of this type.

Definition at line 46 of file MarchingCubesData.cpp.

References DEBUGC.

MCMesh::MCVertex::~MCVertex  )  [virtual]
 

Destructor does not destroy _neighbours because this is done by MCMesh.

Definition at line 53 of file MarchingCubesData.cpp.

References DEBUGD.


Member Function Documentation

void MCMesh::MCVertex::AddNeigbour MCVertex v  ) 
 

Adds the vertex v to the _neighbours list.

Todo:
Should this function check the existence of the vertex in the array?

Definition at line 59 of file MarchingCubesData.cpp.

References _neighbours, assert, and DEBUG0.

Referenced by MCMesh::MCTriangle::AddVertex().

MCMesh::index_t MCMesh::MCVertex::Idx  ) 
 

Returns the index of the vertex in the data array.

Definition at line 85 of file MarchingCubesData.cpp.

References DEBUG0, and MCMesh::index_t.

void MCMesh::MCVertex::Idx index_t  idx  ) 
 

Sets the index of the vertex in the data array.

Definition at line 78 of file MarchingCubesData.cpp.

References _idx, _indexed, DEBUG0, and MCMesh::index_t.

Referenced by MCMesh::_compileData(), and MCMesh::MCTriangle::GetVertexIdx().

bool MCMesh::MCVertex::Indexed  ) 
 

Returns true, if a index has been assigned with the vertex.

Definition at line 91 of file MarchingCubesData.cpp.

References DEBUG0.

Referenced by MCMesh::_compileData().

void MCMesh::MCVertex::resetIndexing  ) 
 

Restets the indexing.

Definition at line 97 of file MarchingCubesData.cpp.

References _indexed, and DEBUG0.

vuVector & MCMesh::MCVertex::Vertex  ) 
 

Return the vertex as vuVector.

Definition at line 72 of file MarchingCubesData.cpp.

References DEBUG0.

void MCMesh::MCVertex::Vertex vuVector v  ) 
 

Sets the vertex position to v.

Definition at line 66 of file MarchingCubesData.cpp.

References _vertex, and DEBUG0.

Referenced by MCMesh::_compileData(), MCMesh::AddVertex(), and MCMesh::MCTriangle::GetNormal().


Member Data Documentation

index_t MCMesh::MCVertex::_idx [private]
 

The index of the vertex data in the vertex array.

Attention:
This class assumes that the index is the same for _vertex and _normal!

Definition at line 240 of file MarchingCubesData.h.

Referenced by Idx().

bool MCMesh::MCVertex::_indexed [private]
 

True if a index is assigned with the vertex.

Definition at line 242 of file MarchingCubesData.h.

Referenced by Idx(), and resetIndexing().

std::list<MCVertex *> MCMesh::MCVertex::_neighbours [private]
 

List of all neighbouring vertices.

The elements in this list must not be destroyed, because they only reference elements saved in the base class if the data structure.

Definition at line 253 of file MarchingCubesData.h.

Referenced by AddNeigbour().

vuVector MCMesh::MCVertex::_vertex [private]
 

Reference to the vertex data in MCData.

Must not be destroyed because it only references an array.

Definition at line 247 of file MarchingCubesData.h.

Referenced by Vertex().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:20:58 2004 for vuVolume by  doxygen 1.3.9.1