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

#include <SIM_FieldSampler.h>

+ Inheritance diagram for SIM_VectorFieldSampler:

Public Member Functions

 SIM_VectorFieldSampler ()
 
 SIM_VectorFieldSampler (const SIM_RawField *target, const SIM_VectorField *source)
 These constructors also initialize the sampler for immediate use. More...
 
 SIM_VectorFieldSampler (const SIM_RawIndexField *target, const SIM_VectorField *source)
 
 ~SIM_VectorFieldSampler ()
 The destructor. More...
 
void init (const SIM_RawField *target, const SIM_VectorField *source)
 
void init (const SIM_RawIndexField *target, const SIM_VectorField *source)
 
SYS_FORCE_INLINE UT_Vector3 getValue (int x, int y, int z)
 
SYS_FORCE_INLINE UT_Vector3 getValue (const UT_VoxelArrayIteratorF &iter)
 Returns value of the source field at the current voxel of the iterator. More...
 
SYS_FORCE_INLINE UT_Vector3 getValue (float x, float y, float z)
 
SYS_FORCE_INLINE UT_Vector3 getValue (const UT_Vector3 &p)
 
SYS_FORCE_INLINE bool isTileConstant (const UT_VoxelArrayIteratorF &iter, UT_Vector3 &val)
 

Protected Attributes

UT_UniquePtr
< SIM_VFSImplementation
mySampler
 

Detailed Description

This class is an efficient relative vector field sampler. It samples the source field, given coordinates in index space of the target (or an iterator running over the target field).

Definition at line 215 of file SIM_FieldSampler.h.

Constructor & Destructor Documentation

SIM_VectorFieldSampler::SIM_VectorFieldSampler ( )
inline

Default constructor; init() method must be called before the sampler is usable.

Definition at line 220 of file SIM_FieldSampler.h.

SIM_VectorFieldSampler::SIM_VectorFieldSampler ( const SIM_RawField target,
const SIM_VectorField source 
)
inline

These constructors also initialize the sampler for immediate use.

Definition at line 225 of file SIM_FieldSampler.h.

SIM_VectorFieldSampler::SIM_VectorFieldSampler ( const SIM_RawIndexField target,
const SIM_VectorField source 
)
inline

Definition at line 230 of file SIM_FieldSampler.h.

SIM_VectorFieldSampler::~SIM_VectorFieldSampler ( )
inline

The destructor.

Definition at line 237 of file SIM_FieldSampler.h.

Member Function Documentation

SYS_FORCE_INLINE UT_Vector3 SIM_VectorFieldSampler::getValue ( int  x,
int  y,
int  z 
)
inline

Returns value of the source field at the given (exact) coordinates of the target field.

Definition at line 255 of file SIM_FieldSampler.h.

SYS_FORCE_INLINE UT_Vector3 SIM_VectorFieldSampler::getValue ( const UT_VoxelArrayIteratorF iter)
inline

Returns value of the source field at the current voxel of the iterator.

Definition at line 261 of file SIM_FieldSampler.h.

SYS_FORCE_INLINE UT_Vector3 SIM_VectorFieldSampler::getValue ( float  x,
float  y,
float  z 
)
inline

Returns value of the source field at the given coordinates of the target field.

Definition at line 268 of file SIM_FieldSampler.h.

SYS_FORCE_INLINE UT_Vector3 SIM_VectorFieldSampler::getValue ( const UT_Vector3 p)
inline

Returns value of the source field at the given coordinates of the target field.

Definition at line 275 of file SIM_FieldSampler.h.

void SIM_VectorFieldSampler::init ( const SIM_RawField target,
const SIM_VectorField source 
)
inline

Initialization routines that must be called before the sampler can be used. Note that constructors that accept field pointers call init() to ensure that the object is ready for use.

Definition at line 244 of file SIM_FieldSampler.h.

void SIM_VectorFieldSampler::init ( const SIM_RawIndexField target,
const SIM_VectorField source 
)
inline

Definition at line 248 of file SIM_FieldSampler.h.

SYS_FORCE_INLINE bool SIM_VectorFieldSampler::isTileConstant ( const UT_VoxelArrayIteratorF iter,
UT_Vector3 val 
)
inline

Returns true if the source field is constant within the current tile of the target iterator. If it's constant, the constant value is stored in val. Note that this method doesn't exhaustively look into voxels, but only checks for compressed ones.

Definition at line 284 of file SIM_FieldSampler.h.

Member Data Documentation

UT_UniquePtr<SIM_VFSImplementation> SIM_VectorFieldSampler::mySampler
protected

Definition at line 294 of file SIM_FieldSampler.h.


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