Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmDynamicVariable Class Reference

Dynamic Variable Node. More...

#include <RmEffect.h>

Inheritance diagram for RmDynamicVariable:

RmVariable RmNode List of all members.

Public Types

enum  DynamicVariableType { TypeFloat, TypeInteger, TypeBoolean }
 Dynamic variable type. More...


Public Member Functions

 RmDynamicVariable ()
 Default constructor.

virtual ~RmDynamicVariable ()
 Destructor.

virtual void Update (RmNodeUpdateType nodeUpdateType, RmNode *pRmUpdateRootNode)
 Update.

virtual bool LoadXMLData (int hDoc, const RM_TCHAR *strXPath, const RM_TCHAR *strRmXMLVersion)
 Load node data from XML.

virtual bool SaveXMLData (int hDoc, const RM_TCHAR *strXPath)
 Save node data to XML.

virtual RmNodeClone (bool bIncludeLoadedData)
 Clone this node.

virtual const RM_TCHAR * GetDescription ()
virtual void SetName (const RM_TCHAR *strNewName)
 Set node name to the given string.

void SetDynamicVariableType (DynamicVariableType dynamicVariableType)
 Set dynamic variable type to given type.

DynamicVariableType GetDynamicVariableType ()
 Retrieve dynamic variable type.

int GetDynamicVariableTypeElementSize ()
 Retrieve element size.

int GetDynamicVariableTypeElementSize (DynamicVariableType dynamicVariableType)
 Element size.

void SetIsNormalized (bool bIsNormalized)
 Specify whether the variable should be normalized.

bool IsNormalized ()
 Retrieve whether this variable should be normalized.

int GetNumRows ()
 Number of rows.

int GetNumColumns ()
 Number of columns.

void SetNumRows (int nRows)
 Set number of rows.

void SetNumColumns (int nColumns)
 Set number of columns.

void SetIsClamped (bool bIsClamped)
 Set is clamped flag.

bool IsClamped ()
 Retrieve whether this variable is clamped or not.

void SetIsFixedSize (bool bIsFixedSize)
 Set whether this dynamic variable size cannot be modified.

bool IsFixedSize ()
 Retrieve whether this variable is of fixed size.

void SetFloatMinMax (float fMin, float fMax)
 Set Min/Max.

void SetIntegerMinMax (int nMin, int nMax)
 Set Min/Max.

void SetBooleanMinMax (BOOL bMin, BOOL bMax)
 Set Min/Max.

void GetFloatMinMax (float &fMin, float &fMax)
 Get Min/Max.

void GetIntegerMinMax (int &nMin, int &nMax)
 Get Min/Max.

void GetBooleanMinMax (BOOL &bMin, BOOL &bMax)
 Get Min/Max.

void SetFloatData (int nRow, int nCol, float fData)
 Set Data.

void SetIntegerData (int nRow, int nCol, int nData)
 Set Data.

void SetBooleanData (int nRow, int nCol, BOOL bData)
 Set Data.

float GetFloatData (int nRow, int nCol)
 GetFloat Data.

int GetIntegerData (int nRow, int nCol)
 GetInteger Data.

BOOL GetBooleanData (int nRow, int nCol)
 GetBoolean Data.

float * GetFloatDataBlock ()
 GetFloat Data.

int * GetIntegerDataBlock ()
 GetInteger Data.

BOOL * GetBooleanDataBlock ()
 GetBoolean Data.


Protected Member Functions

virtual void CopyNodeData (RmNode *pDestinationNode, bool bIncludeLoadedData)
 CopyNode Data.

virtual RmNodeTypeChildRuleListGetNodeTypeChildRuleList ()
 Parent / Child rule list function.

virtual void SetNodeTypeChildRuleList (RmNodeTypeChildRuleList *pRmNodeChildRuleList)
 Sets the node child rule list for the given node.

void ConvertDynamicData (void *pDestData, DynamicVariableType destDataType, void *pSourceData, DynamicVariableType sourceDataType)
 Convert dynamic data.

int FloatToInt (float fValue)
 Conversion from float value to integer.

void * GetDataPointer (void *pData, DynamicVariableType dataType, int nRowIndex, int nColumnIndex)
 Data pointer helper function.

void * GetDataPointer (void *pData, DynamicVariableType dataType, int nRowIndex, int nColumnIndex, int nNumRows, int nNumColumns)
 Data pointer helper function.

bool LoadXMLDataValues (int hDoc, const RM_TCHAR *strXPath, const RM_TCHAR *strRmXMLVersion)
 Load from XML.

bool SaveXMLDataValues (int hDoc, const RM_TCHAR *strXPath)
 Save to XML.


Protected Attributes

DynamicVariableType m_dynamicVariableType
 Data Type DynamicVariableType.

int m_nRows
 Number of Rows.

int m_nColumns
 Number of columns.

void * m_pDynamicVariableData
 Data.

bool m_bIsFixedSize
 Is Fixed Size Flag.

bool m_bIsClamped
 Clamped flag.

bool m_bIsNormalized
 normalized Flag

void * m_pDynamicVariableMin
 Min Value for clamping.

void * m_pDynamicVariableMax
 Max Value for clamping.


Detailed Description

Dynamic Variable Node.

RmDynamicVariable is class for n x m typed variables


Member Enumeration Documentation

enum RmDynamicVariable::DynamicVariableType
 

Dynamic variable type.

Supported dynamic variable types

Enumeration values:
TypeFloat  Float.
TypeInteger  Integer.
TypeBoolean  Boolean.


Constructor & Destructor Documentation

RmDynamicVariable::RmDynamicVariable  ) 
 

Default constructor.

Default constructor

virtual RmDynamicVariable::~RmDynamicVariable  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual RmNode* RmDynamicVariable::Clone bool  bIncludeLoadedData  )  [virtual]
 

Clone this node.

Creates a clone of this node

Returns:
Cloned node. Returns NULL if cloning failed.

Reimplemented from RmNode.

void RmDynamicVariable::ConvertDynamicData void *  pDestData,
DynamicVariableType  destDataType,
void *  pSourceData,
DynamicVariableType  sourceDataType
[protected]
 

Convert dynamic data.

Type conversion helper function

Parameters:
pDestData Destination data
destDataType Destination data type
See also:
DynamicVariableType
Parameters:
pSourceData Source data
sourceDataType Source data type
See also:
DynamicVariableType
Returns:
None

virtual void RmDynamicVariable::CopyNodeData RmNode pDestinationNode,
bool  bIncludeLoadedData
[protected, virtual]
 

CopyNode Data.

Copies this node's contents (not including children) into the destination node. See RmNode::CopyNodeData for details

Parameters:
pDestinationNode Destination data node
Returns:
None

Reimplemented from RmVariable.

int RmDynamicVariable::FloatToInt float  fValue  )  [inline, protected]
 

Conversion from float value to integer.

Convert a float value to integer value

Parameters:
fValue Source value to convert
Returns:
Converted value

BOOL RmDynamicVariable::GetBooleanData int  nRow,
int  nCol
 

GetBoolean Data.

Get Boolean Data

Parameters:
nRow Row index
nCol Column index
Returns:
Boolean data

BOOL* RmDynamicVariable::GetBooleanDataBlock  ) 
 

GetBoolean Data.

Retrieve a contiguous boolean data block

Returns:
Array of Boolean Data

void RmDynamicVariable::GetBooleanMinMax BOOL &  bMin,
BOOL &  bMax
 

Get Min/Max.

Get Min/Max values

Parameters:
bMin Min value
bMax Max value
Returns:
None

void* RmDynamicVariable::GetDataPointer void *  pData,
DynamicVariableType  dataType,
int  nRowIndex,
int  nColumnIndex,
int  nNumRows,
int  nNumColumns
[protected]
 

Data pointer helper function.

Data pointer helper function

Parameters:
pData Data dataType Data type
See also:
DynamicVariableType
Parameters:
nRowIndex Row index
nColumnIndex Column index
nNumRows Number of rows
nNumColumns Number of columns
Returns:
Pointer to data

void* RmDynamicVariable::GetDataPointer void *  pData,
DynamicVariableType  dataType,
int  nRowIndex,
int  nColumnIndex
[protected]
 

Data pointer helper function.

Data pointer helper function

Parameters:
pData Data dataType Data type
See also:
DynamicVariableType
Parameters:
nRowIndex Row index
nColumnIndex Column index
Returns:
Pointer to data

virtual const RM_TCHAR* RmDynamicVariable::GetDescription  )  [virtual]
 

Returns description of the node: used for displaying a tooltip in the workspace tree view for the given node

Returns:
Returns description string

Reimplemented from RmNode.

DynamicVariableType RmDynamicVariable::GetDynamicVariableType  )  [inline]
 

Retrieve dynamic variable type.

Retrieve dynamic variable type

Returns:
Variable Type
See also:
DynamicVariableType

int RmDynamicVariable::GetDynamicVariableTypeElementSize DynamicVariableType  dynamicVariableType  ) 
 

Element size.

Retrieve element size for this dynamic variable

Parameters:
dynamicVariableType Variable Type
See also:
DynamicVariableType
Returns:
Size of element

int RmDynamicVariable::GetDynamicVariableTypeElementSize  )  [inline]
 

Retrieve element size.

Get element size

Returns:
Size of element

float RmDynamicVariable::GetFloatData int  nRow,
int  nCol
 

GetFloat Data.

Get float data from this dynamic variable

Parameters:
nRow Row index
nCol Column index
Returns:
Float data

float* RmDynamicVariable::GetFloatDataBlock  ) 
 

GetFloat Data.

Retrieve a contiguous float data block

Returns:
Array of float data

void RmDynamicVariable::GetFloatMinMax float &  fMin,
float &  fMax
 

Get Min/Max.

Get Min/Max values

Parameters:
fMin Min value
fMax Max value
Returns:
None

int RmDynamicVariable::GetIntegerData int  nRow,
int  nCol
 

GetInteger Data.

Get Integer Data

Parameters:
nRow Row index
nCol Column index
Returns:
Integer data

int* RmDynamicVariable::GetIntegerDataBlock  ) 
 

GetInteger Data.

Retrieve a contiguous integer data block

Returns:
Array of Integer Data

void RmDynamicVariable::GetIntegerMinMax int &  nMin,
int &  nMax
 

Get Min/Max.

Get Min/Max values

Parameters:
nMin Min value
nMax Max value
Returns:
None

virtual RmNodeTypeChildRuleList* RmDynamicVariable::GetNodeTypeChildRuleList  )  [inline, protected, virtual]
 

Parent / Child rule list function.

Retrieves the rule list for adding child nodes for a given node type

Returns:
Returns node type child list rules

Reimplemented from RmVariable.

int RmDynamicVariable::GetNumColumns  )  [inline]
 

Number of columns.

Get number of columns

Returns:
Number of columns

int RmDynamicVariable::GetNumRows  )  [inline]
 

Number of rows.

Get number of rows

of rows

bool RmDynamicVariable::IsClamped  )  [inline]
 

Retrieve whether this variable is clamped or not.

Return whether this variable is clamped (true) or not (false)

Returns:
True if clamping flag is set

bool RmDynamicVariable::IsFixedSize  )  [inline]
 

Retrieve whether this variable is of fixed size.

Retrieves whether this dynamic variable has constrained (fixed) dimensions or whether its dimensions can be modified by the user directly

Returns:
True if fixed size

bool RmDynamicVariable::IsNormalized  )  [inline]
 

Retrieve whether this variable should be normalized.

Retrieve whether this variable should be normalized. Returns true if it is, false if it isn't

Returns:
True if normalization flag is set

virtual bool RmDynamicVariable::LoadXMLData int  hDoc,
const RM_TCHAR *  strXPath,
const RM_TCHAR *  strRmXMLVersion
[virtual]
 

Load node data from XML.

Loading versioned XML node data.

Parameters:
hDoc Handle to XML document
strXPath Node path in XML
strRmXMLVersion XML version
Returns:
True if load succeeded. False otherwise.

Reimplemented from RmVariable.

bool RmDynamicVariable::LoadXMLDataValues int  hDoc,
const RM_TCHAR *  strXPath,
const RM_TCHAR *  strRmXMLVersion
[protected]
 

Load from XML.

Loading versioned XML node data values.

Parameters:
hDoc Handle to XML document
strXPath Node path in XML
strRmXMLVersion XML version
Returns:
True on success

virtual bool RmDynamicVariable::SaveXMLData int  hDoc,
const RM_TCHAR *  strXPath
[virtual]
 

Save node data to XML.

Saves node's contents to XML. Note that this method will only save the contents of each node, not the data for all of the children nodes. Each child will have its own XML saving function called by the API.

Parameters:
hDoc Handle to the XML document
strXPath Node path in XML
Returns:
True if save succeeded. False otherwise.

Reimplemented from RmVariable.

bool RmDynamicVariable::SaveXMLDataValues int  hDoc,
const RM_TCHAR *  strXPath
[protected]
 

Save to XML.

Saving versioned XML node data values.

Parameters:
hDoc Handle to XML document
strXPath Node path in XML
Returns:
True on success

void RmDynamicVariable::SetBooleanData int  nRow,
int  nCol,
BOOL  bData
 

Set Data.

Set data for this variable

Parameters:
nRow number of rows
nCol number of rows
bData boolean array data to store in this dynamic variable
Returns:
None

void RmDynamicVariable::SetBooleanMinMax BOOL  bMin,
BOOL  bMax
 

Set Min/Max.

Set Min/Max values

Parameters:
bMin Min value
bMax Max value
Returns:
None

void RmDynamicVariable::SetDynamicVariableType DynamicVariableType  dynamicVariableType  ) 
 

Set dynamic variable type to given type.

Set dynamic variable type to given type

Parameters:
dynamicVariableType Variable Type
See also:
DynamicVariableType
Returns:
None

void RmDynamicVariable::SetFloatData int  nRow,
int  nCol,
float  fData
 

Set Data.

Set data for this variable

Parameters:
nRow number of rows
nCol number of rows
fData floating point array data to store in this dynamic variable
Returns:
None

void RmDynamicVariable::SetFloatMinMax float  fMin,
float  fMax
 

Set Min/Max.

Set Min/Max values

Parameters:
fMin Min value
fMax Max value
Returns:
None

void RmDynamicVariable::SetIntegerData int  nRow,
int  nCol,
int  nData
 

Set Data.

Set data for this variable

Parameters:
nRow number of rows
nCol number of rows
nData integer array data to store in this dynamic variable
Returns:
None

void RmDynamicVariable::SetIntegerMinMax int  nMin,
int  nMax
 

Set Min/Max.

Set Min/Max values

Parameters:
nMin Min value
nMax Max value
Returns:
None

void RmDynamicVariable::SetIsClamped bool  bIsClamped  ) 
 

Set is clamped flag.

Set IsClamped flag for this variable

Parameters:
bIsClamped IsClamped flag
Returns:
None

void RmDynamicVariable::SetIsFixedSize bool  bIsFixedSize  )  [inline]
 

Set whether this dynamic variable size cannot be modified.

Set IsFixed size - setting this flag to true constraints the dynamic variable's dimensions to be of the current size, and not changeable by the user via the dynamic variable editor.

Parameters:
bIsFixedSize Fixed size flag
Returns:
None

void RmDynamicVariable::SetIsNormalized bool  bIsNormalized  ) 
 

Specify whether the variable should be normalized.

Specify whether the variable should be normalized

Parameters:
bIsNormalized Flag for normalization
Returns:
None

virtual void RmDynamicVariable::SetName const RM_TCHAR *  strNewName  )  [virtual]
 

Set node name to the given string.

Set the name of the node to the specified value

Parameters:
strNewName Name to set
Returns:
None

Reimplemented from RmNode.

virtual void RmDynamicVariable::SetNodeTypeChildRuleList RmNodeTypeChildRuleList pRmNodeChildRuleList  )  [inline, protected, virtual]
 

Sets the node child rule list for the given node.

Sets the child addition rule list for the given node.

Parameters:
pRmNodeChildRuleList new node rules list
None 

Reimplemented from RmVariable.

void RmDynamicVariable::SetNumColumns int  nColumns  ) 
 

Set number of columns.

Set number of columns

Parameters:
nColumns Number of columns
Returns:
None

void RmDynamicVariable::SetNumRows int  nRows  ) 
 

Set number of rows.

Set number of rows

Parameters:
nRows number of rows
Returns:
None

virtual void RmDynamicVariable::Update RmNodeUpdateType  nodeUpdateType,
RmNode pRmUpdateRootNode
[virtual]
 

Update.

Updates the values of this vector

Parameters:
nodeUpdateType Update type
See also:
RmNodeUpdateType
Parameters:
pRmUpdateRootNode Root node for update
Returns:
None

Reimplemented from RmNode.


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 16:08:59 2005 for RenderMonkey SDK by doxygen 1.3.6