CSLMaterial Class Reference

This class represents an SI_Material template. More...

#include <Material.h>

Inheritance diagram for CSLMaterial:

CSLBaseMaterial CSLTemplate CSIBCNode List of all members.

Public Types

enum   EShadingModel {
  CONSTANT,
  LAMBERT,
  PHONG,
  BLINN,
  SHADOW_OBJECT,
  VERTEX_COLOR
}

Public Member Functions

  CSLMaterial (CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate)
virtual  ~CSLMaterial ()
CSIBCColorf  GetAmbientColor ()
SI_Void  SetAmbientColor (CSIBCColorf &in_rColor)
CSIBCColorf  GetDiffuseColor ()
SI_Void  SetDiffuseColor (CSIBCColorf &in_rColor)
CSIBCColorf  GetEmissiveColor ()
SI_Void  SetEmissiveColor (CSIBCColorf &in_rColor)
EShadingModel  GetShadingModel ()
SI_Void  SetShadingModel (EShadingModel in_Value)
CSIBCColorf  GetSpecularColor ()
SI_Void  SetSpecularColor (CSIBCColorf &in_rColor)
SI_Float  GetSpecularDecay ()
SI_Void  SetSpecularDecay (SI_Float in_fValue)
CSLTexture2D Texture2D ()
CSLTexture2D CreateTexture2D ()
SI_Error  DestroyTexture2D ()
virtual SI_Error  Synchronize ()
virtual ETemplateType  Type ()
virtual CSLAnimatableType ParameterFromName (SI_Char *in_szName)
virtual CSLAnimatableType ParameterFromType (EFCurveType in_Type, SI_Char *in_szParameterName)

Detailed Description

This class represents an SI_Material template.

Defines a legacy SI_Material (see the SI_Material template reference).


Member Enumeration Documentation

enum EShadingModel

This enum lists possible shading models for a material.

Enumerator:
CONSTANT  Constant shading
LAMBERT  Lambert shading
PHONG  Phong shading
BLINN  Blinn shading
SHADOW_OBJECT  Shawdow object
VERTEX_COLOR  Vertex color lighting


Constructor & Destructor Documentation

CSLMaterial ( CSLScene in_pScene,
CSLModel in_pModel,
CdotXSITemplate in_pTemplate  
)

Constructor

Parameters:
[in]  in_pScene  Pointer to the scene containing the Material
[in]  in_pModel  Pointer to the model containing the Material
[in]  in_pTemplate  Pointer to the CdotXSITemplate containing the Material

virtual ~CSLMaterial (  )  [virtual]

Destructor


Member Function Documentation

CSIBCColorf GetAmbientColor (  ) 

Returns the ambient color of the material.

Returns:
Ambient color.

SI_Void SetAmbientColor ( CSIBCColorf in_rColor  ) 

Changes the ambient color of the material.

Parameters:
[in]  in_rColor  New ambient color.

CSIBCColorf GetDiffuseColor (  ) 

Returns the diffuse color of the material.

Returns:
Diffuse color.

SI_Void SetDiffuseColor ( CSIBCColorf in_rColor  ) 

Changes the diffuset color of the material.

Parameters:
[in]  in_rColor  New diffuse color.

CSIBCColorf GetEmissiveColor (  ) 

Returns the emissive color of the material.

Returns:
emissive color.

SI_Void SetEmissiveColor ( CSIBCColorf in_rColor  ) 

Changes the emissive color of the material.

Parameters:
[in]  in_rColor  New emissive color.

EShadingModel GetShadingModel (  ) 

Returns the shading model of the material.

Returns:
Shading model.

SI_Void SetShadingModel ( EShadingModel  in_Value  ) 

Changes the shading model of the material.

Parameters:
[in]  in_Value  New shading model.

CSIBCColorf GetSpecularColor (  ) 

Returns the specular color of the material.

Returns:
Specular color.

SI_Void SetSpecularColor ( CSIBCColorf in_rColor  ) 

Changes the specular color of the material.

Parameters:
[in]  in_rColor  New specular color

SI_Float GetSpecularDecay (  ) 

Returns the specular decay of the material.

Returns:
Specular decay.

SI_Void SetSpecularDecay ( SI_Float  in_fValue  ) 

Changes the specular decay of the material.

Parameters:
[in]  in_fValue  New Specular decay.

CSLTexture2D* Texture2D (  ) 

Returns the 2D texture of the material.

Returns:
Pointer to a texture 2D object.

CSLTexture2D* CreateTexture2D (  ) 

Create a new texture 2D for the material.

Returns:
Newly creates texture 2D object.

SI_Error DestroyTexture2D (  ) 

Destroys the texture 2D of the material.

Returns:
Error code.

virtual SI_Error Synchronize (  )  [virtual]

Synchronizes to ensure that the animated parameter is up to date.

Returns:
Error code

Reimplemented from CSLBaseMaterial.

virtual ETemplateType Type (  )  [virtual]

Returns the type of this template

Return values:
CSLTemplate::SI_MATERIAL  Template type

Implements CSLTemplate.

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

Returns a proxy to the specified parameter.

Parameters:
[in]  in_szName  Name of the parameter
Returns:
Pointer to a parameter proxy.

Reimplemented from CSLTemplate.

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

Returns a proxy to the specified parameter.

Parameters:
[in]  in_Type  Type of parameter
[in]  in_szParameterName  Name of the parameter if the type is SI_PARAMETER
Returns:
Pointer to a parameter proxy.

Reimplemented from CSLTemplate.


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