#include <UT_VoxelArray.h>
Public Member Functions | |
| UT_VoxelProbe () | |
| UT_VoxelProbe (UT_VoxelArray< T > *vox, int prex=0, int postx=0) | |
| virtual | ~UT_VoxelProbe () |
| void | setArray (UT_VoxelArray< T > *vox, int prex=0, int postx=0) |
| T | getValue () const |
| T | getValue (int offset) const |
| void | setValue (T value) |
| template<typename S > | |
| bool | setIndex (UT_VoxelArrayIterator< S > &vit) |
| bool | setIndex (int x, int y, int z) |
| void | advanceX () |
| Blindly advances our current pointer. | |
| 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. | |
| int | myMaxValidX |
| bool | myDirty |
| UT_VoxelArray< T > * | myArray |
Friends | |
| class | UT_VoxelProbeCube< T > |
| class | UT_VoxelProbeFace< T > |
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 1013 of file UT_VoxelArray.h.
| UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::UT_VoxelProbe | ( | ) | [inline] |
UT_VoxelProbe methods
Definition at line 2607 of file UT_VoxelArray.C.
| UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::UT_VoxelProbe | ( | UT_VoxelArray< T > * | vox, | |
| int | prex = 0, |
|||
| int | postx = 0 | |||
| ) | [inline] |
Definition at line 2615 of file UT_VoxelArray.C.
| UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::~UT_VoxelProbe | ( | ) | [inline, virtual] |
Definition at line 2626 of file UT_VoxelArray.C.
| void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::advanceX | ( | ) | [inline] |
| void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::buildConstantCache | ( | T | value | ) | [inline, protected] |
Definition at line 2977 of file UT_VoxelArray.C.
| T UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::getValue | ( | int | offset | ) | const [inline] |
Definition at line 1026 of file UT_VoxelArray.h.
| T UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::getValue | ( | ) | const [inline] |
| void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::reloadCache | ( | int | x, | |
| int | y, | |||
| int | z | |||
| ) | [inline, protected] |
Definition at line 2713 of file UT_VoxelArray.C.
| void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::resetX | ( | int | x | ) | [inline] |
Adjusts our current pointer to the given absolute location, assumes the new value is inside our valid range.
Definition at line 1060 of file UT_VoxelArray.h.
| void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::setArray | ( | UT_VoxelArray< T > * | vox, | |
| int | prex = 0, |
|||
| int | postx = 0 | |||
| ) | [inline] |
| bool UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::setIndex | ( | int | x, | |
| int | y, | |||
| int | z | |||
| ) | [inline] |
Definition at line 2670 of file UT_VoxelArray.C.
| bool UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::setIndex | ( | UT_VoxelArrayIterator< S > & | vit | ) | [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 1045 of file UT_VoxelArray.h.
| void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::setValue | ( | T | value | ) | [inline] |
Definition at line 1031 of file UT_VoxelArray.h.
| void UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::writeCacheLine | ( | ) | [inline, protected] |
Definition at line 3005 of file UT_VoxelArray.C.
friend class UT_VoxelProbeCube< T > [friend] |
Definition at line 1095 of file UT_VoxelArray.h.
friend class UT_VoxelProbeFace< T > [friend] |
Definition at line 1096 of file UT_VoxelArray.h.
T* UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myAllocCacheLine [protected] |
Where we actually allocated our cache line, aligned to 4x multiple to ensure SSE compatible.
Definition at line 1080 of file UT_VoxelArray.h.
UT_VoxelArray<T>* UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myArray [protected] |
Definition at line 1093 of file UT_VoxelArray.h.
T* UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myCacheLine [protected] |
myCacheLine[0] is the start of the cache line, so -1 would be the first pre-rolled value
Definition at line 1077 of file UT_VoxelArray.h.
T* UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myCurLine [protected] |
Definition at line 1074 of file UT_VoxelArray.h.
bool UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myDirty [protected] |
Determines if we have anything to write back, only valid if TestForWrites is enabled.
Definition at line 1091 of file UT_VoxelArray.h.
bool UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myForceCopy [protected] |
Definition at line 1085 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myMaxValidX [protected] |
Definition at line 1087 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myMinValidX [protected] |
Half inclusive [,) range of valid x queries for current cache.
Definition at line 1087 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myPostX [protected] |
Definition at line 1083 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myPreX [protected] |
Definition at line 1083 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myStride [protected] |
Definition at line 1084 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myX [protected] |
Definition at line 1082 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myY [protected] |
Definition at line 1082 of file UT_VoxelArray.h.
int UT_VoxelProbe< T, DoRead, DoWrite, TestForWrites >::myZ [protected] |
Definition at line 1082 of file UT_VoxelArray.h.
1.5.9