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

RmFloatVariable Class Reference

Float Variable Node. More...

#include <RmEffect.h>

Inheritance diagram for RmFloatVariable:

RmVariable RmNode List of all members.

Public Member Functions

 RmFloatVariable ()
 Default constructor.

 RmFloatVariable (float fValue)
 Default constructor.

 RmFloatVariable (float fValue, bool bClamp, float fMin=-1.0f, float fMax=1.0f)
 Default constructor.

virtual ~RmFloatVariable ()
 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 Name.

float GetValue ()
 GetValue.

void SetValue (float fValue)
 Set value.

bool IsClamped ()
 IsClamped.

void SetIsClamped (bool bClamp)
 Set clamp flag.

float GetMin ()
 Get min.

float GetMax ()
 Get max.

void SetMin (float fMin)
 Set min.

void SetMax (float fMax)
 Set max.

void SetMinMax (float fMin, float fMax)
 Set min & max.


Protected Member Functions

virtual void CopyNodeData (RmNode *pDestinationNode, bool bIncludeLoadedData)
 Copy node data.

virtual RmNodeTypeChildRuleListGetNodeTypeChildRuleList ()
 Parent / Child rule list function.

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


Protected Attributes

float m_fValue
 The floating point value stored in this node.

float m_fMin
 The min for clamping a variable.

float m_fMax
 The max for clamping a variable.

bool m_bClamp
 A flag denoting whether this variable is clamped to the bounds or not.


Detailed Description

Float Variable Node.

RmFloat is a single SCALAR FLOAR value


Constructor & Destructor Documentation

RmFloatVariable::RmFloatVariable  ) 
 

Default constructor.

Default constructor: creates a float = 0.0 that is clamped between -1.0 and 1.0

RmFloatVariable::RmFloatVariable float  fValue  ) 
 

Default constructor.

Default constructor - Creates a float node with a given value that is clamped between -1.0 and 1.0

RmFloatVariable::RmFloatVariable float  fValue,
bool  bClamp,
float  fMin = -1.0f,
float  fMax = 1.0f
 

Default constructor.

Default constructor - Creates a float node with a given value and sets whether it's clamped and the range for clamping.

virtual RmFloatVariable::~RmFloatVariable  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

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

Clone this node.

Creates a clone of this node

Returns:
Cloned node. Returns NULL if cloning failed.

Reimplemented from RmNode.

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

Copy node data.

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

Parameters:
pDestinationNode the destination node
Returns:
None

Reimplemented from RmVariable.

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

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

Returns:
Returns description string

Reimplemented from RmNode.

float RmFloatVariable::GetMax  )  [inline]
 

Get max.

Specify the upper bound for clamping

Returns:
Max value

float RmFloatVariable::GetMin  )  [inline]
 

Get min.

Specify the lower bound for clamping

Returns:
Min value

virtual RmNodeTypeChildRuleList* RmFloatVariable::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.

float RmFloatVariable::GetValue  )  [inline]
 

GetValue.

Retrieve the value of this float node

Returns:
Float value

bool RmFloatVariable::IsClamped  )  [inline]
 

IsClamped.

Retrieve whether the float variable is clamped

Returns:
Flag for clamping

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

Load node data from XML.

Loads versioned XML node data. Note that this method will only load the contents of each node, not the data for all of the children nodes. Each child will have its own XML loading function called by the API.

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

Reimplemented from RmVariable.

virtual bool RmFloatVariable::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.

void RmFloatVariable::SetIsClamped bool  bClamp  )  [inline]
 

Set clamp flag.

Set whether this float variable is clamped

Parameters:
bClamp Clamp flag
Returns:
None

void RmFloatVariable::SetMax float  fMax  ) 
 

Set max.

Set the upper bound for clamping

Parameters:
fMax Max value
Returns:
None

void RmFloatVariable::SetMin float  fMin  ) 
 

Set min.

Set the lower bound for clamping

Parameters:
fMin Min value
Returns:
None

void RmFloatVariable::SetMinMax float  fMin,
float  fMax
 

Set min & max.

Set the clamping bounds

Parameters:
fMin Min value
fMax Max value
Returns:
None

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

Set Name.

Set the name of the node to the specified value

Parameters:
strNewName New name

Reimplemented from RmNode.

virtual void RmFloatVariable::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 RmFloatVariable::SetValue float  fValue  ) 
 

Set value.

Set the value for this float node

Parameters:
fValue Value to set
Returns:
None

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

Update.

Updates the internal values of the node

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:09:01 2005 for RenderMonkey SDK by doxygen 1.3.6