Inheritance diagram for MCMesh::MCData< T, Size >:
Public Member Functions | |
MCData (int es=MCM_DATA_EXTEND_DEFAULT) | |
Default constructor. | |
virtual | ~MCData () |
Destructor. | |
void | extendSize (int sz) |
Extend Size setter. See _extendSize for more information. | |
int | extendSize () |
Extend Size getter. See _extendSize for more information. | |
MCElement< T, Size > | Add (void) |
void | Clear () |
Brings back the object to it's initial state. | |
int | GetSize (void) |
Actual size of the array. | |
T * | operator[] (int idx) |
This function returns a pointer to the data in any case. | |
void | CopyFrom (int idx, T *data) |
Copies the data from data to the internal array and starts at position idx. | |
Private Attributes | |
T * | _data |
Array data. | |
int | _extendSize |
Fill level of the array. | |
int | _size |
int | _bufSize |
Actual size of the buffer. |
As all other classes this class provides a one way access to the data. Adding data to the "array" is easy but there is now way to remove a value from the array. Initially the class creates an empty array of size _extendSize*Size
. This will be filled until no more elements fit into the array. At this point a new array of the size OldSize*_extendSize*Size
will be created, the data copied to the new array and the old array will be destroyed. The value of _extendSize
can be changed dynamically. Its default value is MCM_DATA_EXTEND_DEFAULT.
Definition at line 304 of file MarchingCubesData.h.
|
Default constructor. Definition at line 327 of file MarchingCubesData.h. |
|
Destructor. Definition at line 330 of file MarchingCubesData.h. |
|
Referenced by MCMesh::_addToIndex(), MCMesh::_compileNormalsArray(), MCMesh::AddVertex(), and MCMesh::setObjectColor(). |
|
Brings back the object to it's initial state. Definition at line 383 of file MarchingCubesData.h. Referenced by MCMesh::_compileNormalsArray(), and MCMesh::setObjectColor(). |
|
Copies the data from data to the internal array and starts at position idx. This function expects the number of Size elements in data.
|
|
Extend Size getter. See _extendSize for more information. Definition at line 337 of file MarchingCubesData.h. |
|
Extend Size setter. See _extendSize for more information. Definition at line 335 of file MarchingCubesData.h. |
|
Actual size of the array. Definition at line 391 of file MarchingCubesData.h. Referenced by MCMesh::_compileNormalsArray(), MCMesh::AddVertex(), MCMesh::DebugPrint(), and MCMesh::render(). |
|
This function returns a pointer to the data in any case. Definition at line 396 of file MarchingCubesData.h. |
|
Actual size of the buffer. If _size equals _bufSize, and a new element should be added, the array has to be resized.Definition at line 322 of file MarchingCubesData.h. |
|
Array data. Definition at line 310 of file MarchingCubesData.h. |
|
Fill level of the array. Definition at line 316 of file MarchingCubesData.h. |
|
Definition at line 317 of file MarchingCubesData.h. |