CSLXSIShader Class Reference

#include <XSIShader.h>

Inheritance diagram for CSLXSIShader:

CSLTemplate CSIBCNode List of all members.

Public Types

enum   EOutputType {
  SI_OT_UNKNOWN,
  SI_OT_BOOLEAN,
  SI_OT_INTEGER,
  SI_OT_SCALAR,
  SI_OT_COLOR,
  SI_OT_VECTOR,
  SI_OT_TEXTURE_SPACE,
  SI_OT_TEXTURE,
  SI_OT_STRING,
  SI_OT_FILENAME,
  SI_OT_LENS,
  SI_OT_LIGHT,
  SI_OT_MATERIAL,
  SI_OT_MODEL,
  SI_OT_MULTI
}
  Output types. More...

Public Member Functions

  CSLXSIShader (CSLScene *in_pScene, CSLModel *in_pParentModel, CdotXSITemplate *in_pTemplate, CSLXSIMaterial *in_pParentMaterial=NULL)
virtual  ~CSLXSIShader ()
  Destructor.
SI_Error  Synchronize ()
CSLTemplate::ETemplateType  Type ()
CSLVariantParameter AddParameter ()
SI_Error  RemoveParameter (SI_Int in_nIndex)
SI_Error  RemoveParameter (CSLVariantParameter *in_pToRemove)
SI_Error  ClearParameters ()
CSLVariantParameter ConnectParameter (CSLVariantParameter *in_pToConnect)
CSLVariantParameter **  GetParameterList ()
CSLVariantParameter FindParameterByName (char *in_pName)
SI_Int  GetParameterCount ()
virtual CSLAnimatableType ParameterFromName (SI_Char *in_szName)
virtual CSLAnimatableType ParameterFromType (EFCurveType in_Type, SI_Char *in_szParameterName)
CSLShaderConnectionPoint AddConnectionPoint ()
SI_Error  RemoveConnectionPoint (SI_Int in_nIndex)
SI_Error  RemoveConnectionPoint (CSLShaderConnectionPoint *in_pToRemove)
SI_Error  ClearConnectionPoints ()
CSLShaderConnectionPoint ConnectConnectionPoint (CSLShaderConnectionPoint *in_pToConnect)
CSLShaderConnectionPoint **  GetConnectionPointList ()
SI_Int  GetConnectionPointCount ()
CSLAnimatableType GetParameterFromModel (SI_Char *in_szParamName, CSLModel *in_pFromModel)
CSLShaderInstanceData AddInstanceData ()
SI_Error  RemoveInstanceData (SI_Int in_nIndex)
SI_Error  RemoveInstanceData (CSLShaderInstanceData *in_pToRemove)
SI_Error  ClearInstanceDatas ()
CSLShaderInstanceData ConnectInstanceData (CSLShaderInstanceData *in_pToConnect)
CSLShaderInstanceData **  GetInstanceDataList ()
SI_Int  GetInstanceDataCount ()
SI_Char *  GetProgID ()
SI_Void  SetProgID (SI_Char *in_szProgID)
CSLShaderConnectionPoint ConnectShader (CSLXSIShader *in_pSource, char *in_pConnection)
CSLShaderConnectionPoint ConnectImage (CSLImage *in_pSource, char *in_pConnection)
EOutputType  GetOutputType ()
SI_Void  SetOutputType (EOutputType in_OutputType)
CSLXSIShaderMultiPortConnection AddMultiPortConnection ()
SI_Error  RemoveMultiPortConnection (SI_Int in_nIndex)
SI_Error  RemoveMultiPortConnection (CSLXSIShaderMultiPortConnection *in_pToRemove)
CSLXSIShaderMultiPortConnection GetMultiPortConnection (SI_Int in_nIndex)
CSLXSIShaderMultiPortConnection GetMultiPortConnectionByParameter (SI_Char *in_pParameter)
SI_Int  GetMultiPortConnectionCount ()
SI_Error  ClearMultiPortConnections ()
CSLXSIShaderMultiPortConnection **  GetMultiPortConnectionList ()
CSLXSIShaderMultiPortConnection ConnectMultiPortConnection (CSLXSIShaderMultiPortConnection *in_pToConnect)
CSLXSIShaderMultiPortConnection FindMultiPortConnectionByParameterName (SI_Char *in_pName)
CSLXSITextureLayer AddTextureLayer ()
SI_Error  RemoveTextureLayer (SI_Int in_nIndex)
SI_Error  RemoveTextureLayer (CSLXSITextureLayer *in_pToRemove)
CSLXSITextureLayer GetTextureLayer (SI_Int in_nIndex)
CSLXSITextureLayer FindTextureLayerByOrder (SI_Int in_nOrder)
SI_Int  GetTextureLayerCount ()
SI_Error  ClearTextureLayers ()
CSLXSITextureLayer **  GetTextureLayerList ()
CSLXSITextureLayer ConnectTextureLayer (CSLXSITextureLayer *in_pToConnect)
void  SetParentMaterial (CSLXSIMaterial *in_pParentMaterial)
CSLXSIMaterial ParentMaterial ()
CSLXSIShaderCompound CreateShaderCompound ()
SI_Error  DestroyShaderCompound ()
CSLXSIShaderCompound ConnectShaderCompound (CSLXSIShaderCompound *in_pToConnect)
CSLXSIShaderCompound ShaderCompound ()

Detailed Description

Describes a single Shader node (see the XSI_Shader template reference).
Note:
This template was introduced in dotXSI Version 3.6
See also:
CSLVariantParameter

CSLShaderConnectionPoint

CSLShaderInstanceData

CSLXSIShaderMultiPortConnection

CSLXSITextureLayer


Member Enumeration Documentation

enum EOutputType

Output types.

Enumerator:
SI_OT_UNKNOWN  Unknown output type
SI_OT_BOOLEAN  Boolean shader output type
SI_OT_INTEGER  Integer shader output type
SI_OT_SCALAR  Scalar shader output type
SI_OT_COLOR  Color shader output type
SI_OT_VECTOR  Vector shader output type
SI_OT_TEXTURE_SPACE  Texture space shader output type
SI_OT_TEXTURE  Texture shader output type
SI_OT_STRING  String shader output type
SI_OT_FILENAME  Filename shader output type
SI_OT_LENS  Lens shader output type
SI_OT_LIGHT  Light shader output type
SI_OT_MATERIAL  Material shader output type
SI_OT_MODEL  Model shader output type
SI_OT_MULTI  Multiple output port shader


Constructor & Destructor Documentation

CSLXSIShader ( CSLScene in_pScene,
CSLModel in_pParentModel,
CdotXSITemplate in_pTemplate,
CSLXSIMaterial in_pParentMaterial = NULL  
)

Constructor

Parameters:
in_pScene  Parent scene
in_pModel  Parent model
in_pTemplate  Refered template
in_pParentMaterial  Parent material


Member Function Documentation

SI_Error Synchronize (  )  [virtual]

Commit the current template information

Returns:
SI_Error Whether or not the commit was successful

Reimplemented from CSLTemplate.

CSLTemplate::ETemplateType Type (  )  [inline, virtual]

Returns the type of this template (XSI_SHADER)

Returns:
CSLTemplate::ETemplateType The type of this template (XSI_SHADER)

Implements CSLTemplate.

CSLVariantParameter* AddParameter (  ) 

Add a parameter to the parameter list

Returns:
CSLParameter Pointer to the newly added parameter

SI_Error RemoveParameter ( SI_Int  in_nIndex  ) 

Removes a parameter from the parameter list

Parameters:
in_nIndex  Index of the parameter to remove
Returns:
SI_Error Whether or not the parameter could be removed

SI_Error RemoveParameter ( CSLVariantParameter in_pToRemove  ) 

Removes a parameter from the parameter list

Parameters:
in_pToRemove  Pointer to the parameter to remove
Returns:
SI_Error Whether or not the parameter could be removed

SI_Error ClearParameters (  ) 

Removes all parameters from the parameter list

Returns:
SI_Error Whether or not the list could be cleared

CSLVariantParameter* ConnectParameter ( CSLVariantParameter in_pToConnect  ) 

Adds an exisiting parameter to the parameter list

Parameters:
in_pToConnect  Pointer to the parameter to add
Returns:
The added parameter or null if it already exists in the list

CSLVariantParameter** GetParameterList (  ) 

Gets a pointer to the internally-stored parameter pointer list

Returns:
CSLParameter Pointer to the list

CSLVariantParameter* FindParameterByName ( char *  in_pName  ) 

Finds a parameter by its name

Returns:
CSLVariantParameter the parameter

SI_Int GetParameterCount (  ) 

Gets the total number of parameters

Returns:
SI_Int Number of parameters

virtual CSLAnimatableType* ParameterFromName ( SI_Char *  in_szName  )  [virtual]

Searches for a parameter by name

Parameters:
in_szName  Name of the parameter to look for
Returns:
CSLAnimatableType Pointer to the found parameter or null if not found

Reimplemented from CSLTemplate.

virtual CSLAnimatableType* ParameterFromType ( EFCurveType  in_Type,
SI_Char *  in_szParameterName  
) [virtual]

Return a proxy to the specified parameter.

Parameters:
in_Type  Type of parameter
in_szParameterName  Name of the parameter if the type is SI_PARAMETER
Returns:
CSLAnimatableType* Pointer to a parameter proxy.

Reimplemented from CSLTemplate.

CSLShaderConnectionPoint* AddConnectionPoint (  ) 

Add a connection point to the connection point list

Returns:
CSLShaderConnectionPoint Pointer to the newly added connection point

SI_Error RemoveConnectionPoint ( SI_Int  in_nIndex  ) 

Removes a connection point from the connection point list

Parameters:
in_nIndex  Index of the connection point to remove
Returns:
SI_Error Whether or not the connection point could be removed

SI_Error RemoveConnectionPoint ( CSLShaderConnectionPoint in_pToRemove  ) 

Removes a connection point from the connection point list

Parameters:
in_pToRemove  Pointer to the connection point to remove
Returns:
SI_Error Whether or not the connection point could be removed

SI_Error ClearConnectionPoints (  ) 

Removes all connections points from the connection point list

Returns:
SI_Error Whether or not the list could be cleared

CSLShaderConnectionPoint* ConnectConnectionPoint ( CSLShaderConnectionPoint in_pToConnect  ) 

Adds an exisiting connection point to the connection point list

Parameters:
in_pToConnect  Pointer to the connection point to add
Returns:
The added connection point or null if it already exists in the list

CSLShaderConnectionPoint** GetConnectionPointList (  ) 

Gets a pointer to the internally-stored connection point pointer list

Returns:
CSLConnectionPoint Pointer to the list

SI_Int GetConnectionPointCount (  ) 

Gets the total number of connection points

Returns:
SI_Int Number of connection points

CSLAnimatableType* GetParameterFromModel ( SI_Char *  in_szParamName,
CSLModel in_pFromModel  
)

Retrieves a parameter from a model referenced by an instance data.

Parameters:
in_szParamName  Name of the parameter to fetch.
in_pFromModel  Pointer to the model to get the parameter from
Returns:
CSLAnimatableType* Pointer to the found parameter or NULL if the model or the parameter does not exist.

CSLShaderInstanceData* AddInstanceData (  ) 

Adds an instance data to the instance data list

Returns:
CSLShaderInstanceData Pointer to the newly added instance data

SI_Error RemoveInstanceData ( SI_Int  in_nIndex  ) 

Removes an instance data from the instance data list

Parameters:
in_nIndex  Index of the instance data to remove
Returns:
SI_Error Whether or not the instance data could be removed

SI_Error RemoveInstanceData ( CSLShaderInstanceData in_pToRemove  ) 

Removes an instance data from the instance data list

Parameters:
in_pToRemove  Pointer to the instance data to remove
Returns:
SI_Error Whether or not the instance data could be removed

SI_Error ClearInstanceDatas (  ) 

Removes all instance datas from the shader

Returns:
SI_Error Whether or not the list could be cleared

CSLShaderInstanceData* ConnectInstanceData ( CSLShaderInstanceData in_pToConnect  ) 

Adds an exisiting instance data to the instance data list

Parameters:
in_pToConnect  Pointer to the instance data to add
Returns:
The added instance data or null if it already exists in the list

CSLShaderInstanceData** GetInstanceDataList (  ) 

Gets a pointer to the internally-stored instance data pointer list

Returns:
CSLInstanceData Pointer to the list

SI_Int GetInstanceDataCount (  ) 

Gets the total number of instance datas

Returns:
SI_Int Number of instance datas

SI_Char* GetProgID (  ) 

Gets the ProgID

Returns:
SI_Char Pointer to a string representing the ProgID

SI_Void SetProgID ( SI_Char *  in_szProgID  ) 

Sets the ProgID

Parameters:
in_szProgID  Pointer to a string representing the ProgID

CSLShaderConnectionPoint* ConnectShader ( CSLXSIShader in_pSource,
char *  in_pConnection  
)

Connects a subshader to this shader in_pSource pointer to the subshader to connect in_pConnection name of the connection

CSLShaderConnectionPoint* ConnectImage ( CSLImage in_pSource,
char *  in_pConnection  
)

Connects an image to this shader

Parameters:
in_pSource  Image to connect to this shader
in_pConnection  name of the connection

EOutputType GetOutputType (  ) 

Gets the OutputType

Returns:
SI_Int The OutputType

SI_Void SetOutputType ( EOutputType  in_OutputType  ) 

Sets the OutputType

Parameters:
in_OutputType  New output type to use

CSLXSIShaderMultiPortConnection* AddMultiPortConnection (  ) 

Add a multi port connection to the multi port connection list

Returns:
The added multi port connection

SI_Error RemoveMultiPortConnection ( SI_Int  in_nIndex  ) 

Remove a multi port connection from the multi port connection list

Parameters:
in_nIndex  Index of the multi port connection to remove

SI_Error RemoveMultiPortConnection ( CSLXSIShaderMultiPortConnection in_pToRemove  ) 

Remove a multi port connection from the multi port connection list

Parameters:
in_pToRemove  The multi port connection to remove

CSLXSIShaderMultiPortConnection* GetMultiPortConnection ( SI_Int  in_nIndex  ) 

Get the CSLXSIShaderMultiPortConnection object of a given multi port connection by index.

Parameters:
in_nIndex  Index of the multi port connection to get
Returns:
CSLXSIShaderMultiPortConnection The CSLXSIShaderMultiPortConnection that holds the name and the type of a multi port connection.

CSLXSIShaderMultiPortConnection* GetMultiPortConnectionByParameter ( SI_Char *  in_pParameter  ) 

Get the CSLXSIShaderMultiPortConnection object of a given multi port connection by parameter name.

Parameters:
in_pParameter  Name of the multi port connection parameter you're looking for
Returns:
CSLXSIShaderMultiPortConnection Pointer to the CSLXSIShaderMultiPortConnection found

NULL If not found

SI_Int GetMultiPortConnectionCount (  ) 

Get the number of multi port connection in the multi port connection list

Returns:
SI_Int The number of multi port connection in the multi port connection list

SI_Error ClearMultiPortConnections (  ) 

Deletes all the multi port connection form the multi port connection list

CSLXSIShaderMultiPortConnection** GetMultiPortConnectionList (  ) 

Gets a pointer to the internally-stored multi port connection pointer list

Returns:
CSLXSIShaderMultiPortConnection Pointer to the list

CSLXSIShaderMultiPortConnection* ConnectMultiPortConnection ( CSLXSIShaderMultiPortConnection in_pToConnect  ) 

Adds an exisiting multi port connection to the multi port connection list

Parameters:
in_pToConnect  Pointer to the multi port connection to add
Returns:
The added multi port connection

CSLXSIShaderMultiPortConnection* FindMultiPortConnectionByParameterName ( SI_Char *  in_pName  ) 

Search the multi port connection list for one with a corresponding parameter name

Parameters:
in_pName  The parameter name to look for
Returns:
Pointer on the multi port connection if found, NULL if not found

CSLXSITextureLayer* AddTextureLayer (  ) 

Add a texture layer to the texture layer list

Returns:
The added texture layer

SI_Error RemoveTextureLayer ( SI_Int  in_nIndex  ) 

Remove a texture layer from the texture layer list

Parameters:
in_nIndex  Index of the texture layer to remove

SI_Error RemoveTextureLayer ( CSLXSITextureLayer in_pToRemove  ) 

Remove a texture layer from the texture layer list

Parameters:
in_pToRemove  The texture layer to remove

CSLXSITextureLayer* GetTextureLayer ( SI_Int  in_nIndex  ) 

Get the CSLXSITextureLayer object by index.

Parameters:
in_nIndex  Index of the texture layer to get
Returns:
CSLXSITextureLayer The CSLXSITextureLayer.

CSLXSITextureLayer* FindTextureLayerByOrder ( SI_Int  in_nOrder  ) 

Search the texture layer list for one with a corresponding order index

Parameters:
in_nOrder  The order index of the texture layer to look for
Returns:
Pointer on the texture layer if found, NULL if not found

SI_Int GetTextureLayerCount (  ) 

Get the number of texture layer in the texture layer list

Returns:
SI_Int The number of texture layer in the texture layer list

SI_Error ClearTextureLayers (  ) 

Deletes all the texture layer form the texture layer list

CSLXSITextureLayer** GetTextureLayerList (  ) 

Gets a pointer to the internally-stored texture layer pointer list

Returns:
CSLXSITextureLayer Pointer to the list

CSLXSITextureLayer* ConnectTextureLayer ( CSLXSITextureLayer in_pToConnect  ) 

Adds an exisiting texture layer to the texture layer list

Parameters:
in_pToConnect  Pointer to the texture layer to add
Returns:
The added texture layer

void SetParentMaterial ( CSLXSIMaterial in_pParentMaterial  ) 

Set the material parent of this template.

Parameters:
in_pParentMaterial  Pointer to the parent material.

CSLXSIMaterial* ParentMaterial (  ) 

Return the material parent of this template.

Returns:
CSLModel* Pointer to the parent material.

CSLXSIShaderCompound* CreateShaderCompound (  ) 

Add a Shader Compound object to identify this shader as a compound and to store it's compound specific data.

Returns:
The new Shader Compound object or null if there's already one

SI_Error DestroyShaderCompound (  ) 

Destroys the Shader Compound

Returns:
SI_Error Whether or not the Shader Compound could be destroyed

CSLXSIShaderCompound* ConnectShaderCompound ( CSLXSIShaderCompound in_pToConnect  ) 

Connects an exisiting Shader Compound

Parameters:
in_pToConnect  Pointer to the Shader Compound to use
Returns:
The added Shader Compound or null if there's already one

CSLXSIShaderCompound* ShaderCompound (  ) 

Gets a pointer to the Shader Compound

Returns:
CSLXSIShaderCompound Pointer to the Shader Compound


The documentation for this class was generated from the following file: