#include <SIM_VectorField.h>

Definition at line 41 of file SIM_VectorField.h.
| SIM_VectorField::SIM_VectorField | ( | const SIM_DataFactory * | factory | ) | [explicit, protected] |
| virtual SIM_VectorField::~SIM_VectorField | ( | ) | [protected, virtual] |
| void SIM_VectorField::addSmokeRepresentation | ( | const SIM_RootData & | root, | |
| GU_Detail * | gdp | |||
| ) | const |
Adds a volume primitive version of our field to the given gdp.
| void SIM_VectorField::addToCell | ( | int | x, | |
| int | y, | |||
| int | z, | |||
| const UT_Vector3 & | dv | |||
| ) |
Adds a velocity to the given *voxel*. If this is face, it is divided in two and spread on each of 6 faces. If it is corner, it is divided by 8 and spread along each of 8 corners.
| void SIM_VectorField::advect | ( | sim_PointVelocity | getVelocity, | |
| fpreal | timestep, | |||
| fpreal | voxelsize, | |||
| const SIM_RawField * | collision = 0 | |||
| ) |
| void SIM_VectorField::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. Handles the possibility that the other field is this field.
| void SIM_VectorField::advect | ( | UT_Vector3 & | pos, | |
| fpreal | time | |||
| ) | const |
Treats this field as a velocity field and advects the given position for the given length of time. Uses first order explicit euler integration
| void SIM_VectorField::advectMidpoint | ( | UT_Vector3 & | pos, | |
| fpreal | time | |||
| ) | const |
Uses second order explicity runge-kutta integration.
| GU_ConstDetailHandle SIM_VectorField::createSmokeRepresentation | ( | const SIM_RootData & | root | ) | const |
Creates a GDP with us as a Volume Primitive inside it.
| void SIM_VectorField::distributeBoundaryDivergenceToSurfaceFace | ( | SIM_RawField & | div, | |
| const SIM_RawField * | pressureboundary, | |||
| const SIM_RawField * | collision, | |||
| int | compnum, | |||
| const UT_VoxelArray< int64 > & | comp | |||
| ) |
Distributes any divergence in the boundary condition among all voxels that are on the boundary of the pressureboundary but not on the collision boundary.
| void SIM_VectorField::distributeBoundaryDivergenceToVolumeFace | ( | SIM_RawField & | div, | |
| const SIM_RawField * | pressureboundary = 0, |
|||
| int | compnum = -1, |
|||
| const SIM_RawIndexField * | comp = 0 | |||
| ) |
Distributes any divergence in the boundary condition among all voxels equally.
| void SIM_VectorField::enforceBoundary | ( | const SIM_ScalarField * | collision = 0, |
|
| const SIM_VectorField * | cvel = 0 | |||
| ) |
Enforces boundary conditions on the array.
| void SIM_VectorField::enforceVelBoundary | ( | const SIM_ScalarField * | collision, | |
| UT_Vector3 | calcVelocityconst UT_Vector3 &pos, void *vp, | |||
| void * | vvp, | |||
| void | calcPhysParmsconst UT_Vector3 &pos, void *vp, fpreal &bounce, fpreal &friction, fpreal &dynfriction, | |||
| void * | vpp, | |||
| bool | forbidinterference | |||
| ) |
Enforces boundary conditions on a velocity field by making sure we are lifting from the surface, allowing tangential motion. forbidinterference keeps the normal enforcement behaviour of explicitly setting all side boundaries that have a inward pointing velocity to zero relative motion.
| void SIM_VectorField::getBBox | ( | UT_BoundingBox & | bbox | ) | const |
Controls the dimensions of where the field is properly defined in the field space.
| UT_VoxelBorderType SIM_VectorField::getBorder | ( | ) | const [inline] |
Definition at line 80 of file SIM_VectorField.h.
| UT_Vector3 SIM_VectorField::getCellValue | ( | int | x, | |
| int | y, | |||
| int | z | |||
| ) | const |
Gets the velocity at the given *voxel* location, interpolating if we have corner or face velocities.
| UT_Vector3 SIM_VectorField::getCenter | ( | ) | const |
| UT_Vector3 SIM_VectorField::getCurl | ( | const UT_Vector3 & | pos | ) | const |
Computes the curl at a given worldspace.
| UT_Vector3 SIM_VectorField::getDivisions | ( | ) | const |
Calculate the size and divisions according to options such as 2d or equal sized voxels.
| SIM_RawField* SIM_VectorField::getField | ( | int | axis | ) | const [inline] |
Retrieve raw field.
Definition at line 274 of file SIM_VectorField.h.
| UT_DMatrix3 SIM_VectorField::getGradient | ( | const UT_Vector3 & | pos | ) | const |
Computes the gradient of the vector field in world space..
| virtual int64 SIM_VectorField::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_VectorField::getOrig | ( | ) | const [inline] |
Definition at line 87 of file SIM_VectorField.h.
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "usefp16" | , | |
| UseFP16 | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "closezpos" | , | |
| CloseZPos | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "closeypos" | , | |
| CloseYPos | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "closexpos" | , | |
| CloseXPos | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "closezneg" | , | |
| CloseZNeg | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "closeyneg" | , | |
| CloseYNeg | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "closexneg" | , | |
| CloseXNeg | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | "closedends" | , | |
| ClosedEnds | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_B | ( | SIM_NAME_TWOD | , | |
| TwoDField | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_F | ( | SIM_NAME_TOLERANCE | , | |
| Tolerance | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_F | ( | "divsize" | , | |
| RawDivisionSize | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_I | ( | "border" | , | |
| RawBorder | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_I | ( | SIM_NAME_VOXELSAMPLE | , | |
| VoxelSampleRaw | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_I | ( | "totalvoxels" | , | |
| TotalVoxels | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_I | ( | "uniformdiv" | , | |
| RawUniformDivisions | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_I | ( | SIM_NAME_VOXELPLANE | , | |
| VoxelPlane | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_I | ( | SIM_NAME_UNIFORMVOXELS | , | |
| UniformVoxels | ||||
| ) |
Control the number of divisions.
| SIM_VectorField::GETSET_DATA_FUNCS_S | ( | SIM_NAME_POSITIONPATH | , | |
| PositionPath | ||||
| ) |
Accesses the relative path to the position data associated with this geometry.
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_DIRECTION | , | |
| ExternalDirection | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | "totalvoxelres" | , | |
| TotalVoxelRes | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | "sliceoverlappos" | , | |
| SliceOverlapPos | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | "sliceoverlapneg" | , | |
| SliceOverlapNeg | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | "slicediv" | , | |
| SliceDivisions | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_SIZE | , | |
| RawSize | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_CENTER | , | |
| RawCenter | ||||
| ) |
| SIM_VectorField::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_DIV | , | |
| RawDivisions | ||||
| ) |
| UT_Vector3 SIM_VectorField::getSize | ( | ) | const |
| UT_Vector3 SIM_VectorField::getValue | ( | const UT_Vector3 & | pos | ) | const |
Access the field value given a world space location. This does trilinear interpolation.
| fpreal SIM_VectorField::getVoxelDiameter | ( | int | axis | ) | const |
| SIM_FieldSample SIM_VectorField::getVoxelSample | ( | int | axis | ) | const |
| const UT_Vector3& SIM_VectorField::getVoxelSize | ( | int | axis | ) | const |
| SIM_RawField* SIM_VectorField::getXField | ( | ) | const [inline] |
Definition at line 275 of file SIM_VectorField.h.
| SIM_RawField* SIM_VectorField::getYField | ( | ) | const [inline] |
Definition at line 276 of file SIM_VectorField.h.
| SIM_RawField* SIM_VectorField::getZField | ( | ) | const [inline] |
Definition at line 277 of file SIM_VectorField.h.
| bool SIM_VectorField::hasNan | ( | ) | const [inline] |
| bool SIM_VectorField::indexToPos | ( | int | axis, | |
| int | x, | |||
| int | y, | |||
| int | z, | |||
| UT_Vector3 & | pos | |||
| ) | const |
Converts an integer index into a worldspace position.
| virtual void SIM_VectorField::initializeSubclass | ( | ) | [protected, virtual] |
| bool SIM_VectorField::isAligned | ( | const SIM_RawField * | field | ) | const |
| bool SIM_VectorField::isAligned | ( | const SIM_VectorField * | field | ) | const |
True if we are component-wise aligned, our x/y/z fields may still be unaligned with respect to each other.
| bool SIM_VectorField::isAligned | ( | const SIM_MatrixField * | field | ) | const |
| bool SIM_VectorField::isAligned | ( | const SIM_ScalarField * | field | ) | const |
| bool SIM_VectorField::isCenterSampled | ( | ) | const [inline] |
Definition at line 139 of file SIM_VectorField.h.
| bool SIM_VectorField::isFaceSampled | ( | ) | const [inline] |
Definition at line 134 of file SIM_VectorField.h.
| bool SIM_VectorField::isMatching | ( | const SIM_VectorField * | field | ) | const [inline] |
Determines if we match in terms of voxel cells - same bounding box and number of cells. Due to sampling, this does not mean the sample points will match Because our internal fields are always matching by definition, we can just test the first field.
Definition at line 131 of file SIM_VectorField.h.
| bool SIM_VectorField::isSelfAligned | ( | ) | const [inline] |
| virtual bool SIM_VectorField::loadSubclass | ( | UT_IStream & | is | ) | [protected, virtual] |
| void SIM_VectorField::matchField | ( | const SIM_IndexField * | field | ) |
| void SIM_VectorField::matchField | ( | const SIM_MatrixField * | field | ) |
| void SIM_VectorField::matchField | ( | const SIM_VectorField * | field, | |
| bool | matchsample = false | |||
| ) |
| void SIM_VectorField::matchField | ( | const SIM_ScalarField * | field | ) |
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
| virtual void SIM_VectorField::optionChangedSubclass | ( | const char * | name | ) | [protected, virtual] |
| bool SIM_VectorField::posToIndex | ( | int | axis, | |
| const UT_Vector3 & | pos, | |||
| int & | x, | |||
| int & | y, | |||
| int & | z | |||
| ) | const |
Converts a worldspace position into an integer index.
| void SIM_VectorField::projectToNonDivergent | ( | const SIM_RawField * | pressureboundary = 0, |
|
| const SIM_RawField * | collision = 0, |
|||
| SIM_RawField * | pressureout = 0, |
|||
| bool | preservebubble = true, |
|||
| const SIM_RawField * | goaldiv = 0, |
|||
| SIM_RawIndexField * | compout = 0, |
|||
| bool | ghostfluid = true, |
|||
| bool | variational = true, |
|||
| SIM_RawField::PCG_METHOD | pcgmethod = SIM_RawField::PCG_MIC, |
|||
| int | numiterforcenter = 20 | |||
| ) |
Projects the field into the space of non-divergent fields. All divergent components of this field are removed.
| void SIM_VectorField::projectToNonDivergentCenter | ( | const SIM_RawField * | pressureboundary, | |
| const SIM_RawField * | goaldiv, | |||
| int | numiter | |||
| ) |
| void SIM_VectorField::projectToNonDivergentFace | ( | const SIM_RawField * | pressureboundary, | |
| const SIM_RawField * | collision, | |||
| SIM_RawField * | pressureout = 0, |
|||
| bool | preservebubble = true, |
|||
| const SIM_RawField * | goaldiv = 0, |
|||
| SIM_RawIndexField * | compout = 0, |
|||
| bool | ghostfluid = true, |
|||
| bool | variational = true, |
|||
| SIM_RawField::PCG_METHOD | pcgmethod = SIM_RawField::PCG_MIC | |||
| ) |
| void SIM_VectorField::pubHandleModification | ( | ) | [inline] |
| void SIM_VectorField::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_VectorField::saveSubclass | ( | ostream & | os | ) | const [protected, virtual] |
| void SIM_VectorField::setBorder | ( | UT_VoxelBorderType | border | ) | [inline] |
Definition at line 81 of file SIM_VectorField.h.
| void SIM_VectorField::setCenter | ( | const UT_Vector3 & | div | ) |
| void SIM_VectorField::setDivisions | ( | const UT_Vector3 & | div | ) |
Adjusts the size/divisions of this field, overriding and twod or uniform voxel settings.
| void SIM_VectorField::setField | ( | int | axis, | |
| SIM_RawField * | field | |||
| ) |
Sets the field to the given field, gaining ownership of it. The new field must already match the field it will replace.
| void SIM_VectorField::setSize | ( | const UT_Vector3 & | div | ) |
| SIM_RawField* SIM_VectorField::stealField | ( | int | axis | ) |
Steals the field, replacing this copy with an empty field and returning the old version.
| void SIM_VectorField::testForNan | ( | ) | const |
| SIM_VectorField::THREADED_METHOD1 | ( | SIM_VectorField | , | |
| getField(0)->shouldMultiThread() | , | |||
| applyPressureGradientCenter | , | |||
| const SIM_RawField * | , | |||
| pressure | ||||
| ) | const |
| SIM_VectorField::THREADED_METHOD1_CONST | ( | SIM_VectorField | , | |
| getField(0)->shouldMultiThread() | , | |||
| buildDivergenceCenter | , | |||
| SIM_RawField & | , | |||
| div | ||||
| ) |
Evaluates the divergence field for this velocity field.
| SIM_VectorField::THREADED_METHOD4 | ( | SIM_VectorField | , | |
| getField(axis)->shouldMultiThread() | , | |||
| applyPressureGradientFace | , | |||
| int | , | |||
| axis | , | |||
| const SIM_RawField * | , | |||
| pressure | , | |||
| const SIM_RawField * | , | |||
| surface | , | |||
| const SIM_RawIndexField * | , | |||
| comp | ||||
| ) |
Applies a pressure differential to the given component of our velocity field
| SIM_VectorField::THREADED_METHOD6_CONST | ( | SIM_VectorField | , | |
| div. | shouldMultiThread(), | |||
| hasSurfaceCell | , | |||
| bool * | , | |||
| result | , | |||
| SIM_RawField & | , | |||
| div | , | |||
| const SIM_RawField * | , | |||
| pressureboundary | , | |||
| const SIM_RawField * | , | |||
| collision | , | |||
| int | , | |||
| compnum | , | |||
| const SIM_RawIndexField & | , | |||
| comp | ||||
| ) |
Determines if the given component has any surface cells. result should be preloaded with false.
| void SIM_VectorField::updateTotalVoxels | ( | ) |
Recomputes total number of voxels to be stored on our options data for ease of reading
Definition at line 239 of file SIM_VectorField.h.
| SIM_RawField const SIM_RawField const SIM_RawField int const SIM_RawIndexField& SIM_VectorField::comp |
Definition at line 239 of file SIM_VectorField.h.
Definition at line 212 of file SIM_VectorField.h.
Definition at line 239 of file SIM_VectorField.h.
| SIM_RawField const SIM_RawField const SIM_RawField int const SIM_RawIndexField const UT_JobInfo& info SIM_VectorField::const |
Definition at line 239 of file SIM_VectorField.h.
Definition at line 201 of file SIM_VectorField.h.
Definition at line 239 of file SIM_VectorField.h.
Definition at line 223 of file SIM_VectorField.h.
| const SIM_RawField const SIM_RawField const SIM_RawIndexField const UT_JobInfo& SIM_VectorField::info |
Definition at line 212 of file SIM_VectorField.h.
Definition at line 212 of file SIM_VectorField.h.
Definition at line 239 of file SIM_VectorField.h.
Definition at line 212 of file SIM_VectorField.h.
1.5.9