OpenVDB: GridBlindMetaData Struct Reference

OpenVDB 13.0.0

Loading...
Searching...
No Matches
GridBlindMetaData Struct Reference

`#include <nanovdb/NanoVDB.h>`

## Public Member Functions
| GridBlindMetaData ()
| Empty constructor.
| GridBlindMetaData (int64_t dataOffset, uint64_t valueCount, uint32_t valueSize, GridBlindDataSemantic semantic, GridBlindDataClass dataClass, GridType dataType)
| GridBlindMetaData (const GridBlindMetaData &other)
| Copy constructor that resets mDataOffset and zeros out mName.
const GridBlindMetaData & | operator= (const GridBlindMetaData &rhs)
| Copy assignment operator that resets mDataOffset and copies mName.
__hostdev__ void | setBlindData (const void *blindData)
__hostdev__ bool | setName (const char *name)
| Sets the name string.
__hostdev__ const void * | blindData () const
| returns a const void point to the blind data
template<typename BlindDataT>
__hostdev__ const BlindDataT * | getBlindData () const
| Get a const pointer to the blind data represented by this meta data.
__hostdev__ bool | isValid () const
| return true if this meta data has a valid combination of semantic, class and value tags.
__hostdev__ uint64_t | blindDataSize () const
| return size in bytes of the blind data represented by this blind meta data

## Public Attributes
int64_t | mDataOffset
uint64_t | mValueCount
uint32_t | mValueSize
GridBlindDataSemantic | mSemantic
GridBlindDataClass | mDataClass
GridType | mDataType
char | mName [MaxNameSize]

## Static Public Attributes
static const int | MaxNameSize = 256

## Constructor & Destructor Documentation

## ◆ GridBlindMetaData() [1/3]

GridBlindMetaData | ( |  | ) |
| inline

Empty constructor.

## ◆ GridBlindMetaData() [2/3]

GridBlindMetaData | ( | int64_t | dataOffset,
|  | uint64_t | valueCount,
|  | uint32_t | valueSize,
|  | GridBlindDataSemantic | semantic,
|  | GridBlindDataClass | dataClass,
|  | GridType | dataType )
| inline

## ◆ GridBlindMetaData() [3/3]

GridBlindMetaData | ( | const GridBlindMetaData & | other | ) |
| inline

Copy constructor that resets mDataOffset and zeros out mName.

## Member Function Documentation

## ◆ blindData()

__hostdev__ const void * blindData | ( |  | ) | const
| inline

returns a const void point to the blind data

Note
  assumes that setBlinddData was called

## ◆ blindDataSize()

__hostdev__ uint64_t blindDataSize | ( |  | ) | const
| inline

return size in bytes of the blind data represented by this blind meta data

Note
  This size includes possible padding for 32 byte alignment. The actual amount of bind data is mValueCount * mValueSize

## ◆ getBlindData()

template<typename BlindDataT>

__hostdev__ const BlindDataT * getBlindData | ( |  | ) | const
| inline

Get a const pointer to the blind data represented by this meta data.

Template Parameters

  BlindDataT | Expected value type of the blind data.

Returns
  Returns NULL if mGridType!=toGridType<BlindDataT>(), else a const point of type BlindDataT.

Note
  Use mDataType=Unknown if BlindDataT is a custom data type unknown to NanoVDB.

## ◆ isValid()

__hostdev__ bool isValid | ( |  | ) | const
| inline

return true if this meta data has a valid combination of semantic, class and value tags.

Note
  this does not check if the mDataOffset has been set! It is intended to catch invalid combinations of semantic, class and value tags.

## ◆ operator=()

const GridBlindMetaData & operator= | ( | const GridBlindMetaData & | rhs | ) |
| inline

Copy assignment operator that resets mDataOffset and copies mName.

Parameters

  rhs | right-hand instance to copy

Returns
  reference to itself

## ◆ setBlindData()

__hostdev__ void setBlindData | ( | const void * | blindData | ) |
| inline

## ◆ setName()

__hostdev__ bool setName | ( | const char * | name | ) |
| inline

Sets the name string.

Parameters

  name | c-string source name

Returns
  returns false if `name` has too many characters

## Member Data Documentation

## ◆ MaxNameSize

const int MaxNameSize = 256
| static

## ◆ mDataClass

GridBlindDataClass mDataClass

## ◆ mDataOffset

int64_t mDataOffset

## ◆ mDataType

GridType mDataType

## ◆ mName

char mName[MaxNameSize]

## ◆ mSemantic

GridBlindDataSemantic mSemantic

## ◆ mValueCount

uint64_t mValueCount

## ◆ mValueSize

uint32_t mValueSize