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

RmLightVariable Class Reference

Light Variable Node. More...

#include <RmEffect.h>

Inheritance diagram for RmLightVariable:

RmVariable RmNode List of all members.

Public Types

enum  LightVariableType { TypePositional, TypeDirectional, TypeSpotlight }
 Public Type Definitions Light Type. More...


Public Member Functions

 RmLightVariable ()
 Public Member Functions Constructor.

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

LightVariableType GetLightVariableType ()
 LightType.

void SetLightVariableType (LightVariableType lightVariableType)
 Set new Light type.

bool IsEnabled ()
 Enabled Flag.

void SetIsEnabled (bool bEnabled)
 Set enabled flag.

const float * GetAmbientColor ()
 Get ambient color.

const float * GetDiffuseColor ()
 Get diffuse color.

const float * GetSpecularColor ()
 Get specular color.

void SetAmbientColor (float *pfColorArray)
 Set ambient color.

void SetDiffuseColor (float *pfColorArray)
 Set diffuse color.

void SetSpecularColor (float *pfColorArray)
 Set specular color.

const float * GetPosition ()
 Get position.

const float * GetDirection ()
 Get direction.

void SetPosition (float *pfPositionArray)
 Set position.

void SetDirection (float *pfDirectionArray)
 Set direction.

const float * GetAttenuation ()
 Get attenuation.

void SetAttenuation (float *pfAttenuationArray)
 Set attenuation.

float GetSpotlightTheta ()
 Get spotlight theta.

float GetSpotlightPhi ()
 Get spotlight phi.

void SetSpotlightTheta (float fSpotlightTheta)
 Set spotlight theta.

void SetSpotlightPhi (float fSpotlightPhi)
 Set spotlight phi.

float GetRange ()
 Get range.

float GetFalloff ()
 Get falloff.

void SetRange (float fRange)
 Set range.

void SetFalloff (float fFalloff)
 Set falloff.


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

LightVariableType m_lightVariableType
 Light type.

bool m_bEnabled
 Enabled flag.

float m_fAmbientColorArray [4]
 Ambient color.

float m_fDiffuseColorArray [4]
 Diffuse color.

float m_fSpecularColorArray [4]
 Specular color.

float m_fPositionArray [3]
 Light's position.

float m_fDirectionArray [3]
 Light's direction.

float m_fAttenuationArray [3]
 Attenuation.

float m_fSpotlightTheta
 Theta angle.

float m_fSpotlightPhi
 Phi angle.

float m_fRange
 Range of light.

float m_fFalloff
 Falloff distance.


Detailed Description

Light Variable Node.

RmLightVariable is a class for general light properties


Member Enumeration Documentation

enum RmLightVariable::LightVariableType
 

Public Type Definitions Light Type.

Type of Light

Enumeration values:
TypePositional  Positional Light.
TypeDirectional  Durectional Light.
TypeSpotlight  SpotLight.


Constructor & Destructor Documentation

RmLightVariable::RmLightVariable  ) 
 

Public Member Functions Constructor.

Constructor

virtual RmLightVariable::~RmLightVariable  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual RmNode* RmLightVariable::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 RmLightVariable::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* RmLightVariable::GetAmbientColor  )  [inline]
 

Get ambient color.

Get ambient color

Returns:
Float array of colors

const float* RmLightVariable::GetAttenuation  )  [inline]
 

Get attenuation.

Get attenuation

Returns:
3 float array as attenuation

virtual const RM_TCHAR* RmLightVariable::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* RmLightVariable::GetDiffuseColor  )  [inline]
 

Get diffuse color.

Get diffuse color

Returns:
Float array of colors

const float* RmLightVariable::GetDirection  )  [inline]
 

Get direction.

Get direction

Returns:
Array of float as direction

float RmLightVariable::GetFalloff  )  [inline]
 

Get falloff.

Get falloff distance of light

Returns:
Falloff of light

LightVariableType RmLightVariable::GetLightVariableType  )  [inline]
 

LightType.

Get light yype

Returns:
Type of light

virtual RmNodeTypeChildRuleList* RmLightVariable::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* RmLightVariable::GetPosition  )  [inline]
 

Get position.

Get position

Returns:
Array of float as position

float RmLightVariable::GetRange  )  [inline]
 

Get range.

Get Range of light

Returns:
Range of light

const float* RmLightVariable::GetSpecularColor  )  [inline]
 

Get specular color.

Get specular color

Returns:
Float array of colors

float RmLightVariable::GetSpotlightPhi  )  [inline]
 

Get spotlight phi.

Get spotlight outer angle in dgrees

Returns:
phi angle

float RmLightVariable::GetSpotlightTheta  )  [inline]
 

Get spotlight theta.

Get spotlight inner angle in dgrees

Returns:
theta angle

bool RmLightVariable::IsEnabled  )  [inline]
 

Enabled Flag.

Light enabled flag

Returns:
True if light is enabled.

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

Set ambient color.

Set ambient color

Parameters:
fpColorArray Float array of colors
Returns:
None

void RmLightVariable::SetAttenuation float *  pfAttenuationArray  ) 
 

Set attenuation.

Set attenuation

Parameters:
pfAttenuationArray 3 float array as attenuation
Returns:
None

void RmLightVariable::SetDiffuseColor float *  pfColorArray  ) 
 

Set diffuse color.

Set diffuse color

Parameters:
fpColorArray Float array of colors
Returns:
None

void RmLightVariable::SetDirection float *  pfDirectionArray  ) 
 

Set direction.

Set direction

Parameters:
pfPositionArray Array of float as direction
Returns:
None

void RmLightVariable::SetFalloff float  fFalloff  )  [inline]
 

Set falloff.

Set falloff of light

Parameters:
fFalloff Falloff of light
Returns:
None

void RmLightVariable::SetIsEnabled bool  bEnabled  )  [inline]
 

Set enabled flag.

Assign enabled flag

Parameters:
bEnabled Enabled flag

void RmLightVariable::SetLightVariableType LightVariableType  lightVariableType  )  [inline]
 

Set new Light type.

Assign new type of light

Parameters:
LightVariableType New light type
Returns:
None

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

SetName.

Set the name of the node to the specified value

Parameters:
strNewName New Name
Returns:
None

Reimplemented from RmNode.

virtual void RmLightVariable::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 RmLightVariable::SetPosition float *  pfPositionArray  ) 
 

Set position.

Set position

Parameters:
pfPositionArray Array of float as position
Returns:
None

void RmLightVariable::SetRange float  fRange  )  [inline]
 

Set range.

Set Range of light

Parameters:
fRange Range of light
Returns:
None

void RmLightVariable::SetSpecularColor float *  pfColorArray  ) 
 

Set specular color.

Set specular color

Parameters:
fpColorArray Float array of colors
Returns:
None

void RmLightVariable::SetSpotlightPhi float  fSpotlightPhi  )  [inline]
 

Set spotlight phi.

Set spotlight outer angle in dgrees

Parameters:
fSpotlightPhi New phi angle
Returns:
None

void RmLightVariable::SetSpotlightTheta float  fSpotlightTheta  )  [inline]
 

Set spotlight theta.

Set spotlight inner angle in dgrees

Parameters:
fSpotlightTheta New theta angle
Returns:
None

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