HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_VolumeSampler Class Reference

#include <GEO_VolumeSampler.h>

Public Member Functions

 GEO_VolumeSampler ()
 
 GEO_VolumeSampler (const GEO_Primitive *prim)
 
 GEO_VolumeSampler (const GEO_VolumeSampler &src)
 
 ~GEO_VolumeSampler ()
 
GEO_VolumeSampleroperator= (const GEO_VolumeSampler &src)
 
bool isBound ()
 
bool storesIntegers ()
 
void bindPrim (const GEO_Primitive *prim)
 
int getVectorSize () const
 
void indexToPos (int x, int y, int z, UT_Vector3 &pos) const
 
void findexToPos (UT_Vector3 index, UT_Vector3 &pos) const
 
void indexToPos (exint x, exint y, exint z, UT_Vector3D &pos) const
 
void findexToPos (UT_Vector3D index, UT_Vector3D &pos) const
 
void posToIndex (UT_Vector3 pos, int &x, int &y, int &z) const
 Convert a 3d position into the closest index value. More...
 
void posToIndex (UT_Vector3 pos, UT_Vector3 &index) const
 
void posToIndex (UT_Vector3D pos, exint &x, exint &y, exint &z) const
 
void posToIndex (UT_Vector3D pos, UT_Vector3D &index) const
 
GEO_PrimVolumeXform getSpaceTransform () const
 
GEO_PrimVolumeXform getIndexSpaceTransform () const
 
bool isActive (const UT_Vector3 &pos)
 
bool isActiveAtIndex (int ix, int iy, int iz)
 
fpreal getValueF (const UT_Vector3 &pos)
 
fpreal getValueAtIndexF (int ix, int iy, int iz)
 
fpreal getConstantIndexRegionF (UT_BoundingBox &indexbox, bool *isconstant, bool *isactive)
 
UT_Vector2D getConstantIndexRegionV2 (UT_BoundingBox &indexbox, bool *isconstant, bool *isactive)
 
UT_Vector3D getConstantIndexRegionV3 (UT_BoundingBox &indexbox, bool *isconstant, bool *isactive)
 
UT_Vector4D getConstantIndexRegionV4 (UT_BoundingBox &indexbox, bool *isconstant, bool *isactive)
 
exint getConstantIndexRegionI (UT_BoundingBox &indexbox, bool *isconstant, bool *isactive)
 
UT_Vector2D getValueV2 (const UT_Vector3 &pos)
 
UT_Vector2D getValueAtIndexV2 (int ix, int iy, int iz)
 
UT_Vector3D getValueV3 (const UT_Vector3 &pos)
 
UT_Vector3D getValueAtIndexV3 (int ix, int iy, int iz)
 
UT_Vector4D getValueV4 (const UT_Vector3 &pos)
 
UT_Vector4D getValueAtIndexV4 (int ix, int iy, int iz)
 
exint getValueI (const UT_Vector3 &pos)
 
exint getValueAtIndexI (int ix, int iy, int iz)
 
template<typename BASE >
BASE getValueByType (const UT_Vector3 &pos)
 
template<class T >
bool getValues (const UT_BoundingBoxI &bbox, T *values, const exint size)
 

Static Public Member Functions

static UT_UniquePtr
< GEO_VolumeSamplerCache
createVolumeCache (const GEO_PrimVolume *vol)
 
static UT_UniquePtr
< GEO_VolumeSamplerCache
createVDBCache (const GEO_PrimVDB *vdb)
 

Protected Attributes

const GEO_PrimitivemyPrim
 
const GEO_PrimVolumemyVol
 
const GEO_PrimVDBmyVdb
 
int myVectorSize
 
UT_UniquePtr
< GEO_VolumeSamplerCache
mySamplerCache
 

Detailed Description

Definition at line 79 of file GEO_VolumeSampler.h.

Constructor & Destructor Documentation

GEO_VolumeSampler::GEO_VolumeSampler ( )
inline

Definition at line 82 of file GEO_VolumeSampler.h.

GEO_VolumeSampler::GEO_VolumeSampler ( const GEO_Primitive prim)
inline

Definition at line 86 of file GEO_VolumeSampler.h.

GEO_VolumeSampler::GEO_VolumeSampler ( const GEO_VolumeSampler src)
inline

Definition at line 91 of file GEO_VolumeSampler.h.

GEO_VolumeSampler::~GEO_VolumeSampler ( )
inline

Definition at line 95 of file GEO_VolumeSampler.h.

Member Function Documentation

void GEO_VolumeSampler::bindPrim ( const GEO_Primitive prim)
inline

Definition at line 128 of file GEO_VolumeSampler.h.

static UT_UniquePtr<GEO_VolumeSamplerCache> GEO_VolumeSampler::createVDBCache ( const GEO_PrimVDB vdb)
static
static UT_UniquePtr<GEO_VolumeSamplerCache> GEO_VolumeSampler::createVolumeCache ( const GEO_PrimVolume vol)
static
void GEO_VolumeSampler::findexToPos ( UT_Vector3  index,
UT_Vector3 pos 
) const
inline

Definition at line 164 of file GEO_VolumeSampler.h.

void GEO_VolumeSampler::findexToPos ( UT_Vector3D  index,
UT_Vector3D pos 
) const
inline

Definition at line 178 of file GEO_VolumeSampler.h.

fpreal GEO_VolumeSampler::getConstantIndexRegionF ( UT_BoundingBox indexbox,
bool *  isconstant,
bool *  isactive 
)

Conservatively determines if a box [minvec, maxvec] in index space is constant or inactive. If there is doubt, it is reported as non-constant and active.

isconstant is true only if all voxels in the region have the same value isactive is false only if all the voxels in the region are inactive.

if isconstant is true, the returned value will the constant value.

exint GEO_VolumeSampler::getConstantIndexRegionI ( UT_BoundingBox indexbox,
bool *  isconstant,
bool *  isactive 
)
UT_Vector2D GEO_VolumeSampler::getConstantIndexRegionV2 ( UT_BoundingBox indexbox,
bool *  isconstant,
bool *  isactive 
)
UT_Vector3D GEO_VolumeSampler::getConstantIndexRegionV3 ( UT_BoundingBox indexbox,
bool *  isconstant,
bool *  isactive 
)
UT_Vector4D GEO_VolumeSampler::getConstantIndexRegionV4 ( UT_BoundingBox indexbox,
bool *  isconstant,
bool *  isactive 
)
GEO_PrimVolumeXform GEO_VolumeSampler::getIndexSpaceTransform ( ) const
inline

Definition at line 224 of file GEO_VolumeSampler.h.

GEO_PrimVolumeXform GEO_VolumeSampler::getSpaceTransform ( ) const
inline

Definition at line 216 of file GEO_VolumeSampler.h.

fpreal GEO_VolumeSampler::getValueAtIndexF ( int  ix,
int  iy,
int  iz 
)
inline

Definition at line 261 of file GEO_VolumeSampler.h.

exint GEO_VolumeSampler::getValueAtIndexI ( int  ix,
int  iy,
int  iz 
)
inline

Definition at line 339 of file GEO_VolumeSampler.h.

UT_Vector2D GEO_VolumeSampler::getValueAtIndexV2 ( int  ix,
int  iy,
int  iz 
)
inline

Definition at line 291 of file GEO_VolumeSampler.h.

UT_Vector3D GEO_VolumeSampler::getValueAtIndexV3 ( int  ix,
int  iy,
int  iz 
)
inline

Definition at line 307 of file GEO_VolumeSampler.h.

UT_Vector4D GEO_VolumeSampler::getValueAtIndexV4 ( int  ix,
int  iy,
int  iz 
)
inline

Definition at line 323 of file GEO_VolumeSampler.h.

template<typename BASE >
BASE GEO_VolumeSampler::getValueByType ( const UT_Vector3 pos)
inline

Definition at line 348 of file GEO_VolumeSampler.h.

fpreal GEO_VolumeSampler::getValueF ( const UT_Vector3 pos)
inline

Definition at line 253 of file GEO_VolumeSampler.h.

exint GEO_VolumeSampler::getValueI ( const UT_Vector3 pos)
inline

Definition at line 331 of file GEO_VolumeSampler.h.

template<class T >
bool GEO_VolumeSampler::getValues ( const UT_BoundingBoxI bbox,
T values,
const exint  size 
)
inline

Gets values in the box [bbox.minvec(), bbox.maxvec()) Values are stored in the array values of size size that has to be at least bbox.volume() The order of values is give by: i + bbox.xsize() * (j + bbox.ysize() * k)

If returns true, values in bbox are constant and only values[0] is guaranteed to be assigned.

Definition at line 368 of file GEO_VolumeSampler.h.

UT_Vector2D GEO_VolumeSampler::getValueV2 ( const UT_Vector3 pos)
inline

Definition at line 283 of file GEO_VolumeSampler.h.

UT_Vector3D GEO_VolumeSampler::getValueV3 ( const UT_Vector3 pos)
inline

Definition at line 299 of file GEO_VolumeSampler.h.

UT_Vector4D GEO_VolumeSampler::getValueV4 ( const UT_Vector3 pos)
inline

Definition at line 315 of file GEO_VolumeSampler.h.

int GEO_VolumeSampler::getVectorSize ( ) const
inline

Definition at line 153 of file GEO_VolumeSampler.h.

void GEO_VolumeSampler::indexToPos ( int  x,
int  y,
int  z,
UT_Vector3 pos 
) const
inline

Convert an index in the voxel array into the corresponding worldspace location

Definition at line 157 of file GEO_VolumeSampler.h.

void GEO_VolumeSampler::indexToPos ( exint  x,
exint  y,
exint  z,
UT_Vector3D pos 
) const
inline

Definition at line 171 of file GEO_VolumeSampler.h.

bool GEO_VolumeSampler::isActive ( const UT_Vector3 pos)
inline

Checks whether the given location falls within the volume's active region.

Definition at line 235 of file GEO_VolumeSampler.h.

bool GEO_VolumeSampler::isActiveAtIndex ( int  ix,
int  iy,
int  iz 
)
inline

Checks whether the given index is within the volume's active region.

Definition at line 245 of file GEO_VolumeSampler.h.

bool GEO_VolumeSampler::isBound ( )
inline

Definition at line 106 of file GEO_VolumeSampler.h.

GEO_VolumeSampler& GEO_VolumeSampler::operator= ( const GEO_VolumeSampler src)
inline

Definition at line 99 of file GEO_VolumeSampler.h.

void GEO_VolumeSampler::posToIndex ( UT_Vector3  pos,
int x,
int y,
int z 
) const
inline

Convert a 3d position into the closest index value.

Definition at line 187 of file GEO_VolumeSampler.h.

void GEO_VolumeSampler::posToIndex ( UT_Vector3  pos,
UT_Vector3 index 
) const
inline

Definition at line 194 of file GEO_VolumeSampler.h.

void GEO_VolumeSampler::posToIndex ( UT_Vector3D  pos,
exint x,
exint y,
exint z 
) const
inline

Definition at line 201 of file GEO_VolumeSampler.h.

void GEO_VolumeSampler::posToIndex ( UT_Vector3D  pos,
UT_Vector3D index 
) const
inline

Definition at line 208 of file GEO_VolumeSampler.h.

bool GEO_VolumeSampler::storesIntegers ( )
inline

Definition at line 111 of file GEO_VolumeSampler.h.

Member Data Documentation

const GEO_Primitive* GEO_VolumeSampler::myPrim
protected

Definition at line 430 of file GEO_VolumeSampler.h.

UT_UniquePtr<GEO_VolumeSamplerCache> GEO_VolumeSampler::mySamplerCache
protected

Definition at line 434 of file GEO_VolumeSampler.h.

const GEO_PrimVDB* GEO_VolumeSampler::myVdb
protected

Definition at line 432 of file GEO_VolumeSampler.h.

int GEO_VolumeSampler::myVectorSize
protected

Definition at line 433 of file GEO_VolumeSampler.h.

const GEO_PrimVolume* GEO_VolumeSampler::myVol
protected

Definition at line 431 of file GEO_VolumeSampler.h.


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