HDK
|
Public Member Functions | |
template<typename T > | |
__linearTileIndexConverter (const UT_VoxelArray< T > *dst, const UT_VoxelArray< T > *src, int xoff, int yoff, int zoff) | |
int | getNTilesBP () const |
Returns the number of tiles in each part. More... | |
int | getNTilesIP () const |
void | toLinearBP (int k, int &x, int &y, int &z) const |
void | toLinearIP (int k, int &x, int &y, int &z) const |
Static Protected Member Functions | |
static void | _toRegularLinear (int k, int xdim, int ydim, int &x, int &y, int &z) |
Protected Attributes | |
int | myXMax |
int | myYMax |
int | myZMax |
int | myXSkipMin |
int | myYSkipMin |
int | myZSkipMin |
int | myXSkipLen |
int | myYSkipLen |
int | myZSkipLen |
This helper class can be used for iterating over a voxel array in relation to another one. In particular, dst is the destination voxel array that is to be iterated over; its tile at [X, Y, Z] is taken to be coincident with tile [X + xoff, Y + yoff, Z + zoff] of src. Tiles of dst are partitioned into two sets:
This class can be roughly used as follows... Main function:
__linearTileIndexConverter index(dst, src, xoff, yoff, zoff); customFunctionBP(..., index); customFunctionIP(..., index);
BPPartial(..., const __linearTileIndexConverter& index, const UT_JobInfo& i) function:
int t0, t1; i.divideWork(index.getNTilesBP(), t0, t1); for (int j = t0; j < t1; j++) { int x, y, z; index.toLinearBP(j, x, y, z); UT_VoxerTile<T>* dtile = src.getTile(x, y, z); ... }
With a similar implementation for IP. See moveTilesWithOffset() for an example.
Definition at line 5105 of file UT_VoxelArray.C.
|
inline |
Creates an index converter from the given voxel arrays. This object partitions tiles of dst into those that are affected by
Definition at line 5111 of file UT_VoxelArray.C.
|
inlinestaticprotected |
Definition at line 5207 of file UT_VoxelArray.C.
|
inline |
Returns the number of tiles in each part.
Definition at line 5134 of file UT_VoxelArray.C.
|
inline |
Definition at line 5138 of file UT_VoxelArray.C.
Converts a linear index (between 0 and getNTiles*P()-1) to the [X, Y, Z] tile coordinate with respect to dst.
Definition at line 5145 of file UT_VoxelArray.C.
Definition at line 5198 of file UT_VoxelArray.C.
|
protected |
Definition at line 5216 of file UT_VoxelArray.C.
|
protected |
Definition at line 5218 of file UT_VoxelArray.C.
|
protected |
Definition at line 5217 of file UT_VoxelArray.C.
|
protected |
Definition at line 5216 of file UT_VoxelArray.C.
|
protected |
Definition at line 5218 of file UT_VoxelArray.C.
|
protected |
Definition at line 5217 of file UT_VoxelArray.C.
|
protected |
Definition at line 5216 of file UT_VoxelArray.C.
|
protected |
Definition at line 5218 of file UT_VoxelArray.C.
|
protected |
Definition at line 5217 of file UT_VoxelArray.C.