OpenVDB  10.0.1
Public Member Functions | Static Public Attributes | List of all members
GridChecksum Class Reference

Class that encapsulates two CRC32 checksums, one for the Grid, Tree and Root node meta data and one for the remaining grid nodes. More...

#include <nanovdb/util/GridChecksum.h>

Public Member Functions

 GridChecksum ()
 
 GridChecksum (uint32_t head, uint32_t tail)
 
 GridChecksum (uint64_t checksum, ChecksumMode mode=ChecksumMode::Full)
 
uint64_t checksum () const
 
uint32_t crc32 (int i) const
 
bool isFull () const
 
bool isEmpty () const
 
ChecksumMode mode () const
 
template<typename ValueT >
void operator() (const NanoGrid< ValueT > &grid, ChecksumMode mode=ChecksumMode::Full)
 
bool operator== (const GridChecksum &rhs) const
 
bool operator!= (const GridChecksum &rhs) const
 

Static Public Attributes

static const uint64_t EMPTY = (static_cast<uint64_t>(CRC32::EMPTY) << 32) | static_cast<uint64_t>(CRC32::EMPTY)
 

Detailed Description

Class that encapsulates two CRC32 checksums, one for the Grid, Tree and Root node meta data and one for the remaining grid nodes.

Constructor & Destructor Documentation

GridChecksum ( )
inline
GridChecksum ( uint32_t  head,
uint32_t  tail 
)
inline
GridChecksum ( uint64_t  checksum,
ChecksumMode  mode = ChecksumMode::Full 
)
inline

Member Function Documentation

uint64_t checksum ( ) const
inline
uint32_t crc32 ( int  i) const
inline
bool isEmpty ( ) const
inline
bool isFull ( ) const
inline
ChecksumMode mode ( ) const
inline
bool operator!= ( const GridChecksum rhs) const
inline
void operator() ( const NanoGrid< ValueT > &  grid,
ChecksumMode  mode = ChecksumMode::Full 
)
bool operator== ( const GridChecksum rhs) const
inline

Member Data Documentation

const uint64_t EMPTY = (static_cast<uint64_t>(CRC32::EMPTY) << 32) | static_cast<uint64_t>(CRC32::EMPTY)
static
uint64_t mChecksum
uint32_t mCRC[2]