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

RmTextureVariable Class Reference

Texture Variable Node. More...

#include <RmEffect.h>

Inheritance diagram for RmTextureVariable:

RmVariable RmNode Rm2DTextureVariable Rm3DTextureVariable RmCubemapVariable RmRenderableTexture List of all members.

Public Member Functions

 RmTextureVariable ()
 Default Constructor.

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

const RmStringT & GetFileName ()
 Get filename.

void GetFullFileName (RM_TCHAR *strFullPath, int nSize)
 Full filename.

void SetFileName (const RM_TCHAR *strFileName, bool bUpdateDatabase=true)
 Set filename.

virtual bool LoadTexture ()
 LoadTexture.

virtual RmTextureGetTexture ()
 Get texture.

virtual const RmTextureGetTexture () const
 Get texture.

void SetRequestedPixelFormat (RmPixelFormatType format)
 Set requested pixelformat.

RmPixelFormatType GetRequestedPixelFormat () const
 Get requested pixel format.

void SetOrigin (RmTextureOrigin textureOrigin)
 Set Origin.

RmTextureOrigin GetOrigin ()
 Get Origin.


Protected Member Functions

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

virtual void SetType (const RM_TCHAR *strNewType)
 SetType.

virtual RmNodeTypeChildRuleListGetNodeTypeChildRuleList ()
 Parent / Child rule list function.

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


Protected Attributes

RmStringT m_strFileName
 The file name associated with this texture variable.

RmPixelFormatType m_requestedPixelFormat
RmTextureOrigin m_textureOrigin
 The texture orientation.

bool m_bTextureLoaded
 Flag if texture is loaded.


Detailed Description

Texture Variable Node.

RmTextureVariable is a node containing a generic TEXTURE variable


Constructor & Destructor Documentation

RmTextureVariable::RmTextureVariable  ) 
 

Default Constructor.

Default constructor

virtual RmTextureVariable::~RmTextureVariable  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

virtual RmNode* RmTextureVariable::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 Rm2DTextureVariable, RmCubemapVariable, Rm3DTextureVariable, and RmRenderableTexture.

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

Reimplemented in RmRenderableTexture.

virtual const RM_TCHAR* RmTextureVariable::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 Rm2DTextureVariable, RmCubemapVariable, Rm3DTextureVariable, and RmRenderableTexture.

const RmStringT& RmTextureVariable::GetFileName  )  [inline]
 

Get filename.

Retrieve the file name stored in this texture variable

Returns:
Filename for this texture node

void RmTextureVariable::GetFullFileName RM_TCHAR *  strFullPath,
int  nSize
 

Full filename.

Retrieve full file name, corrected for RenderMonkey's relative paths, etc.

Returns:
Full path name

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

Reimplemented in RmRenderableTexture.

RmTextureOrigin RmTextureVariable::GetOrigin  )  [inline]
 

Get Origin.

Gets the origin of the texture

Returns:
Texture Origin
See also:
RmTextureOrigin

RmPixelFormatType RmTextureVariable::GetRequestedPixelFormat  )  const [inline]
 

Get requested pixel format.

Returns current requested pixel format

Returns:
Current requested pixel format
See also:
RmPixelFormatType

virtual const RmTexture* RmTextureVariable::GetTexture  )  const [inline, virtual]
 

Get texture.

Returns RenderMonkey Texture

Returns:
Pointer to RenderMonkey Texture
See also:
RmTexture

Reimplemented in Rm2DTextureVariable, RmCubemapVariable, and Rm3DTextureVariable.

virtual RmTexture* RmTextureVariable::GetTexture  )  [inline, virtual]
 

Get texture.

Returns RenderMonkey Texture

Returns:
Pointer to RenderMonkey Texture
See also:
RmTexture

Reimplemented in Rm2DTextureVariable, RmCubemapVariable, and Rm3DTextureVariable.

virtual bool RmTextureVariable::IsNodeValid  )  [virtual]
 

Is node valid.

Node valid property

Returns:
True if Node is valid, False otherwise

Reimplemented from RmNode.

Reimplemented in Rm2DTextureVariable, RmCubemapVariable, Rm3DTextureVariable, and RmRenderableTexture.

virtual bool RmTextureVariable::LoadTexture  )  [inline, virtual]
 

LoadTexture.

LoadTexture ( should be overridden by derived class )

Returns:
True on success, False otherwise

Reimplemented in Rm2DTextureVariable, RmCubemapVariable, Rm3DTextureVariable, and RmRenderableTexture.

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

Reimplemented in RmRenderableTexture.

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

Reimplemented in RmRenderableTexture.

void RmTextureVariable::SetFileName const RM_TCHAR *  strFileName,
bool  bUpdateDatabase = true
 

Set filename.

Set new file name associated with this texture variable

Parameters:
strFileName New filename
bUpdateDatabase Flag to update the database
Returns:
None

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

Reimplemented in RmRenderableTexture.

void RmTextureVariable::SetOrigin RmTextureOrigin  textureOrigin  )  [inline]
 

Set Origin.

Sets the origin of the texture

Returns:
None

void RmTextureVariable::SetRequestedPixelFormat RmPixelFormatType  format  )  [inline]
 

Set requested pixelformat.

When texture is loaded from file, it will convert to requested texture format If requested texture format is unknown, then format from file is used.

Parameters:
format Requested format
See also:
RmPixelFormatType
Returns:
None

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

SetType.

Compose the type string chain

Parameters:
strNewType New type string
Returns:
None

Reimplemented from RmVariable.

Reimplemented in Rm2DTextureVariable.

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


Member Data Documentation

RmPixelFormatType RmTextureVariable::m_requestedPixelFormat [protected]
 

When file is loaded from file, texture will be converted to this format.
If it is RM_PIXELFORMAT_UNKNOWN, then whatever the format supplied from file
will be used to create Texture.


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