#include <SIM_ScalarField.h>

Public Member Functions | |
| GETSET_DATA_FUNCS_I (SIM_NAME_UNIFORMVOXELS, UniformVoxels) | |
| Control the number of divisions. | |
| GETSET_DATA_FUNCS_B (SIM_NAME_TWOD, TwoDField) | |
| GETSET_DATA_FUNCS_I (SIM_NAME_VOXELPLANE, VoxelPlane) | |
| GETSET_DATA_FUNCS_V3 (SIM_NAME_DIV, RawDivisions) | |
| GETSET_DATA_FUNCS_I ("uniformdiv", RawUniformDivisions) | |
| GETSET_DATA_FUNCS_V3 (SIM_NAME_CENTER, RawCenter) | |
| GETSET_DATA_FUNCS_V3 (SIM_NAME_SIZE, RawSize) | |
| GETSET_DATA_FUNCS_V3 ("slicediv", SliceDivisions) | |
| GETSET_DATA_FUNCS_V3 ("sliceoverlapneg", SliceOverlapNeg) | |
| GETSET_DATA_FUNCS_V3 ("sliceoverlappos", SliceOverlapPos) | |
| GETSET_DATA_FUNCS_I (SIM_NAME_VOXELSAMPLE, VoxelSampleRaw) | |
| GETSET_DATA_FUNCS_F ("initialvalue", InitialValue) | |
| GETSET_DATA_FUNCS_F (SIM_NAME_TOLERANCE, Tolerance) | |
| GETSET_DATA_FUNCS_I ("border", RawBorder) | |
| UT_VoxelBorderType | getBorder () const |
| void | getBBox (UT_BoundingBox &bbox) const |
| UT_Vector3 | getOrig () const |
| UT_Vector3 | getDivisions () const |
| UT_Vector3 | getSize () const |
| UT_Vector3 | getCenter () const |
| void | setDivisions (const UT_Vector3 &div) |
| void | setSize (const UT_Vector3 &size) |
| void | setCenter (const UT_Vector3 ¢er) |
| void | resizeKeepData (const UT_Vector3 &size, const UT_Vector3 ¢er) |
| void | matchField (const SIM_ScalarField *field, bool matchsample=false) |
| void | matchField (const SIM_VectorField *field) |
| void | matchField (const SIM_MatrixField *field) |
| void | matchField (const SIM_IndexField *field) |
| SIM_FieldSample | getVoxelSample () const |
| const UT_Vector3 & | getVoxelSize () const |
| fpreal | getVoxelDiameter () const |
| fpreal | getValue (const UT_Vector3 &pos) const |
| UT_Vector3 | getGradient (const UT_Vector3 &pos) const |
| Determines the gradient at the given location. | |
| void | advect (const SIM_VectorField *vel, fpreal timestep, const SIM_RawField *collision=0, SIM_FieldAdvection advectmethod=SIM_ADVECT_TRACE) |
| Advects this field by the other given field. | |
| void | advect (sim_PointVelocity getVelocity, fpreal timestep, fpreal voxelsize, const SIM_RawField *collision=0) |
| void | enforceBoundary (const SIM_ScalarField *collision=0, const SIM_ScalarField *colvalue=0) |
| Enforces the boundary condition with the given collision mask. | |
| bool | indexToPos (int x, int y, int z, UT_Vector3 &pos) const |
| Converts an integer index into a worldspace position. | |
| bool | posToIndex (const UT_Vector3 &pos, int &x, int &y, int &z) const |
| Converts a worldspace position into an integer index. | |
| SIM_RawField * | getField () const |
| Retrieve raw field. | |
| void | setField (SIM_RawField *field) |
| Sets the field to the given field, gaining ownership of it. | |
| SIM_RawField * | stealField () |
| void | pubHandleModification () |
| Signals to the field that it has been altered externally. | |
| GU_ConstDetailHandle | createSmokeRepresentation (const SIM_RootData &root) const |
| Creates a GDP with us as a Volume Primitive inside it. | |
| void | addSmokeRepresentation (const SIM_RootData &root, GU_Detail *gdp) const |
Protected Member Functions | |
| SIM_ScalarField (const SIM_DataFactory *factory) | |
| virtual | ~SIM_ScalarField () |
| virtual void | initializeSubclass () |
| Overrides to properly implement this class as a SIM_Data. | |
| virtual void | makeEqualSubclass (const SIM_Data *source) |
| myField aware copy constructor. | |
| virtual void | saveSubclass (ostream &os) const |
| Saves our attributes, and our internal data if it has been set. | |
| virtual bool | loadSubclass (UT_IStream &is) |
| Loads our attributes and internal data if it was set when we saved. | |
| virtual int64 | getMemorySizeSubclass () const |
| virtual void | optionChangedSubclass (const char *name) |
| Override the setDivisions to rebuild our voxel array on demand. | |
Definition at line 38 of file SIM_ScalarField.h.
| SIM_ScalarField::SIM_ScalarField | ( | const SIM_DataFactory * | factory | ) | [explicit, protected] |
| virtual SIM_ScalarField::~SIM_ScalarField | ( | ) | [protected, virtual] |
| void SIM_ScalarField::addSmokeRepresentation | ( | const SIM_RootData & | root, | |
| GU_Detail * | gdp | |||
| ) | const |
Adds a volume primitive version of our field to the given gdp.
| void SIM_ScalarField::advect | ( | sim_PointVelocity | getVelocity, | |
| fpreal | timestep, | |||
| fpreal | voxelsize, | |||
| const SIM_RawField * | collision = 0 | |||
| ) |
| void SIM_ScalarField::advect | ( | const SIM_VectorField * | vel, | |
| fpreal | timestep, | |||
| const SIM_RawField * | collision = 0, |
|||
| SIM_FieldAdvection | advectmethod = SIM_ADVECT_TRACE | |||
| ) |
Advects this field by the other given field.
| GU_ConstDetailHandle SIM_ScalarField::createSmokeRepresentation | ( | const SIM_RootData & | root | ) | const |
Creates a GDP with us as a Volume Primitive inside it.
| void SIM_ScalarField::enforceBoundary | ( | const SIM_ScalarField * | collision = 0, |
|
| const SIM_ScalarField * | colvalue = 0 | |||
| ) |
Enforces the boundary condition with the given collision mask.
| void SIM_ScalarField::getBBox | ( | UT_BoundingBox & | bbox | ) | const |
Controls the dimensions of where the field is properly defined in the field space.
| UT_VoxelBorderType SIM_ScalarField::getBorder | ( | ) | const [inline] |
Definition at line 60 of file SIM_ScalarField.h.
| UT_Vector3 SIM_ScalarField::getCenter | ( | ) | const |
| UT_Vector3 SIM_ScalarField::getDivisions | ( | ) | const |
Calculate the size and divisions according to options such as 2d or equal sized voxels.
| SIM_RawField* SIM_ScalarField::getField | ( | ) | const [inline] |
| UT_Vector3 SIM_ScalarField::getGradient | ( | const UT_Vector3 & | pos | ) | const |
Determines the gradient at the given location.
| virtual int64 SIM_ScalarField::getMemorySizeSubclass | ( | ) | const [protected, virtual] |
Override this function to return an accurate representation of the amount of memory used by this piece of data. The size of subdata should not be included in this calculation.
Reimplemented from SIM_Data.
| UT_Vector3 SIM_ScalarField::getOrig | ( | ) | const [inline] |
Definition at line 66 of file SIM_ScalarField.h.
| SIM_ScalarField::GETSET_DATA_FUNCS_B | ( | SIM_NAME_TWOD | , | |
| TwoDField | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_F | ( | SIM_NAME_TOLERANCE | , | |
| Tolerance | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_F | ( | "initialvalue" | , | |
| InitialValue | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_I | ( | "border" | , | |
| RawBorder | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_I | ( | SIM_NAME_VOXELSAMPLE | , | |
| VoxelSampleRaw | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_I | ( | "uniformdiv" | , | |
| RawUniformDivisions | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_I | ( | SIM_NAME_VOXELPLANE | , | |
| VoxelPlane | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_I | ( | SIM_NAME_UNIFORMVOXELS | , | |
| UniformVoxels | ||||
| ) |
Control the number of divisions.
| SIM_ScalarField::GETSET_DATA_FUNCS_V3 | ( | "sliceoverlappos" | , | |
| SliceOverlapPos | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_V3 | ( | "sliceoverlapneg" | , | |
| SliceOverlapNeg | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_V3 | ( | "slicediv" | , | |
| SliceDivisions | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_SIZE | , | |
| RawSize | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_CENTER | , | |
| RawCenter | ||||
| ) |
| SIM_ScalarField::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_DIV | , | |
| RawDivisions | ||||
| ) |
| UT_Vector3 SIM_ScalarField::getSize | ( | ) | const |
| fpreal SIM_ScalarField::getValue | ( | const UT_Vector3 & | pos | ) | const |
Access the field value given a world space location. This does trilinear interpolation.
| fpreal SIM_ScalarField::getVoxelDiameter | ( | ) | const |
| SIM_FieldSample SIM_ScalarField::getVoxelSample | ( | ) | const |
| const UT_Vector3& SIM_ScalarField::getVoxelSize | ( | ) | const |
| bool SIM_ScalarField::indexToPos | ( | int | x, | |
| int | y, | |||
| int | z, | |||
| UT_Vector3 & | pos | |||
| ) | const |
Converts an integer index into a worldspace position.
| virtual void SIM_ScalarField::initializeSubclass | ( | ) | [protected, virtual] |
| virtual bool SIM_ScalarField::loadSubclass | ( | UT_IStream & | is | ) | [protected, virtual] |
| virtual void SIM_ScalarField::makeEqualSubclass | ( | const SIM_Data * | source | ) | [protected, virtual] |
| void SIM_ScalarField::matchField | ( | const SIM_IndexField * | field | ) |
| void SIM_ScalarField::matchField | ( | const SIM_MatrixField * | field | ) |
| void SIM_ScalarField::matchField | ( | const SIM_VectorField * | field | ) |
| void SIM_ScalarField::matchField | ( | const SIM_ScalarField * | field, | |
| bool | matchsample = false | |||
| ) |
Match this field to the given reference field. We will end up with the same size/divisions/twod/uniform, but not the same sampling pattern This will destroy our field data.
| virtual void SIM_ScalarField::optionChangedSubclass | ( | const char * | name | ) | [protected, virtual] |
| bool SIM_ScalarField::posToIndex | ( | const UT_Vector3 & | pos, | |
| int & | x, | |||
| int & | y, | |||
| int & | z | |||
| ) | const |
Converts a worldspace position into an integer index.
| void SIM_ScalarField::pubHandleModification | ( | ) | [inline] |
Signals to the field that it has been altered externally.
Definition at line 140 of file SIM_ScalarField.h.
| void SIM_ScalarField::resizeKeepData | ( | const UT_Vector3 & | size, | |
| const UT_Vector3 & | center | |||
| ) |
Resizes our field keeping our field data. The final size will be an integer number of voxels matching our current voxel size. The final center will be an integer number of voxel offset from our current center. This allows us to do a perfect copy of the data.
| virtual void SIM_ScalarField::saveSubclass | ( | ostream & | os | ) | const [protected, virtual] |
| void SIM_ScalarField::setCenter | ( | const UT_Vector3 & | center | ) |
| void SIM_ScalarField::setDivisions | ( | const UT_Vector3 & | div | ) |
Adjusts the size/divisions of this field, overriding and twod or uniform voxel settings.
| void SIM_ScalarField::setField | ( | SIM_RawField * | field | ) |
Sets the field to the given field, gaining ownership of it.
| void SIM_ScalarField::setSize | ( | const UT_Vector3 & | size | ) |
| SIM_RawField* SIM_ScalarField::stealField | ( | ) |
Steals the field, replacing this copy with an empty field and returning the old version.
1.5.9