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

RmMaterialVariable Class Reference

Material Variable Node. More...

#include <RmEffect.h>

Inheritance diagram for RmMaterialVariable:

RmVariable RmNode List of all members.

Public Member Functions

 RmMaterialVariable ()
 Public Member Functions Constructor.

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

const float * GetAmbientColor ()
 Get ambient color.

const float * GetDiffuseColor ()
 Get diffuse color.

const float * GetSpecularColor ()
 Get specular color.

const float * GetEmissiveColor ()
 Get emissive color.

float GetSpecularPower ()
 Get specular power.

void SetAmbientColor (float *pfColorArray)
 Set ambient color.

void SetDiffuseColor (float *pfColorArray)
 Set diffuse color.

void SetSpecularColor (float *pfColorArray)
 Set specular color.

void SetEmissiveColor (float *pfColorArray)
 Set emissive color.

void SetSpecularPower (float fSpecularPower)
 Set specular power.


Protected Member Functions

virtual void CopyNodeData (RmNode *pDestinationNode, bool bIncludeLoadedData)
 Protected Member Functions 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_fAmbientColorArray [4]
 Ambient color.

float m_fDiffuseColorArray [4]
 Diffuse color.

float m_fSpecularColorArray [4]
 Specular color.

float m_fEmissiveColorArray [4]
 Emissive color.

float m_fSpecularPower
 Specular power.


Detailed Description

Material Variable Node.

RmMaterialVariable is a class for general material properties


Constructor & Destructor Documentation

RmMaterialVariable::RmMaterialVariable  ) 
 

Public Member Functions Constructor.

Constructor

virtual RmMaterialVariable::~RmMaterialVariable  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual RmNode* RmMaterialVariable::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 RmMaterialVariable::CopyNodeData RmNode pDestinationNode,
bool  bIncludeLoadedData
[protected, virtual]
 

Protected Member Functions 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.

const float* RmMaterialVariable::GetAmbientColor  )  [inline]
 

Get ambient color.

Get ambient color

Returns:
Float array of colors

virtual const RM_TCHAR* RmMaterialVariable::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.

const float* RmMaterialVariable::GetDiffuseColor  )  [inline]
 

Get diffuse color.

Get diffuse color

Returns:
Float array of colors

const float* RmMaterialVariable::GetEmissiveColor  )  [inline]
 

Get emissive color.

Get emissive color

Returns:
Float array of colors

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

const float* RmMaterialVariable::GetSpecularColor  )  [inline]
 

Get specular color.

Get specular color

Returns:
Float array of colors

float RmMaterialVariable::GetSpecularPower  )  [inline]
 

Get specular power.

Get specular power

Returns:
Specular power

virtual bool RmMaterialVariable::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 RmMaterialVariable::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 RmMaterialVariable::SetAmbientColor float *  pfColorArray  ) 
 

Set ambient color.

Set ambient color

Parameters:
fpColorArray Float array of colors
Returns:
None

void RmMaterialVariable::SetDiffuseColor float *  pfColorArray  ) 
 

Set diffuse color.

Set diffuse color

Parameters:
fpColorArray Float array of colors
Returns:
None

void RmMaterialVariable::SetEmissiveColor float *  pfColorArray  ) 
 

Set emissive color.

Set emissive color

Parameters:
fpColorArray Float array of colors
Returns:
None

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

Set Name.

Set the name of the node to the specified value

Parameters:
strNewName New Name
Returns:
None

Reimplemented from RmNode.

virtual void RmMaterialVariable::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 RmMaterialVariable::SetSpecularColor float *  pfColorArray  ) 
 

Set specular color.

Set specular color

Parameters:
fpColorArray Float array of colors
Returns:
None

void RmMaterialVariable::SetSpecularPower float  fSpecularPower  )  [inline]
 

Set specular power.

Set specular color

Parameters:
fpColorArray Float array of colors
Returns:
None

virtual void RmMaterialVariable::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:08 2005 for RenderMonkey SDK by doxygen 1.3.6