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

MCMesh::MCElement< T, Size > Class Template Reference

Interface to a element in a MCData array. More...

Inheritance diagram for MCMesh::MCElement< T, Size >:

Inheritance graph
[legend]
Collaboration diagram for MCMesh::MCElement< T, Size >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MCElement ()
 Default constructor.
 MCElement (T **data, index_t idx)
 This constructor should be used.
 MCElement (const MCElement &e)
virtual ~MCElement ()
 Destructor does nothing because the class does not hold any data that should be destroyed.
void operator= (const MCElement &e)
 operator T * ()
T ** Data ()
index_t Idx ()
void Set (T val, int idx=0)
 Set the value of the element.
Get (int idx=0)
 Return the value of the element.

Protected Attributes

T ** _data
index_t _idx

Detailed Description

template<class T, int Size>
class MCMesh::MCElement< T, Size >

Interface to a element in a MCData array.

This class is given to a MCVertex which in turn accesses its data through this class. It is needed because the array may change through the creation of the mesh. Therefore it holds a pointer to the array so that the array change can be hidden from MCVertex.

Definition at line 208 of file MarchingCubesData.h.


Constructor & Destructor Documentation

template<class T, int Size>
MCMesh::MCElement< T, Size >::MCElement  )  [inline]
 

Default constructor.

Definition at line 221 of file MarchingCubesData.h.

template<class T, int Size>
MCMesh::MCElement< T, Size >::MCElement T **  data,
index_t  idx
[inline]
 

This constructor should be used.

Parameters:
data pointer to the array.
idx Index of the element in the array.
Definition at line 227 of file MarchingCubesData.h.

template<class T, int Size>
MCMesh::MCElement< T, Size >::MCElement const MCElement< T, Size > &  e  )  [inline]
 

Definition at line 228 of file MarchingCubesData.h.

template<class T, int Size>
virtual MCMesh::MCElement< T, Size >::~MCElement  )  [inline, virtual]
 

Destructor does nothing because the class does not hold any data that should be destroyed.

Definition at line 233 of file MarchingCubesData.h.


Member Function Documentation

template<class T, int Size>
T** MCMesh::MCElement< T, Size >::Data  )  [inline]
 

Definition at line 247 of file MarchingCubesData.h.

template<class T, int Size>
T MCMesh::MCElement< T, Size >::Get int  idx = 0  )  [inline]
 

Return the value of the element.

If the dimension of the data is bigger than 1, the number of the dimension to manipulate must be given by idx.

Attention:
idx must not be greater than Size.
Definition at line 268 of file MarchingCubesData.h.

template<class T, int Size>
index_t MCMesh::MCElement< T, Size >::Idx  )  [inline]
 

Definition at line 248 of file MarchingCubesData.h.

template<class T, int Size>
MCMesh::MCElement< T, Size >::operator T *  )  [inline]
 

Definition at line 242 of file MarchingCubesData.h.

template<class T, int Size>
void MCMesh::MCElement< T, Size >::operator= const MCElement< T, Size > &  e  )  [inline]
 

Definition at line 235 of file MarchingCubesData.h.

template<class T, int Size>
void MCMesh::MCElement< T, Size >::Set val,
int  idx = 0
[inline]
 

Set the value of the element.

If the dimension of the data is bigger than 1, the number of the dimension to manipulate must be given by idx.

Attention:
idx must not be greater than Size.
Definition at line 256 of file MarchingCubesData.h.

Referenced by MCMesh::_addToIndex().


Member Data Documentation

template<class T, int Size>
T** MCMesh::MCElement< T, Size >::_data [protected]
 

Definition at line 213 of file MarchingCubesData.h.

Referenced by MCMesh::MCElement< float, 3 >::operator=().

template<class T, int Size>
index_t MCMesh::MCElement< T, Size >::_idx [protected]
 

Definition at line 214 of file MarchingCubesData.h.


The documentation for this class was generated from the following file:
Generated on Tue Nov 9 19:41:50 2004 for vuVolume by doxygen 1.3.8