HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_VoxelTileCompress< T > Class Template Referenceabstract

#include <UT_VoxelArray.h>

Public Member Functions

 UT_VoxelTileCompress ()
 
virtual ~UT_VoxelTileCompress ()
 
virtual bool writeThrough (UT_VoxelTile< T > &tile, int x, int y, int z, T t) const =0
 
virtual T getValue (const UT_VoxelTile< T > &tile, int x, int y, int z) const =0
 
virtual bool tryCompress (UT_VoxelTile< T > &tile, const UT_VoxelCompressOptions &options, T min, T max) const =0
 
virtual int getDataLength (const UT_VoxelTile< T > &tile) const =0
 
virtual bool isLossless () const
 Returns true if the compression type is lossless. More...
 
virtual void findMinMax (const UT_VoxelTile< T > &tile, T &min, T &max) const
 
virtual bool canSave () const
 Does this engine support saving and loading? More...
 
virtual void save (std::ostream &os, const UT_VoxelTile< T > &tile) const
 
virtual bool save (UT_JSONWriter &w, const UT_VoxelTile< T > &tile) const
 
virtual void load (UT_IStream &is, UT_VoxelTile< T > &tile) const
 
virtual bool load (UT_JSONParser &p, UT_VoxelTile< T > &tile) const
 
virtual const char * getName ()=0
 

Detailed Description

template<typename T>
class UT_VoxelTileCompress< T >

UT_VoxelTileCompress

A compression engine for UT_VoxelTiles of a specific type. This is a verb class which is invoked from the voxeltile class.

Definition at line 136 of file UT_VoxelArray.h.

Constructor & Destructor Documentation

template<typename T>
UT_VoxelTileCompress< T >::UT_VoxelTileCompress ( )
inline

Definition at line 139 of file UT_VoxelArray.h.

template<typename T>
virtual UT_VoxelTileCompress< T >::~UT_VoxelTileCompress ( )
inlinevirtual

Definition at line 140 of file UT_VoxelArray.h.

Member Function Documentation

template<typename T>
virtual bool UT_VoxelTileCompress< T >::canSave ( ) const
inlinevirtual

Does this engine support saving and loading?

Definition at line 170 of file UT_VoxelArray.h.

template<typename T >
void UT_VoxelTileCompress< T >::findMinMax ( const UT_VoxelTile< T > &  tile,
T min,
T max 
) const
virtual

Determines the min & max values of the tile. A default implementation uses getValue() on all voxels.

VoxelTileCompress definitions

Definition at line 73 of file UT_VoxelArray.C.

template<typename T>
virtual int UT_VoxelTileCompress< T >::getDataLength ( const UT_VoxelTile< T > &  tile) const
pure virtual

Returns the length in bytes of the data in the tile. It must be at least one byte long.

template<typename T>
virtual const char* UT_VoxelTileCompress< T >::getName ( )
pure virtual

Returns the unique name of this compression engine so we can look up engines by name (the index of the compression engine is assigned at load time so isn't constant)

template<typename T>
virtual T UT_VoxelTileCompress< T >::getValue ( const UT_VoxelTile< T > &  tile,
int  x,
int  y,
int  z 
) const
pure virtual

Reads directly from the compressed data. Cannot alter the tile in any way because it must be threadsafe.

template<typename T>
virtual bool UT_VoxelTileCompress< T >::isLossless ( ) const
inlinevirtual

Returns true if the compression type is lossless.

Definition at line 163 of file UT_VoxelArray.h.

template<typename T>
virtual void UT_VoxelTileCompress< T >::load ( UT_IStream is,
UT_VoxelTile< T > &  tile 
) const
inlinevirtual

Definition at line 174 of file UT_VoxelArray.h.

template<typename T>
virtual bool UT_VoxelTileCompress< T >::load ( UT_JSONParser p,
UT_VoxelTile< T > &  tile 
) const
inlinevirtual

Definition at line 175 of file UT_VoxelArray.h.

template<typename T>
virtual void UT_VoxelTileCompress< T >::save ( std::ostream &  os,
const UT_VoxelTile< T > &  tile 
) const
inlinevirtual

Definition at line 171 of file UT_VoxelArray.h.

template<typename T>
virtual bool UT_VoxelTileCompress< T >::save ( UT_JSONWriter w,
const UT_VoxelTile< T > &  tile 
) const
inlinevirtual

Definition at line 172 of file UT_VoxelArray.h.

template<typename T>
virtual bool UT_VoxelTileCompress< T >::tryCompress ( UT_VoxelTile< T > &  tile,
const UT_VoxelCompressOptions options,
T  min,
T  max 
) const
pure virtual

Attempts to compress the data according to the given tolerance. If succesful, returns true.

template<typename T>
virtual bool UT_VoxelTileCompress< T >::writeThrough ( UT_VoxelTile< T > &  tile,
int  x,
int  y,
int  z,
T  t 
) const
pure virtual

Attempts to write data directly to the compressed tile. Returns false if not possible.


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