SIM_IndexField Class Reference

This class holds a three dimensional scalar field. More...

#include <SIM_IndexField.h>

Inheritance diagram for SIM_IndexField:

SIM_Data SIM_OptionsUser

List of all members.

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_I ("initialvalue", InitialValue)
 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 &div)
void setCenter (const UT_Vector3 &div)
void resizeKeepData (const UT_Vector3 &size, const UT_Vector3 &center)
void matchField (const SIM_ScalarField *field)
void matchField (const SIM_VectorField *field)
void matchField (const SIM_MatrixField *field)
void matchField (const SIM_IndexField *field, bool matchsamples=false)
SIM_FieldSample getVoxelSample () const
const UT_Vector3getVoxelSize () const
fpreal getVoxelDiameter () const
int64 getValue (const UT_Vector3 &pos) const
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_RawIndexFieldgetField () const
 Retrieve raw field.
void setField (SIM_RawIndexField *field)
 Sets the field to the given field, gaining ownership of it.
SIM_RawIndexFieldstealField ()
void pubHandleModification ()
 Signals to the field that it has been altered externally.

Protected Member Functions

 SIM_IndexField (const SIM_DataFactory *factory)
virtual ~SIM_IndexField ()
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.


Detailed Description

This class holds a three dimensional scalar field.

Definition at line 38 of file SIM_IndexField.h.


Constructor & Destructor Documentation

SIM_IndexField::SIM_IndexField ( const SIM_DataFactory factory  )  [explicit, protected]

virtual SIM_IndexField::~SIM_IndexField (  )  [protected, virtual]


Member Function Documentation

void SIM_IndexField::getBBox ( UT_BoundingBox bbox  )  const

Controls the dimensions of where the field is properly defined in the field space.

UT_VoxelBorderType SIM_IndexField::getBorder (  )  const [inline]

Definition at line 59 of file SIM_IndexField.h.

UT_Vector3 SIM_IndexField::getCenter (  )  const

UT_Vector3 SIM_IndexField::getDivisions (  )  const

Calculate the size and divisions according to options such as 2d or equal sized voxels.

SIM_RawIndexField* SIM_IndexField::getField (  )  const [inline]

Retrieve raw field.

Definition at line 113 of file SIM_IndexField.h.

virtual int64 SIM_IndexField::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_IndexField::getOrig (  )  const [inline]

Definition at line 65 of file SIM_IndexField.h.

SIM_IndexField::GETSET_DATA_FUNCS_B ( SIM_NAME_TWOD  ,
TwoDField   
)

SIM_IndexField::GETSET_DATA_FUNCS_I ( "border"  ,
RawBorder   
)

SIM_IndexField::GETSET_DATA_FUNCS_I ( "initialvalue"  ,
InitialValue   
)

SIM_IndexField::GETSET_DATA_FUNCS_I ( SIM_NAME_VOXELSAMPLE  ,
VoxelSampleRaw   
)

SIM_IndexField::GETSET_DATA_FUNCS_I ( "uniformdiv"  ,
RawUniformDivisions   
)

SIM_IndexField::GETSET_DATA_FUNCS_I ( SIM_NAME_VOXELPLANE  ,
VoxelPlane   
)

SIM_IndexField::GETSET_DATA_FUNCS_I ( SIM_NAME_UNIFORMVOXELS  ,
UniformVoxels   
)

Control the number of divisions.

SIM_IndexField::GETSET_DATA_FUNCS_V3 ( "sliceoverlappos"  ,
SliceOverlapPos   
)

SIM_IndexField::GETSET_DATA_FUNCS_V3 ( "sliceoverlapneg"  ,
SliceOverlapNeg   
)

SIM_IndexField::GETSET_DATA_FUNCS_V3 ( "slicediv"  ,
SliceDivisions   
)

SIM_IndexField::GETSET_DATA_FUNCS_V3 ( SIM_NAME_SIZE  ,
RawSize   
)

SIM_IndexField::GETSET_DATA_FUNCS_V3 ( SIM_NAME_CENTER  ,
RawCenter   
)

SIM_IndexField::GETSET_DATA_FUNCS_V3 ( SIM_NAME_DIV  ,
RawDivisions   
)

UT_Vector3 SIM_IndexField::getSize (  )  const

int64 SIM_IndexField::getValue ( const UT_Vector3 pos  )  const

Access the field value given a world space location. This does closest point matching.

fpreal SIM_IndexField::getVoxelDiameter (  )  const

SIM_FieldSample SIM_IndexField::getVoxelSample (  )  const

const UT_Vector3& SIM_IndexField::getVoxelSize (  )  const

bool SIM_IndexField::indexToPos ( int  x,
int  y,
int  z,
UT_Vector3 pos 
) const

Converts an integer index into a worldspace position.

virtual void SIM_IndexField::initializeSubclass (  )  [protected, virtual]

Overrides to properly implement this class as a SIM_Data.

Reimplemented from SIM_Data.

virtual bool SIM_IndexField::loadSubclass ( UT_IStream is  )  [protected, virtual]

Loads our attributes and internal data if it was set when we saved.

Reimplemented from SIM_Data.

virtual void SIM_IndexField::makeEqualSubclass ( const SIM_Data source  )  [protected, virtual]

myField aware copy constructor.

Reimplemented from SIM_Data.

void SIM_IndexField::matchField ( const SIM_IndexField field,
bool  matchsamples = false 
)

void SIM_IndexField::matchField ( const SIM_MatrixField field  ) 

void SIM_IndexField::matchField ( const SIM_VectorField field  ) 

void SIM_IndexField::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_IndexField::optionChangedSubclass ( const char *  name  )  [protected, virtual]

Override the setDivisions to rebuild our voxel array on demand.

Reimplemented from SIM_OptionsUser.

bool SIM_IndexField::posToIndex ( const UT_Vector3 pos,
int &  x,
int &  y,
int &  z 
) const

Converts a worldspace position into an integer index.

void SIM_IndexField::pubHandleModification (  )  [inline]

Signals to the field that it has been altered externally.

Definition at line 123 of file SIM_IndexField.h.

void SIM_IndexField::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_IndexField::saveSubclass ( ostream &  os  )  const [protected, virtual]

Saves our attributes, and our internal data if it has been set.

Reimplemented from SIM_Data.

void SIM_IndexField::setCenter ( const UT_Vector3 div  ) 

void SIM_IndexField::setDivisions ( const UT_Vector3 div  ) 

Adjusts the size/divisions of this field, overriding and twod or uniform voxel settings.

void SIM_IndexField::setField ( SIM_RawIndexField field  ) 

Sets the field to the given field, gaining ownership of it.

void SIM_IndexField::setSize ( const UT_Vector3 div  ) 

SIM_RawIndexField* SIM_IndexField::stealField (  ) 

Steals the field, replacing this copy with an empty field and returning the old version.


The documentation for this class was generated from the following file:

Generated on Fri May 25 00:10:40 2012 for HDK by  doxygen 1.5.9