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

RmPass Class Reference

Pass. More...

#include <RmEffect.h>

Inheritance diagram for RmPass:

RmNode RmGLPass List of all members.

Public Member Functions

 RmPass ()
 Default Constructor.

 RmPass (const RM_TCHAR *strPassName, const int nPassIndex)
 Constructor.

virtual ~RmPass ()
 Destructor.

virtual bool AddChild (RmNode *pChildNode, RmNode *pNextSibling=NULL)
 AddChild.

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 bool IsNodeValid ()
 Is node valid.

bool AddVertexShader (RmShader *pVertexShader)
 Add vertex shader.

bool AddPixelShader (RmShader *pPixelShader)
 Add pixel shader.

RmShaderGetVertexShader ()
 Get vertex shader.

RmShaderGetPixelShader ()
 Get pixel shader.

RmShaderGetActivePixelShader ()
 Get active pixel shader.

RmShaderGetActiveVertexShader ()
 Get active vertex shader.

RmShaderGetShader (const RM_TCHAR *strShaderName)
 Get shader by name.

bool AddStreamMappingReference (RmStreamMapReference *pStreamMapReference)
 Add stream mapping reference.

RmStreamMapGetStreamMap ()
 Get stream map.

RmStreamMapReference * GetStreamMapReference ()
 Get streammapping reference.

bool AddRenderStateBlock (RmRenderStateBlock *pBlock)
 Add render state block.

RmRenderStateBlockGetRenderStateBlock ()
 Get render state block.

int GetNumTextureObjects ()
 Get number of texture object.

int GetNumVertexTextureObjects ()
 Get number of vertex texture object.

int GetNumLightObjects ()
 Get number of light object.

int GetNumMaterialObjects ()
 Get number of material object.

int GetNumRenderTargets ()
 Get number of render target object.

int GetMaxNumRenderTargets ()
 Get maximum number of render targets.

RmTextureObjectGetTextureObject (int nIndex)
RmTextureObjectGetVertexTextureObject (int nIndex)
RmLightObjectGetLightObject (int nIndex)
RmMaterialObjectGetMaterialObject (int nIndex)
RmRenderTargetGetRenderTarget (int nIndex=0)
bool IsRenderingToBackBuffer ()
bool AddModelReference (RmModelReference *pModelRef)
 Add Model reference.

RmModelDataGetModel ()
 Get model.

RmModelReferenceGetModelReference ()
 Get model reference.

bool AddRenderTarget (RmRenderTarget *pRenderTarget)
 Add render target.

void Enable (bool bEnable=true)
 Enable pass.

bool IsEnabled ()
 Is enabled.

bool IsDisabled ()
 Is pass disabled.

void * GetModelResource ()
 Get model resource.

void SetModelResource (void *pModelResource)
 Set model resource.

RmCameraReferenceGetCameraReference ()
 Get camera reference.

Reordering object functions
void ReOrderTextureObjectStageIndices ()
 Reorder objects.

void ReOrderLightObjectStageIndices ()
void ReOrderMaterialObjectStageIndices ()
void ReOrderRenderTargetStageIndices ()
Object iterator functions
RmTextureObjectListIterator BeginTextureObjects ()
 Iterators for objects.

RmTextureObjectListConstIterator BeginTextureObjects () const
RmTextureObjectListIterator EndTextureObjects ()
RmTextureObjectListConstIterator EndTextureObjects () const
RmTextureObjectListIterator BeginVertexTextureObjects ()
RmTextureObjectListConstIterator BeginVertexTextureObjects () const
RmTextureObjectListIterator EndVertexTextureObjects ()
RmTextureObjectListConstIterator EndVertexTextureObjects () const
RmLightObjectListIterator BeginLightObjects ()
RmLightObjectListConstIterator BeginLightObjects () const
RmLightObjectListIterator EndLightObjects ()
RmLightObjectListConstIterator EndLightObjects () const
RmMaterialObjectListIterator BeginMaterialObjects ()
RmMaterialObjectListConstIterator BeginMaterialObjects () const
RmMaterialObjectListIterator EndMaterialObjects ()
RmMaterialObjectListConstIterator EndMaterialObjects () const
RmRenderTargetListIterator BeginRenderTargets ()
RmRenderTargetListConstIterator BeginRenderTargets () const
RmRenderTargetListIterator EndRenderTargets ()
RmRenderTargetListConstIterator EndRenderTargets () const
int GetPassIndex ()
 Get / Set the pass nIndex.

void SetPassIndex (int nPassIndex)

Protected Member Functions

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

virtual void SetType (const RM_TCHAR *strNewType)
 Set type.

virtual RmNodeTypeChildRuleListGetNodeTypeChildRuleList ()
 Parent / Child rule list function.

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


Protected Attributes

bool m_bEnabled
 Flag for disabling or enabling rendering of a pass:.

int m_nPassIndex
 Pass index.

RmShaderm_pPixelShader
 Pixel Shader.

RmShaderm_pVertexShader
 Vertex Shader.

RmTextureObjectList m_textureObjectList
 Collection of RmTextureObjects.

RmTextureObjectList m_vertexTextureObjectList
 Collection of vertex RmTextureObjects.

RmLightObjectList m_lightObjectList
 Collection of RmLightObject.

RmMaterialObjectList m_materialObjectList
 Collection of RmMaterialObject.

RmRenderTargetList m_renderTargetList
 Collection of RmRenderTarget.

RmStreamMapReference * m_pStreamMapReference
 Stream mapping reference node.

RmModelReferencem_pModelReference
 Geometry model reference.

RmRenderStateBlockm_pRenderStateBlock
 Render state block node:.

RmCameraReferencem_pRmCameraReference
 Camera Reference node.

void * m_pModelResource
 Used for storing a pointer to the run-time model data resource.


Detailed Description

Pass.

RmPass structure contains various structures used to render a single pass of an effect


Constructor & Destructor Documentation

RmPass::RmPass  ) 
 

Default Constructor.

Default constructor

RmPass::RmPass const RM_TCHAR *  strPassName,
const int  nPassIndex
 

Constructor.

Creates a new pass node with the specified name. If bInitialize parameter is true, the pass is created with a pair of shaders (their type is according to the pass API determination), a stream mapping reference node and a model reference node.

Parameters:
strPassName Name of node
nPassIndex Pass index

virtual RmPass::~RmPass  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual bool RmPass::AddChild RmNode pChildNode,
RmNode pNextSibling = NULL
[virtual]
 

AddChild.

Add a new child node

Parameters:
pChildNode Child node to add
pNextSibling If this is not NULL, child will be added before that sibling
Returns:
True on success

Reimplemented from RmNode.

Reimplemented in RmGLPass.

bool RmPass::AddModelReference RmModelReference pModelRef  ) 
 

Add Model reference.

Add model reference to the pass. If the pass already contains a model reference, it will be replaced with the specified object.

Parameters:
pModelRef Model reference
See also:
RmModelReference
Returns:
True on success

bool RmPass::AddPixelShader RmShader pPixelShader  ) 
 

Add pixel shader.

Adds the specified shader as the pixel shader to the pass

Parameters:
pPixelShader PixelShader to add
Returns:
True on success

bool RmPass::AddRenderStateBlock RmRenderStateBlock pBlock  ) 
 

Add render state block.

Add render state block to the pass. Note that if the pass already has a render state block present, the old one will be deleted and replaced with the newly specified render state block.

Parameters:
pBloc Render state block
See also:
RmRenderStateBlock
Returns:
True on success

bool RmPass::AddRenderTarget RmRenderTarget pRenderTarget  ) 
 

Add render target.

Add render target node to this pass. If the pass already contains a render target node, it will be deleted and replaced with the newly specified node

Parameters:
Render target to addd
See also:
RmRenderTarget
Returns:
True on success

bool RmPass::AddStreamMappingReference RmStreamMapReference *  pStreamMapReference  ) 
 

Add stream mapping reference.

Add the stream mapping reference node to this pass node. Note that if the pass already contains a stream mapping node or a stream mapping reference node, it will be replaced with the specified node.

Parameters:
pStreamMapReference Stream mapping reference
See also:
RmStreamMapReference
Returns:
True on success

bool RmPass::AddVertexShader RmShader pVertexShader  ) 
 

Add vertex shader.

Adds the specified shader as the vertex shader to the pass

Parameters:
pVertexShader VertexShader to add
Returns:
True on success

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

Clone this node.

Creates a clone of this node

Returns:
Cloned node. Returns NULL if cloning failed.

Reimplemented from RmNode.

Reimplemented in RmGLPass.

virtual void RmPass::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 RmNode.

Reimplemented in RmGLPass.

void RmPass::Enable bool  bEnable = true  )  [inline]
 

Enable pass.

Enable or disable rendering of this pass. Enable(false) disables rendering of this pass

Parameters:
bEnable Enable flag
Returns:
None

RmShader* RmPass::GetActivePixelShader  ) 
 

Get active pixel shader.

This method retrieves the pixel shader that will be used by the pass to setup its rendering state. First the pass itself is checked for availability of particular shader node. Then if the pass doesn't have the shader, the method walks up the the effect passes and then up to the default effect passes. As soon as it finds the first shader, it returns it.

Returns:
Active pixel shader
See also:
RmShader

RmShader* RmPass::GetActiveVertexShader  ) 
 

Get active vertex shader.

This method retrieves the vertex shader that will be used by the pass to setup its rendering state. First the pass itself is checked for availability of particular shader node. Then if the pass doesn't have the shader, the method walks up the the effect passes and then up to the default effect passes. As soon as it finds the first shader, it returns it.

Returns:
Active pixel shader
See also:
RmShader

RmCameraReference* RmPass::GetCameraReference  )  [inline]
 

Get camera reference.

Retrieve camera data from the pass.

Returns:
Camera reference
See also:
RmCameraReference

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

Reimplemented in RmGLPass.

RmLightObject* RmPass::GetLightObject int  nIndex  ) 
 

Get light object by index

Retrieve light object by nIndex

Parameters:
nIndex Index
Returns:
Light object
See also:
RmLightObject

RmMaterialObject* RmPass::GetMaterialObject int  nIndex  ) 
 

Get material object by index

Retrieve material object by nIndex

Parameters:
nIndex Index
Returns:
Material object
See also:
RmMaterialObject

int RmPass::GetMaxNumRenderTargets  ) 
 

Get maximum number of render targets.

Retrieve max number of render targets in the given pass

Returns:
Max number of render targets

RmModelData* RmPass::GetModel  ) 
 

Get model.

Retrieve model data from the pass. Note that if the pass has only a model reference, this method will return the model data node that it references to.

Returns:
Model
See also:
RmModelData

RmModelReference* RmPass::GetModelReference  )  [inline]
 

Get model reference.

Retrieve model reference node from this pass

Returns:
Model reference
See also:
RmModelReference

void* RmPass::GetModelResource  )  [inline]
 

Get model resource.

Retrieve the handle for run-time model resource used for rendering this pass by the viewer plug-in

Returns:
model resource pointer

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

Reimplemented in RmGLPass.

int RmPass::GetNumLightObjects  )  [inline]
 

Get number of light object.

Retrieve number of light objects in the given pass

Returns:
Number of light objects

int RmPass::GetNumMaterialObjects  )  [inline]
 

Get number of material object.

Retrieve number of material objects in the given pass

Returns:
Number of material objects

int RmPass::GetNumRenderTargets  )  [inline]
 

Get number of render target object.

Retrieve number of render target objects in the given pass

Returns:
Number of render target objects

int RmPass::GetNumTextureObjects  )  [inline]
 

Get number of texture object.

Retrieve number of texture objects in the given pass

Returns:
Number of texture objects

int RmPass::GetNumVertexTextureObjects  )  [inline]
 

Get number of vertex texture object.

Retrieve number of vertex texture objects in the given pass

Returns:
Number of texture objects

RmShader* RmPass::GetPixelShader  )  [inline]
 

Get pixel shader.

Retrieves the pixel shader from the pass

Returns:
Pixel shader
See also:
RmShader

RmRenderStateBlock* RmPass::GetRenderStateBlock  )  [inline]
 

Get render state block.

Retrieve render state block from the pass

Parameters:
Render state block
See also:
RmRenderStateBlock

RmRenderTarget* RmPass::GetRenderTarget int  nIndex = 0  ) 
 

Get renderTarget object by index

Retrieve renderTarget object by nIndex

Parameters:
nIndex Index
Returns:
RenderTarget object
See also:
RmRenderTargetObject

RmShader* RmPass::GetShader const RM_TCHAR *  strShaderName  ) 
 

Get shader by name.

Retrieves a shader node by its name. Returns NULL if shader name didn't match any shaders in this pass

Parameters:
strShaderName Name of shader
Returns:
Shader
See also:
RmShader

RmStreamMap* RmPass::GetStreamMap  ) 
 

Get stream map.

Retrieve stream mapping node from the pass node. Note: if the pass only stores a stream mapping reference node, this method will actually return the stream mapping node the reference points to

Returns:
Stream map
See also:
RmStreamMap

RmStreamMapReference* RmPass::GetStreamMapReference  )  [inline]
 

Get streammapping reference.

Retrieve stream map reference node from this pass

Returns:
Stream mapping reference
See also:
RmStreamMapReference

RmTextureObject* RmPass::GetTextureObject int  nIndex  ) 
 

Get texture object by index

Retrieve texture object by nIndex

Parameters:
nIndex Index
Returns:
Texture object
See also:
RmTextureObject

RmShader* RmPass::GetVertexShader  )  [inline]
 

Get vertex shader.

Retrieves the vertex shader from the pass

Returns:
Vertex shader
See also:
RmShader

RmTextureObject* RmPass::GetVertexTextureObject int  nIndex  ) 
 

Get vertex texture object by index

Retrieve vertex texture object by nIndex

Parameters:
nIndex Index
Returns:
Texture object
See also:
RmTextureObject

bool RmPass::IsDisabled  )  [inline]
 

Is pass disabled.

Retrieves whether this pass is disabled (true) or enabled (false) for rendering

Returns:
Flag if pass is disabled (true) or enabled (false)

bool RmPass::IsEnabled  )  [inline]
 

Is enabled.

Retrieves whether this pass is enabled (true) or disabled (false) for rendering

Returns:
Flag if pass is enabled (true) or disabled (false)

virtual bool RmPass::IsNodeValid  )  [virtual]
 

Is node valid.

Node valid property

Returns:
True if node is valid

Reimplemented from RmNode.

bool RmPass::IsRenderingToBackBuffer  ) 
 

Checks whether this pass renders to back buffer or to a target

Checks whether this pass renders to back buffer or to a target

Returns:
True if pass outputs to backbuffer, false if it renders to a target

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

Reimplemented in RmGLPass.

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

Reimplemented in RmGLPass.

void RmPass::SetModelResource void *  pModelResource  )  [inline]
 

Set model resource.

Set handle for the run-time model resource used for rendering this pass by the viewer plug-in

Parameters:
pModelResource Model resource
Returns:
None

virtual void RmPass::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 RmNode.

Reimplemented in RmGLPass.

virtual void RmPass::SetType const RM_TCHAR *  strNewType  )  [inline, protected, virtual]
 

Set type.

Compose the type string chain

Parameters:
strNewType New type string
Returns:
None

Reimplemented from RmNode.

virtual void RmPass::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.

Reimplemented in RmGLPass.


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