HDK
|
#include <UT_VoxelArray.h>
Public Member Functions | |
UT_VoxelProbe () | |
UT_VoxelProbe (UT_VoxelArray< T > *vox, int prex=0, int postx=0) | |
~UT_VoxelProbe () | |
void | setArray (UT_VoxelArray< T > *vox, int prex=0, int postx=0) |
void | setConstArray (const UT_VoxelArray< T > *vox, int prex=0, int postx=0) |
UT_VoxelArray< T > * | getArray () const |
bool | isValid () const |
T | getValue () const |
T | getValue (int offset) const |
void | setValue (T value) |
template<typename S > | |
bool | setIndex (UT_VoxelArrayIterator< S > &vit) |
template<typename S > | |
bool | setIndex (UT_VoxelTileIterator< S > &vit) |
bool | setIndex (int x, int y, int z) |
void | advanceX () |
Blindly advances our current pointer. More... | |
void | resetX (int x) |
Protected Member Functions | |
void | reloadCache (int x, int y, int z) |
void | writeCacheLine () |
void | buildConstantCache (T value) |
Protected Attributes | |
T * | myCurLine |
T * | myCacheLine |
T * | myAllocCacheLine |
int | myX |
int | myY |
int | myZ |
int | myPreX |
int | myPostX |
int | myStride |
bool | myForceCopy |
int | myMinValidX |
Half inclusive [,) range of valid x queries for current cache. More... | |
int | myMaxValidX |
bool | myDirty |
UT_VoxelArray< T > * | myArray |
Friends | |
class | UT_VoxelProbeCube< T > |
class | UT_VoxelProbeFace< T > |
Probe for Voxel Arrays
This class is designed to allow for efficient evaluation of aligned indices of a voxel array, provided the voxels are iterated in a tile-by-tile, x-inner most, manner.
This class will create a local copy of the voxel data where needed, uncompressing the information once for every 16 queries. It will also create an aligned buffer so you can safely use v4uf on fpreal32 data.
For queries where you need surrounding values, the prex and postx can specify padding on the probe. prex should be -1 to allow reading -1 offset, postx 1 to allow reading a 1 offset.
Definition at line 81 of file UT_VoxelArray.h.
UT_VoxelProbe< T, DoRead, DoWrite, TestForWrite >::UT_VoxelProbe | ( | ) |
UT_VoxelProbe< T, DoRead, DoWrite, TestForWrite >::UT_VoxelProbe | ( | UT_VoxelArray< T > * | vox, |
int | prex = 0 , |
||
int | postx = 0 |
||
) |
UT_VoxelProbe< T, DoRead, DoWrite, TestForWrite >::~UT_VoxelProbe | ( | ) |
|
inline |
Blindly advances our current pointer.
Definition at line 2269 of file UT_VoxelArray.h.
|
protected |
|
inline |
Definition at line 2233 of file UT_VoxelArray.h.
|
inline |
Definition at line 2237 of file UT_VoxelArray.h.
|
inline |
Definition at line 2241 of file UT_VoxelArray.h.
|
inline |
Definition at line 2235 of file UT_VoxelArray.h.
|
protected |
|
inline |
Adjusts our current pointer to the given absolute location, assumes the new value is inside our valid range.
Definition at line 2278 of file UT_VoxelArray.h.
void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrite >::setArray | ( | UT_VoxelArray< T > * | vox, |
int | prex = 0 , |
||
int | postx = 0 |
||
) |
|
inline |
Definition at line 2226 of file UT_VoxelArray.h.
|
inline |
Resets where we currently point to. Returns true if we had to reset our cache line. If we didn't, and you have multiple probes acting in-step, you can just advanceX() the other probes
Definition at line 2260 of file UT_VoxelArray.h.
|
inline |
Definition at line 2263 of file UT_VoxelArray.h.
bool UT_VoxelProbe< T, DoRead, DoWrite, TestForWrite >::setIndex | ( | int | x, |
int | y, | ||
int | z | ||
) |
|
inline |
Definition at line 2246 of file UT_VoxelArray.h.
|
protected |
|
friend |
Definition at line 2313 of file UT_VoxelArray.h.
|
friend |
Definition at line 2314 of file UT_VoxelArray.h.
|
protected |
Where we actually allocated our cache line, aligned to 4x multiple to ensure SSE compatible.
Definition at line 2298 of file UT_VoxelArray.h.
|
protected |
Definition at line 2311 of file UT_VoxelArray.h.
|
protected |
myCacheLine[0] is the start of the cache line, so -1 would be the first pre-rolled value
Definition at line 2295 of file UT_VoxelArray.h.
|
protected |
Definition at line 2292 of file UT_VoxelArray.h.
|
protected |
Determines if we have anything to write back, only valid if TestForWrites is enabled.
Definition at line 2309 of file UT_VoxelArray.h.
|
protected |
Definition at line 2303 of file UT_VoxelArray.h.
|
protected |
Definition at line 2305 of file UT_VoxelArray.h.
|
protected |
Half inclusive [,) range of valid x queries for current cache.
Definition at line 2305 of file UT_VoxelArray.h.
|
protected |
Definition at line 2301 of file UT_VoxelArray.h.
|
protected |
Definition at line 2301 of file UT_VoxelArray.h.
|
protected |
Definition at line 2302 of file UT_VoxelArray.h.
|
protected |
Definition at line 2300 of file UT_VoxelArray.h.
|
protected |
Definition at line 2300 of file UT_VoxelArray.h.
|
protected |
Definition at line 2300 of file UT_VoxelArray.h.