TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iMaterial Struct Referenceabstract
Inheritance diagram for iMaterial:
iUnknown

Detailed Description

Material interface.

General

virtual iGraphicsGetGraphics () const =0
 Get the parent graphics object. {Property}. More...
 
virtual void SetName (iHString *ahspName)=0
 Set the material's name. {Property}. More...
 
virtual iHStringGetName () const =0
 Get the material's name. {Property}. More...
 
virtual void SetClass (iHString *ahspName)=0
 Set the material's class. {Property}. More...
 
virtual iHStringGetClass () const =0
 Get the material's class. {Property}. More...
 
virtual tU32 GetWidth () const =0
 Get the texture width. {Property}. More...
 
virtual tU32 GetHeight () const =0
 Get the texture height. {Property}. More...
 
virtual tU32 GetDepth () const =0
 Get the texture depth. {Property}. More...
 
virtual void SetFlags (tMaterialFlags aFlags)=0
 Set the material's flags. {Property}. More...
 
virtual tMaterialFlags GetFlags () const =0
 Get the material's flags. {Property}. More...
 
virtual void SetFVF (tFVF aFVF)=0
 Set the material's FVF. {Property}. More...
 
virtual tFVF GetFVF () const =0
 Get the material's FVF. {Property}. More...
 
virtual tBool SetBlendMode (eBlendMode aBlendMode)=0
 Set the material's blend mode. {Property}. More...
 
virtual eBlendMode GetBlendMode () const =0
 Get the material's blend mode. {Property}. More...
 

Rendering States

virtual tBool SetRasterizerStates (tIntPtr aHandle)=0
 Set the material's rasterizer states. {Property}. More...
 
virtual tIntPtr GetRasterizerStates () const =0
 Get the material's rasterizer states. {Property}. More...
 
virtual tBool SetDepthStencilStates (tIntPtr aHandle)=0
 Set the material's depth stencil states. {Property}. More...
 
virtual tIntPtr GetDepthStencilStates () const =0
 Get the material's depth stencil states. {Property}. More...
 
virtual tBool GetHasShader () const =0
 Get whether any shader is set. {Property}. More...
 
virtual tBool SetShader (eShaderUnit aUnit, iShader *apProgram)=0
 Set the specified shader. {Property}. More...
 
virtual iShaderGetShader (eShaderUnit aUnit) const =0
 Get the specified shader. {Property}. More...
 
virtual tBool SetShaderConstants (iShaderConstants *apBuffer)=0
 Set the material constant buffer. {Property}. More...
 
virtual iShaderConstantsGetShaderConstants () const =0
 Get the material constant buffer. {Property}. More...
 

Textures and Colors

virtual tBool SetChannelEnabled (eMaterialChannel aChannel, tBool abEnabled)=0
 Set whether the specified channel is enabled. {Property}. More...
 
virtual tBool GetChannelEnabled (eMaterialChannel aChannel) const =0
 Get whether the specified channel is enabled. {Property}. More...
 
virtual tBool HasChannelTexture (eMaterialChannel aChannel) const =0
 Check if the material has the specified channel texture. More...
 
virtual tBool SetChannelTexture (eMaterialChannel aChannel, iTexture *apTexture)=0
 Set a material channel texture. {Property}. More...
 
virtual iTextureGetChannelTexture (eMaterialChannel aChannel) const =0
 Get a material channel texture. {Property}. More...
 
virtual tBool SetChannelColor (eMaterialChannel aChannel, const sColor4f &aColor)=0
 Set a material channel color. {Property}. More...
 
virtual const sColor4fGetChannelColor (eMaterialChannel aChannel) const =0
 Get a material channel color. {Property}. More...
 
virtual tBool SetChannelSamplerStates (eMaterialChannel aChannel, tIntPtr aHandle)=0
 Set the sampler states of the specified texture channel. More...
 
virtual tIntPtr GetChannelSamplerStates (eMaterialChannel aChannel) const =0
 Get the sampler states of the specified texture channel. {Property}. More...
 
virtual tBool SetChannelSamplerIndex (eMaterialChannel aChannel, tI8 anSamplerIndex)=0
 Set the sampler index to assign the channel to in shaders. {Property}. More...
 
virtual tI8 GetChannelSamplerIndex (eMaterialChannel aChannel) const =0
 Set the sampler index to assign the channel to in shaders. {Property}. More...
 
virtual tBool CopyChannel (eMaterialChannel aDestChannel, const iMaterial *apSource, eMaterialChannel aSrcChannel)=0
 Copy the channel properties from another material. More...
 

Copy

virtual tBool Copy (const iMaterial *apMat)=0
 Copy the source material. More...
 
virtual iMaterialClone () const =0
 Clone this material. More...
 
virtual tBool Serialize (eSerializeMode aMode, iDataTable *apDT, iHString *ahspBasePath)=0
 Serialize the material in a data table. More...
 

Low level

virtual tPtr GetDescStructPtr () const =0
 Get the material description structure pointer. {Property}. More...
 

Expression

virtual void SetExpression (eMaterialExpression aExpr, iHString *ahspExpr)=0
 Set an expression of the material. {Property}. More...
 
virtual iHStringGetExpression (eMaterialExpression aExpr) const =0
 Get the expression of the material. {Property}. More...
 
virtual sMatrixf GetExpressionValueMatrix (eMaterialExpression aExpr) const =0
 Get the matrix result of the specified material expression. {Property}. More...
 
virtual sVec4f GetExpressionValueVector (eMaterialExpression aExpr) const =0
 Get the vector4 result of the specified material expression. {Property}. More...
 
virtual void SetExpressionObject (eMaterialExpression aExpr, iHString *ahspExpr, iExpression *apExpr)=0
 Set an expression object on the material. More...
 
virtual iExpressionGetExpressionObject (eMaterialExpression aExpr)=0
 Get the expression object. More...
 

Shader Cache

virtual void SetShaderCachePath (eShaderUnit aUnit, iHString *ahspPath)=0
 Set the path of the shader overriding the default shader used by the shader cache. {Property}. More...
 
virtual iHStringGetShaderCachePath (eShaderUnit aUnit) const =0
 Get the path of the shader overriding the default shader used by the shader cache. {Property}. More...
 
virtual tBool SetShaderCacheIndex (eShaderUnit aUnit, tU32 anShaderCacheIndex)=0
 Set the specified shader cache index. {Property}. More...
 
virtual tU32 GetShaderCacheIndex (eShaderUnit aUnit) const =0
 Get the specified shader cache index. {Property}. More...
 

Userdata

virtual tBool SetUserdata (iHString *ahspID, iUnknown *apUserdata)=0
 Set a userdata. {Property}. More...
 
virtual iUnknownGetUserdata (iHString *ahspID) const =0
 Get a userdata. {Property}. More...
 
virtual tSize GetNumUserdata () const =0
 Get the number of userdata. {Property}. More...
 
virtual iHStringGetUserdataName (tU32 anIndex) const =0
 Get the name of the user data at the specified index. {Property}. More...
 
virtual iUnknownGetUserdataFromIndex (tU32 anIndex) const =0
 Get the userdata at the specified index. {Property}. More...
 

Additional Inherited Members

- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iGraphics* GetGraphics ( ) const
pure virtual

Get the parent graphics object. {Property}.

virtual void SetName ( iHString ahspName)
pure virtual

Set the material's name. {Property}.

virtual iHString* GetName ( ) const
pure virtual

Get the material's name. {Property}.

virtual void SetClass ( iHString ahspName)
pure virtual

Set the material's class. {Property}.

virtual iHString* GetClass ( ) const
pure virtual

Get the material's class. {Property}.

virtual tU32 GetWidth ( ) const
pure virtual

Get the texture width. {Property}.

virtual tU32 GetHeight ( ) const
pure virtual

Get the texture height. {Property}.

virtual tU32 GetDepth ( ) const
pure virtual

Get the texture depth. {Property}.

virtual void SetFlags ( tMaterialFlags  aFlags)
pure virtual

Set the material's flags. {Property}.

virtual tMaterialFlags GetFlags ( ) const
pure virtual

Get the material's flags. {Property}.

virtual void SetFVF ( tFVF  aFVF)
pure virtual

Set the material's FVF. {Property}.

virtual tFVF GetFVF ( ) const
pure virtual

Get the material's FVF. {Property}.

virtual tBool SetBlendMode ( eBlendMode  aBlendMode)
pure virtual

Set the material's blend mode. {Property}.

Remarks
Shortcut to base sampler's blend mode.
virtual eBlendMode GetBlendMode ( ) const
pure virtual

Get the material's blend mode. {Property}.

Remarks
Shortcut to base sampler's blend mode.
virtual tBool SetRasterizerStates ( tIntPtr  aHandle)
pure virtual

Set the material's rasterizer states. {Property}.

virtual tIntPtr GetRasterizerStates ( ) const
pure virtual

Get the material's rasterizer states. {Property}.

virtual tBool SetDepthStencilStates ( tIntPtr  aHandle)
pure virtual

Set the material's depth stencil states. {Property}.

virtual tIntPtr GetDepthStencilStates ( ) const
pure virtual

Get the material's depth stencil states. {Property}.

virtual tBool GetHasShader ( ) const
pure virtual

Get whether any shader is set. {Property}.

virtual tBool SetShader ( eShaderUnit  aUnit,
iShader apProgram 
)
pure virtual

Set the specified shader. {Property}.

Remarks
Not cloned with the material.
virtual iShader* GetShader ( eShaderUnit  aUnit) const
pure virtual

Get the specified shader. {Property}.

virtual tBool SetShaderConstants ( iShaderConstants apBuffer)
pure virtual

Set the material constant buffer. {Property}.

virtual iShaderConstants* GetShaderConstants ( ) const
pure virtual

Get the material constant buffer. {Property}.

virtual tBool SetChannelEnabled ( eMaterialChannel  aChannel,
tBool  abEnabled 
)
pure virtual

Set whether the specified channel is enabled. {Property}.

virtual tBool GetChannelEnabled ( eMaterialChannel  aChannel) const
pure virtual

Get whether the specified channel is enabled. {Property}.

virtual tBool HasChannelTexture ( eMaterialChannel  aChannel) const
pure virtual

Check if the material has the specified channel texture.

virtual tBool SetChannelTexture ( eMaterialChannel  aChannel,
iTexture apTexture 
)
pure virtual

Set a material channel texture. {Property}.

Remarks
Not cloned with the material.
virtual iTexture* GetChannelTexture ( eMaterialChannel  aChannel) const
pure virtual

Get a material channel texture. {Property}.

virtual tBool SetChannelColor ( eMaterialChannel  aChannel,
const sColor4f aColor 
)
pure virtual

Set a material channel color. {Property}.

virtual const sColor4f& GetChannelColor ( eMaterialChannel  aChannel) const
pure virtual

Get a material channel color. {Property}.

virtual tBool SetChannelSamplerStates ( eMaterialChannel  aChannel,
tIntPtr  aHandle 
)
pure virtual

Set the sampler states of the specified texture channel.

Remarks
If the sampler states are not specified the default states are used. {Property}
virtual tIntPtr GetChannelSamplerStates ( eMaterialChannel  aChannel) const
pure virtual

Get the sampler states of the specified texture channel. {Property}.

virtual tBool SetChannelSamplerIndex ( eMaterialChannel  aChannel,
tI8  anSamplerIndex 
)
pure virtual

Set the sampler index to assign the channel to in shaders. {Property}.

virtual tI8 GetChannelSamplerIndex ( eMaterialChannel  aChannel) const
pure virtual

Set the sampler index to assign the channel to in shaders. {Property}.

virtual tBool CopyChannel ( eMaterialChannel  aDestChannel,
const iMaterial apSource,
eMaterialChannel  aSrcChannel 
)
pure virtual

Copy the channel properties from another material.

virtual tBool Copy ( const iMaterial apMat)
pure virtual

Copy the source material.

virtual iMaterial* Clone ( ) const
pure virtual

Clone this material.

virtual tBool Serialize ( eSerializeMode  aMode,
iDataTable apDT,
iHString ahspBasePath 
)
pure virtual

Serialize the material in a data table.

virtual tPtr GetDescStructPtr ( ) const
pure virtual

Get the material description structure pointer. {Property}.

virtual void SetExpression ( eMaterialExpression  aExpr,
iHString ahspExpr 
)
pure virtual

Set an expression of the material. {Property}.

virtual iHString* GetExpression ( eMaterialExpression  aExpr) const
pure virtual

Get the expression of the material. {Property}.

virtual sMatrixf GetExpressionValueMatrix ( eMaterialExpression  aExpr) const
pure virtual

Get the matrix result of the specified material expression. {Property}.

Remarks
Returns identity if no valid expression is set.
virtual sVec4f GetExpressionValueVector ( eMaterialExpression  aExpr) const
pure virtual

Get the vector4 result of the specified material expression. {Property}.

Remarks
Returns zero if no valid expression is set.
virtual void SetExpressionObject ( eMaterialExpression  aExpr,
iHString ahspExpr,
iExpression apExpr 
)
pure virtual

Set an expression object on the material.

virtual iExpression* GetExpressionObject ( eMaterialExpression  aExpr)
pure virtual

Get the expression object.

virtual void SetShaderCachePath ( eShaderUnit  aUnit,
iHString ahspPath 
)
pure virtual

Set the path of the shader overriding the default shader used by the shader cache. {Property}.

virtual iHString* GetShaderCachePath ( eShaderUnit  aUnit) const
pure virtual

Get the path of the shader overriding the default shader used by the shader cache. {Property}.

virtual tBool SetShaderCacheIndex ( eShaderUnit  aUnit,
tU32  anShaderCacheIndex 
)
pure virtual

Set the specified shader cache index. {Property}.

Remarks
Not cloned with the material.
virtual tU32 GetShaderCacheIndex ( eShaderUnit  aUnit) const
pure virtual

Get the specified shader cache index. {Property}.

virtual tBool SetUserdata ( iHString ahspID,
iUnknown apUserdata 
)
pure virtual

Set a userdata. {Property}.

virtual iUnknown* GetUserdata ( iHString ahspID) const
pure virtual

Get a userdata. {Property}.

virtual tSize GetNumUserdata ( ) const
pure virtual

Get the number of userdata. {Property}.

virtual iHString* GetUserdataName ( tU32  anIndex) const
pure virtual

Get the name of the user data at the specified index. {Property}.

virtual iUnknown* GetUserdataFromIndex ( tU32  anIndex) const
pure virtual

Get the userdata at the specified index. {Property}.