11 #ifndef __SIM_MatrixField__
12 #define __SIM_MatrixField__
65 if (getRawBorder() == 3)
83 return getCenter() - getSize()/2;
110 void matchField(
const SIM_MatrixField *field,
bool matchsamples=
false);
121 const UT_Vector3 &getVoxelSize(
int i,
int j)
const;
122 fpreal getVoxelDiameter(
int i,
int j)
const;
126 {
for (
int i = 0; i < 3; i++)
127 for (
int j = 0;
j < 3;
j++)
128 myFields[i][
j]->setVoxelSize(voxelsize);
169 bool indexToPos(
int i,
int j,
int x,
int y,
int z,
UT_Vector3 &pos)
const;
172 bool posToIndex(
int i,
int j,
const UT_Vector3 &pos,
int &
x,
int &
y,
int &
z)
const;
187 for (i = 0; i < 3; i++)
188 for (j = 0; j < 3; j++)
189 if (myFields[i][j]->hasNan())
199 for (
int i = 0; i < 3; i++)
200 for (
int j = 0;
j < 3;
j++)
201 if (!getField(i,
j)->field()->isConstant(0))
return false;
210 void testForNan()
const;
217 {
for (
int i = 0; i < 3; i++)
for (
int j = 0;
j < 3;
j++) getField(i,
j)->markGridAsChanged(); }
221 void updateTotalVoxels();
252 void setSkipFieldRebuildOnOptionChanged(
bool skip)
254 mySkipFieldRebuild =
skip;
258 bool getSkipFieldRebuildOnOptionChanged()
const
260 return mySkipFieldRebuild;
264 bool mySkipFieldRebuild;
279 myStashedValue = myField->getSkipFieldRebuildOnOptionChanged();
280 myField->setSkipFieldRebuildOnOptionChanged(
true);
285 myField->setSkipFieldRebuildOnOptionChanged(myStashedValue);
289 myField->rebuildFields();
303 void rebuildFields();
310 getMatrixFieldDopDescription());
#define SIM_NAME_VOXELPLANE
#define SIM_NAME_POSITIONPATH
virtual void makeEqualSubclass(const SIM_Data *source)
#define SIM_NAME_VOXELSAMPLE
#define DECLARE_STANDARD_GETCASTTOTYPE()
GA_API const UT_StringHolder div
virtual bool loadSubclass(UT_IStream &is)
#define SIM_NAME_TOLERANCE
virtual void optionChangedSubclass(const char *name)
#define GETSET_DATA_FUNCS_B(DataName, FuncName)
#define GETSET_DATA_FUNCS_S(DataName, FuncName)
GLdouble GLdouble GLdouble z
virtual int64 getMemorySizeSubclass() const
UT_VoxelBorderType getBorder() const
constexpr SYS_FORCE_INLINE T & z() noexcept
This class holds a three dimensional scalar field.
#define GETSET_DATA_FUNCS_F(DataName, FuncName)
#define GETSET_DATA_FUNCS_M3(DataName, FuncName)
#define GETSET_DATA_FUNCS_V3(DataName, FuncName)
__hostdev__ float getValue(uint32_t i) const
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
void pubHandleModification()
GLsizei GLsizei GLchar * source
virtual void saveSubclass(std::ostream &os) const
#define SIM_NAME_UNIFORMVOXELS
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
void setBorder(UT_VoxelBorderType border)
SkipFieldRebuildScope(SIM_MatrixField *field)
GLuint const GLchar * name
This class holds a three dimensional tensor field.
GLint GLint GLsizei GLint border
UT_Vector3 getVoxelSize() const
void handleModification(int code=-1)
This class holds a three dimensional scalar field.
SIM_RawField * getField(int i, int j)
constexpr SYS_FORCE_INLINE T & y() noexcept
const SIM_RawField * getField(int i, int j) const
Retrieve raw field.
This class holds a three dimensional vector field.
bool appearsToBeUnused() const
UT_Vector3 getOrig() const
SIM_RawField rawfield_type
bool hasNan() const
True if we contain any NANs.
constexpr SYS_FORCE_INLINE T & x() noexcept
void setVoxelSize(const UT_Vector3 &voxelsize)
virtual void initializeSubclass()