OP_Options Class Reference

#include <OP_Options.h>

Inheritance diagram for OP_Options:

UT_Options SIM_Options

List of all members.

Public Member Functions

 OP_Options ()
virtual ~OP_Options ()
void interpolate (const OP_Options &source1, const OP_Options &source2, fpreal interp)
void setOptionFromTemplate (OP_Node *node, const PRM_Template &tplate, int pi, fpreal time)
void setOptionFromTemplate (OP_Node *node, const PRM_Parm &parm, const PRM_Template &tplate, fpreal time)
void setOptionFromParm (OP_Node *node, int pi, int vi, fpreal time)
void setOptionFromTemplateDefault (const PRM_Template &tp)
bool setOptionFromCommand (const char *optionname, const char *optionvalue, fpreal optionvaluefloat, UT_OptionType optiontype)
UT_DMatrix4 getTransformFromOptions () const
const OP_Optionsoperator= (const UT_Options &src)
 Set one OP_Options equal to another.

Protected Member Functions

virtual void optionChanged (const char *name)
virtual void getInterpolatedInt (int64 &value, const char *name, int source1, int source2, fpreal interp) const
 These functions perform the actual interpolation of each data type.
virtual void getInterpolatedBool (bool &value, const char *name, bool source1, bool source2, fpreal interp) const
virtual void getInterpolatedFpreal (fpreal64 &value, const char *name, fpreal source1, fpreal source2, fpreal interp) const
virtual void getInterpolatedString (std::string &value, const char *name, const std::string &source1, const std::string &source2, fpreal interp) const
virtual void getInterpolatedVector2 (UT_Vector2D &value, const char *name, const UT_Vector2D &source1, const UT_Vector2D &source2, fpreal interp) const
virtual void getInterpolatedVector3 (UT_Vector3D &value, const char *name, const UT_Vector3D &source1, const UT_Vector3D &source2, fpreal interp) const
virtual void getInterpolatedVector4 (UT_Vector4D &value, const char *name, const UT_Vector4D &source1, const UT_Vector4D &source2, fpreal interp) const
virtual void getInterpolatedQuaternion (UT_QuaternionD &value, const char *name, const UT_QuaternionD &source1, const UT_QuaternionD &source2, fpreal interp) const
virtual void getInterpolatedMatrix3 (UT_Matrix3D &value, const char *name, const UT_Matrix3D &source1, const UT_Matrix3D &source2, fpreal interp) const
virtual void getInterpolatedMatrix4 (UT_Matrix4D &value, const char *name, const UT_Matrix4D &source1, const UT_Matrix4D &source2, fpreal interp) const
virtual void getInterpolatedIntArray (UT_Int64Array &value, const char *name, const UT_Int64Array &source1, const UT_Int64Array &source2, fpreal interp)
virtual void getInterpolatedFprealArray (UT_Fpreal64Array &value, const char *name, const UT_Fpreal64Array &source1, const UT_Fpreal64Array &source2, fpreal interp)


Detailed Description

This class stores a set of name/value pairs. Each value can be one of several different data types. No automatic conversion between data types is provided, so accessing existing data requires knowledge of both the data name and the data type.

Definition at line 37 of file OP_Options.h.


Constructor & Destructor Documentation

OP_Options::OP_Options (  )  [explicit]

virtual OP_Options::~OP_Options (  )  [virtual]


Member Function Documentation

virtual void OP_Options::getInterpolatedBool ( bool &  value,
const char *  name,
bool  source1,
bool  source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedFpreal ( fpreal64 value,
const char *  name,
fpreal  source1,
fpreal  source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedFprealArray ( UT_Fpreal64Array value,
const char *  name,
const UT_Fpreal64Array source1,
const UT_Fpreal64Array source2,
fpreal  interp 
) [protected, virtual]

virtual void OP_Options::getInterpolatedInt ( int64 value,
const char *  name,
int  source1,
int  source2,
fpreal  interp 
) const [protected, virtual]

These functions perform the actual interpolation of each data type.

virtual void OP_Options::getInterpolatedIntArray ( UT_Int64Array value,
const char *  name,
const UT_Int64Array source1,
const UT_Int64Array source2,
fpreal  interp 
) [protected, virtual]

virtual void OP_Options::getInterpolatedMatrix3 ( UT_Matrix3D value,
const char *  name,
const UT_Matrix3D source1,
const UT_Matrix3D source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedMatrix4 ( UT_Matrix4D value,
const char *  name,
const UT_Matrix4D source1,
const UT_Matrix4D source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedQuaternion ( UT_QuaternionD value,
const char *  name,
const UT_QuaternionD source1,
const UT_QuaternionD source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedString ( std::string value,
const char *  name,
const std::string source1,
const std::string source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedVector2 ( UT_Vector2D value,
const char *  name,
const UT_Vector2D source1,
const UT_Vector2D source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedVector3 ( UT_Vector3D value,
const char *  name,
const UT_Vector3D source1,
const UT_Vector3D source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedVector4 ( UT_Vector4D value,
const char *  name,
const UT_Vector4D source1,
const UT_Vector4D source2,
fpreal  interp 
) const [protected, virtual]

UT_DMatrix4 OP_Options::getTransformFromOptions (  )  const

Calculates a transform matrix based on standard transform options like t, r, s, etc.

void OP_Options::interpolate ( const OP_Options source1,
const OP_Options source2,
fpreal  interp 
)

Set the data in this OP_Options to be an interpolation of the data in two other OP_Options. The actual interpolation of each piece of data is performed by the OP_OptionInterpolator, which allows the interpolation behavior to be customized.

const OP_Options& OP_Options::operator= ( const UT_Options src  ) 

Set one OP_Options equal to another.

Reimplemented from UT_Options.

virtual void OP_Options::optionChanged ( const char *  name  )  [protected, virtual]

This function is called whenever data is added, removed, or changed. If the name parameter is null, then multiple pieces of data were changed simultaneously (probably through a load or assignment operation). This function just calls OP_OptionsUser::optionChanged() on each user of this data.

Reimplemented from UT_Options.

Reimplemented in SIM_Options.

bool OP_Options::setOptionFromCommand ( const char *  optionname,
const char *  optionvalue,
fpreal  optionvaluefloat,
UT_OptionType  optiontype 
)

Sets an option based on strings coming from a command. This is used by the dopsolvesetoption command. This funtion returns true if the parameters make sense together and result in setting an option. Otherwise false is returned.

void OP_Options::setOptionFromParm ( OP_Node node,
int  pi,
int  vi,
fpreal  time 
)

Utility function for setting options based on channel names of a parameter. This splits up a single parameter tuple into multiple scalar options.

void OP_Options::setOptionFromTemplate ( OP_Node node,
const PRM_Parm parm,
const PRM_Template tplate,
fpreal  time 
)

void OP_Options::setOptionFromTemplate ( OP_Node node,
const PRM_Template tplate,
int  pi,
fpreal  time 
)

Utility function for setting an option based on a parm template. This is useful for gathering information from operator parameters to be passed on to OP_Data::setParameters(). This will harden op references to full paths, add parameter tuples as vector2/vector3/etc options, and also build ramp and multiparms. Ramps become strings and multiparms are recursed and all their implied parms added.

void OP_Options::setOptionFromTemplateDefault ( const PRM_Template tp  ) 

Utility function for setting an options based on the default value stored in a parm template. This is used to gather default values for initializing a OP_Data type. The parameter defaults are gethered into a OP_Options data structure which is passed to OP_Data::setParameters().


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

Generated on Thu Jan 31 00:31:44 2013 for HDK by  doxygen 1.5.9