HDK
|
#include <SIM_RawIndexField.h>
Classes | |
struct | sim_buildActiveParms |
struct | sim_extrapActiveParms |
Public Types | |
typedef UT_Array< int64 > | Indices |
typedef SIM_VoxelBox | Box |
typedef UT_Array< Box > | Boxes |
typedef int64 | ScalarType |
Public Attributes | |
const UT_JobInfo & | info |
Protected Types | |
typedef exint | sim_extrapelem |
Static Protected Member Functions | |
static sim_extrapelem | indexToElement (const UT_VoxelArrayI &U, int x, int y, int z) |
static void | elementToIndex (const UT_VoxelArrayI &U, sim_extrapelem idx, int &x, int &y, int &z) |
Definition at line 41 of file SIM_RawIndexField.h.
typedef SIM_VoxelBox SIM_RawIndexField::Box |
Definition at line 45 of file SIM_RawIndexField.h.
typedef UT_Array<Box> SIM_RawIndexField::Boxes |
Definition at line 46 of file SIM_RawIndexField.h.
typedef UT_Array<int64> SIM_RawIndexField::Indices |
Definition at line 44 of file SIM_RawIndexField.h.
typedef int64 SIM_RawIndexField::ScalarType |
Definition at line 47 of file SIM_RawIndexField.h.
|
protected |
Definition at line 312 of file SIM_RawIndexField.h.
SIM_RawIndexField::SIM_RawIndexField | ( | ) |
|
virtual |
SIM_RawIndexField::SIM_RawIndexField | ( | const SIM_RawIndexField & | src | ) |
Copy constructor:
|
protected |
|
protected |
|
protected |
exint SIM_RawIndexField::buildIndex | ( | const SIM_RawField * | surface, |
const SIM_RawField * | collision | ||
) |
Builds from a surface & collision field. -1 if inside collision, -2 if not in collision and not in surface, otherwise a unique number. Returns maximum index (which you can also get from getMaxIndex)
exint SIM_RawIndexField::buildPartitionedIndex | ( | const SIM_RawField * | surface, |
const SIM_RawField * | collision | ||
) |
|
protected |
Given a set of connectivity classes, collapse into the minimal set and renumber from 0. myMaxIndex will be updated with the resulting maximum & the number of components returned.
exint SIM_RawIndexField::computeConnectedComponents | ( | const SIM_RawField & | surface | ) |
Computes the connected components of the given field. Anything with a value < 0 will be considered "inside" and connected to each other. Voxels with a value >= 0 will be flagged as being in component -1. The maxIndex will store the number of connected components.
exint SIM_RawIndexField::computeConnectedComponents | ( | const SIM_RawIndexField & | idx | ) |
Computes the connected components according to the given index values. Areas of -1, -2, and >=0 will be consdiered three different material types and connectivity computed respectively.
exint SIM_RawIndexField::computeConnectedComponentsWeighted | ( | const SIM_RawIndexField & | idx, |
const SIM_RawField * | weights[3], | ||
const SIM_RawIndexField * | sliceindex = 0 , |
||
int | thisslice = -1 |
||
) |
void SIM_RawIndexField::computeMetaConnected | ( | UT_IntArray & | metagroups, |
const SIM_RawIndexField & | idx | ||
) | const |
Computes connectivity of the -2 and >= 0 material types.
|
protected |
|
protected |
|
staticprotected |
|
protected |
void SIM_RawIndexField::extrapolateClosestPoints | ( | const SIM_RawIndexField * | altclosept, |
const GU_Detail * | gdp, | ||
const openvdb::tools::PointIndexGrid * | ptgridvdb, | ||
fpreal | uniformradius, | ||
fpreal | bandwidth, | ||
bool | rebuildsdf, | ||
SIM_RawField * | dest = NULL , |
||
const SIM_RawField::sim_particleToFieldParms * | parms = NULL |
||
) |
|
inline |
Definition at line 230 of file SIM_RawIndexField.h.
|
inline |
Definition at line 231 of file SIM_RawIndexField.h.
|
protected |
|
inline |
Definition at line 237 of file SIM_RawIndexField.h.
|
inline |
Definition at line 238 of file SIM_RawIndexField.h.
|
inline |
Definition at line 147 of file SIM_RawIndexField.h.
|
inline |
Definition at line 148 of file SIM_RawIndexField.h.
|
inline |
Definition at line 223 of file SIM_RawIndexField.h.
exint SIM_RawIndexField::getMemoryUsage | ( | ) | const |
|
inline |
Definition at line 235 of file SIM_RawIndexField.h.
|
inline |
Definition at line 240 of file SIM_RawIndexField.h.
void SIM_RawIndexField::getSamplePattern | ( | SIM_FieldSample | sample, |
int | x, | ||
int | y, | ||
int | z, | ||
int & | numsample, | ||
int * | ix, | ||
int * | iy, | ||
int * | iz, | ||
bool | clamp | ||
) | const |
Returns the set of samples in this field which correspond to the given location & sampling pattern. ix, iy, and iz should be size 8. If you want the deltas for the sampling pattern, call with x, y, z zero and clamp to false.
|
inline |
Definition at line 236 of file SIM_RawIndexField.h.
exint SIM_RawIndexField::getValue | ( | const UT_Vector3 & | pos | ) | const |
|
inline |
Definition at line 145 of file SIM_RawIndexField.h.
UT_Vector3I SIM_RawIndexField::getVoxelRes | ( | ) | const |
Returns the resolution of the voxel grid that we are sampling. This is a count of voxels, so may differ for our different sampling methods.
|
inline |
Definition at line 141 of file SIM_RawIndexField.h.
Consistently compute a world origin for what world space 0,0,0 would map to. A bit tricky as we want to avoid round off if we line up to 0.5... This is not necessarily 0,0,0.
|
inline |
Returns the actual number of samples in each resolution. Preferred over field()->getXRes() as it doesn't require a copy of the CE fields.
Definition at line 131 of file SIM_RawIndexField.h.
|
inline |
Definition at line 132 of file SIM_RawIndexField.h.
|
inline |
Definition at line 133 of file SIM_RawIndexField.h.
|
staticprotected |
bool SIM_RawIndexField::indexToPos | ( | int | x, |
int | y, | ||
int | z, | ||
UT_Vector3 & | pos | ||
) | const |
Convert indices to world coordinates and vice-versa. Note this uses this field's indices which change depending on sampling.
bool SIM_RawIndexField::indexToPos | ( | exint | x, |
exint | y, | ||
exint | z, | ||
UT_Vector3D & | pos | ||
) | const |
bool SIM_RawIndexField::indexToPos | ( | UT_Vector3I | index, |
UT_Vector3 & | pos | ||
) | const |
UT_Vector3 SIM_RawIndexField::indexToPos | ( | UT_Vector3I | index | ) | const |
void SIM_RawIndexField::init | ( | SIM_FieldSample | sample, |
const UT_Vector3 & | orig, | ||
const UT_Vector3 & | size, | ||
int | xres, | ||
int | yres, | ||
int | zres | ||
) |
Initializes the field. The resolution given is in terms of voxels, the actual dimensions of this field may be slightly different due to the sampling choice.
void SIM_RawIndexField::init | ( | SIM_FieldSample | sample, |
const UT_Vector3 & | orig, | ||
const UT_Vector3 & | size, | ||
int | xres, | ||
int | yres, | ||
int | zres, | ||
const UT_Vector3 & | voxelsize | ||
) |
void SIM_RawIndexField::init | ( | SIM_FieldSample | sample, |
const UT_Vector3 & | orig, | ||
const UT_Vector3 & | size, | ||
UT_VoxelArrayI * | voxels, | ||
const UT_Vector3 & | voxelsize | ||
) |
Initializes the field. Will gain ownership of the given voxel array.
|
protected |
bool SIM_RawIndexField::isAligned | ( | const SIM_RawIndexField * | field | ) | const |
Returns true if the two fields are precisely aligned. This means that samples are matched so a given integer index into either field would give the same result.
bool SIM_RawIndexField::isAligned | ( | const SIM_RawField * | field | ) | const |
bool SIM_RawIndexField::isColocated | ( | const SIM_RawField * | field, |
UT_Vector3I & | offset | ||
) | const |
Returns true if two fields have voxels aligned. They do not have to be of the same resolution or share origin. However, using the offset
allows to access this field with index of the other field. i.e. field->indexToPos(index) == this->indexToPos(index + offset)
bool SIM_RawIndexField::isColocated | ( | const SIM_RawIndexField * | field, |
UT_Vector3I & | offset | ||
) | const |
bool SIM_RawIndexField::isMatching | ( | const SIM_RawIndexField * | field | ) | const |
Returns true if the given field and this one match in terms of number of voxels and bounding box size. This means the voxel cells match - not necessarily the sample points!
bool SIM_RawIndexField::isMatching | ( | const SIM_RawField * | field | ) | const |
Returns true if the given x, y, z values lie inside the valid index.
Definition at line 153 of file SIM_RawIndexField.h.
void SIM_RawIndexField::match | ( | const SIM_RawField & | src | ) |
Initialize this to be the same dimension and sampling patern as the given field.
void SIM_RawIndexField::match | ( | const SIM_RawIndexField & | src | ) |
|
inline |
Definition at line 233 of file SIM_RawIndexField.h.
Definition at line 219 of file SIM_RawIndexField.h.
const SIM_RawIndexField& SIM_RawIndexField::operator= | ( | const SIM_RawIndexField & | src | ) |
Assigment operator:
bool SIM_RawIndexField::posToIndex | ( | UT_Vector3 | pos, |
int & | x, | ||
int & | y, | ||
int & | z | ||
) | const |
Converts a worldspace position into an integer index.
UT_Vector3I SIM_RawIndexField::posToIndex | ( | UT_Vector3 | pos | ) | const |
|
inline |
Definition at line 149 of file SIM_RawIndexField.h.
|
inline |
Definition at line 142 of file SIM_RawIndexField.h.
Determines if two indices should be connected using our empty cell merge rule.
|
inline |
Returns true if this should be multithreaded.
Definition at line 214 of file SIM_RawIndexField.h.
UT_VoxelArrayI* SIM_RawIndexField::steal | ( | ) |
Steals the voxel array, leaving this pointing to a 0 constant array.
SIM_RawIndexField::THREADED_METHOD1 | ( | SIM_RawIndexField | , |
shouldMultiThread() | , | ||
buildCollisionLookup | , | ||
const SIM_RawField * | , | ||
collision | |||
) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const UT_JobInfo& SIM_RawIndexField::info |
Definition at line 190 of file SIM_RawIndexField.h.
|
protected |
Definition at line 287 of file SIM_RawIndexField.h.
|
protected |
Definition at line 287 of file SIM_RawIndexField.h.
|
protected |
Definition at line 278 of file SIM_RawIndexField.h.
|
protected |
Definition at line 280 of file SIM_RawIndexField.h.
|
protected |
Definition at line 284 of file SIM_RawIndexField.h.
|
protected |
Definition at line 279 of file SIM_RawIndexField.h.
|
protected |
Definition at line 284 of file SIM_RawIndexField.h.
|
protected |
Definition at line 291 of file SIM_RawIndexField.h.
|
protected |
Definition at line 290 of file SIM_RawIndexField.h.