PolyVox  0.2.1
Open source voxel management library
Classes | Public Member Functions | Public Attributes
PolyVox::Block< VoxelType > Class Template Reference

#include <Block.h>

+ Inheritance diagram for PolyVox::Block< VoxelType >:
+ Collaboration diagram for PolyVox::Block< VoxelType >:

List of all members.

Classes

struct  RunlengthEntry

Public Member Functions

 Block (uint16_t uSideLength=0)
uint16_t getSideLength (void) const
VoxelType getVoxelAt (uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const
VoxelType getVoxelAt (const Vector3DUint16 &v3dPos) const
void setVoxelAt (uint16_t uXPos, uint16_t uYPos, uint16_t uZPos, VoxelType tValue)
void setVoxelAt (const Vector3DUint16 &v3dPos, VoxelType tValue)
void fill (VoxelType tValue)
void initialise (uint16_t uSideLength)
uint32_t calculateSizeInBytes (void)
void compress (void)
void uncompress (void)

Public Attributes

std::vector< RunlengthEntry
< uint16_t > > 
m_vecCompressedData
VoxelType * m_tUncompressedData
uint16_t m_uSideLength
uint8_t m_uSideLengthPower
bool m_bIsCompressed
bool m_bIsUncompressedDataModified

Detailed Description

template<typename VoxelType>
class PolyVox::Block< VoxelType >

Definition at line 36 of file Block.h.


Constructor & Destructor Documentation

template<typename VoxelType >
PolyVox::Block< VoxelType >::Block ( uint16_t  uSideLength = 0)

Definition at line 35 of file Block.inl.

+ Here is the call graph for this function:


Member Function Documentation

template<typename VoxelType >
uint32_t PolyVox::Block< VoxelType >::calculateSizeInBytes ( void  )

Definition at line 144 of file Block.inl.

template<typename VoxelType >
void PolyVox::Block< VoxelType >::compress ( void  )

Definition at line 152 of file Block.inl.

template<typename VoxelType>
void PolyVox::Block< VoxelType >::fill ( VoxelType  tValue)

Definition at line 103 of file Block.inl.

Referenced by PolyVox::Block< VoxelType >::initialise().

template<typename VoxelType >
uint16_t PolyVox::Block< VoxelType >::getSideLength ( void  ) const

Definition at line 49 of file Block.inl.

template<typename VoxelType >
VoxelType PolyVox::Block< VoxelType >::getVoxelAt ( uint16_t  uXPos,
uint16_t  uYPos,
uint16_t  uZPos 
) const

Definition at line 55 of file Block.inl.

Referenced by PolyVox::LargeVolume< VoxelType >::getVoxelAt().

template<typename VoxelType >
VoxelType PolyVox::Block< VoxelType >::getVoxelAt ( const Vector3DUint16 v3dPos) const

Definition at line 72 of file Block.inl.

+ Here is the call graph for this function:

template<typename VoxelType >
void PolyVox::Block< VoxelType >::initialise ( uint16_t  uSideLength)

Definition at line 125 of file Block.inl.

Referenced by PolyVox::Block< VoxelType >::Block().

+ Here is the call graph for this function:

template<typename VoxelType>
void PolyVox::Block< VoxelType >::setVoxelAt ( uint16_t  uXPos,
uint16_t  uYPos,
uint16_t  uZPos,
VoxelType  tValue 
)

Definition at line 78 of file Block.inl.

Referenced by PolyVox::LargeVolume< VoxelType >::setVoxelAt().

template<typename VoxelType>
void PolyVox::Block< VoxelType >::setVoxelAt ( const Vector3DUint16 v3dPos,
VoxelType  tValue 
)

Definition at line 97 of file Block.inl.

+ Here is the call graph for this function:

template<typename VoxelType >
void PolyVox::Block< VoxelType >::uncompress ( void  )

Definition at line 198 of file Block.inl.


Member Data Documentation

template<typename VoxelType>
bool PolyVox::Block< VoxelType >::m_bIsCompressed

Definition at line 71 of file Block.h.

template<typename VoxelType>
bool PolyVox::Block< VoxelType >::m_bIsUncompressedDataModified

Definition at line 72 of file Block.h.

template<typename VoxelType>
VoxelType* PolyVox::Block< VoxelType >::m_tUncompressedData

Definition at line 68 of file Block.h.

Referenced by PolyVox::LargeVolume< VoxelType >::Sampler::setPosition().

template<typename VoxelType>
uint16_t PolyVox::Block< VoxelType >::m_uSideLength

Definition at line 69 of file Block.h.

template<typename VoxelType>
uint8_t PolyVox::Block< VoxelType >::m_uSideLengthPower

Definition at line 70 of file Block.h.

template<typename VoxelType>
std::vector< RunlengthEntry<uint16_t> > PolyVox::Block< VoxelType >::m_vecCompressedData

Definition at line 67 of file Block.h.


The documentation for this class was generated from the following files: