Collaboration diagram for MCMesh::MCTriangle:
Public Member Functions | |
MCTriangle (int type) | |
Default constructor. | |
virtual | ~MCTriangle () |
Destructor. | |
int | AddVertex (MCVertex *v) |
Adds the vertex v to its list of member vertices. | |
MCVertex * | GetVertex (int n) |
Returns the n -th vertex in the triangle. | |
vuVector | GetNormal () |
Calculates the normal for the n-th vertex in the triangle. | |
bool | Complete () |
Indication the completion of the triangle. | |
MCMesh::index_t | GetVertexIdx (int v) |
int | Type () |
Returns the type of this triangle. | |
Private Attributes | |
int | _type |
Indicates the type of cube the triangle belongs to. | |
MCVertex * | _vertices [3] |
The member vertices of the triangle. | |
unsigned short | _vertCnt |
Fill level of the _vertices array. | |
std::list< MCTriangle * > | _neighbours |
A list of all neighbours. |
Definition at line 289 of file MarchingCubesData.h.
|
Default constructor.
Definition at line 108 of file MarchingCubesData.cpp. |
|
Destructor.
Definition at line 116 of file MarchingCubesData.cpp. References DEBUGD. |
|
Adds the vertex v to its list of member vertices. If this list is already complete, the function returns -1. If the addition was successfull the function returns the index of the vertex in the member list (i.e. 0-2).
Definition at line 121 of file MarchingCubesData.cpp. References _vertCnt, _vertices, MCMesh::MCVertex::AddNeigbour(), and DEBUG0. |
Here is the call graph for this function:
|
Indication the completion of the triangle.
Definition at line 158 of file MarchingCubesData.cpp. References _vertCnt, and DEBUG0. Referenced by GetNormal(). |
|
Calculates the normal for the n-th vertex in the triangle.
Definition at line 147 of file MarchingCubesData.cpp. References _vertices, assert, Complete(), vuVector::cross, DEBUG0, vuVector::makeUnit(), and MCMesh::MCVertex::Vertex(). |
Here is the call graph for this function:
|
Returns the n -th vertex in the triangle.
Definition at line 139 of file MarchingCubesData.cpp. |
|
Definition at line 164 of file MarchingCubesData.cpp. References _vertices, assert, DEBUG0, MCMesh::MCVertex::Idx(), and MCMesh::index_t. |
Here is the call graph for this function:
|
Returns the type of this triangle.
Definition at line 172 of file MarchingCubesData.cpp. References DEBUG0. |
|
A list of all neighbours. The neighbours need not be accessed directly but sequentially, this is why I use STLs single linked list. Definition at line 316 of file MarchingCubesData.h. |
|
Indicates the type of cube the triangle belongs to.
Definition at line 297 of file MarchingCubesData.h. |
|
Fill level of the _vertices array. This counter will also be used by the Complete function. Definition at line 310 of file MarchingCubesData.h. Referenced by AddVertex(), and Complete(). |
|
The member vertices of the triangle. A triangle has only 3 vertices, therefore a fixed size array is the best choice. The elements in the array must not be destroyed, because they are only references. Definition at line 305 of file MarchingCubesData.h. Referenced by AddVertex(), GetNormal(), GetVertex(), GetVertexIdx(), and MCTriangle(). |