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 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 (int &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 (fpreal &value, const char *name, fpreal source1, fpreal source2, fpreal interp) const
virtual void getInterpolatedString (UT_String &value, const char *name, const UT_String &source1, const UT_String &source2, fpreal interp) const
virtual void getInterpolatedVector2 (UT_Vector2 &value, const char *name, const UT_Vector2 &source1, const UT_Vector2 &source2, fpreal interp) const
virtual void getInterpolatedVector3 (UT_Vector3 &value, const char *name, const UT_Vector3 &source1, const UT_Vector3 &source2, fpreal interp) const
virtual void getInterpolatedVector4 (UT_Vector4 &value, const char *name, const UT_Vector4 &source1, const UT_Vector4 &source2, fpreal interp) const
virtual void getInterpolatedQuaternion (UT_Quaternion &value, const char *name, const UT_Quaternion &source1, const UT_Quaternion &source2, fpreal interp) const
virtual void getInterpolatedMatrix3 (UT_Matrix3 &value, const char *name, const UT_Matrix3 &source1, const UT_Matrix3 &source2, fpreal interp) const
virtual void getInterpolatedMatrix4 (UT_Matrix4 &value, const char *name, const UT_Matrix4 &source1, const UT_Matrix4 &source2, fpreal interp) const


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 35 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 ( fpreal value,
const char *  name,
fpreal  source1,
fpreal  source2,
fpreal  interp 
) const [protected, virtual]

virtual void OP_Options::getInterpolatedInt ( int &  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::getInterpolatedMatrix3 ( UT_Matrix3 value,
const char *  name,
const UT_Matrix3 source1,
const UT_Matrix3 source2,
fpreal  interp 
) const [protected, virtual]

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

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

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

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

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

virtual void OP_Options::getInterpolatedVector4 ( UT_Vector4 value,
const char *  name,
const UT_Vector4 source1,
const UT_Vector4 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_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().

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 Fri May 25 00:10:33 2012 for HDK by  doxygen 1.5.9