An interface class to manage access to various parameters used by DirectX effects.
#include <IDxMaterial.h>
Public Types |
|
enum | LightSemantics
{ LIGHT_COLOR, LIGHT_DIRECTION, LIGHT_POSITION, LIGHT_FALLOFF, LIGHT_HOTSPOT, LIGHT_ATTENUATION } |
Public Member Functions |
|
virtual void | ReloadDXEffect ()=0 |
Reloads the current active effect. |
|
virtual int | GetNumberOfEffectBitmaps ()=0 |
Returns the number of bitmaps used by the
currently loaded effect. |
|
virtual PBBitmap * | GetEffectBitmap (int index)=0 |
Gets the bitmap used by the effect. |
|
virtual void | SetEffectBitmap (int index, PBBitmap *bmap)=0 |
Set the bitmap used by the effect. |
|
virtual
const MaxSDK::AssetManagement::AssetUser & |
GetEffectFile ()=0 |
Get the Dx Effect file AssetUser. |
|
virtual void | SetEffectFile (const MaxSDK::AssetManagement::AssetUser &file)=0 |
Set the Dx Effect file AssetUser. |
|
virtual PBBitmap * | GetSoftwareRenderBitmap ()=0 |
Get the bitmap used for the software
rendering overrride. |
|
virtual void | SetSoftwareRenderBitmap (PBBitmap *bmap)=0 |
Set the bitmap to be used by the Renderer.
|
|
virtual int | GetNumberOfLightParams ()=0 |
Get the number of light based parameters.
|
|
virtual INode * | GetLightNode (int index)=0 |
The actual node used by the parameter.
|
|
virtual MCHAR * | GetLightParameterName (int index)=0 |
The name of the parameter in the Effect file. |
|
virtual LightSemantics | GetLightSemantic (int index)=0 |
The light semantic as defined in the effect
file. |
enum LightSemantics |
virtual void ReloadDXEffect | ( | ) | [pure virtual] |
Reloads the current active effect.
virtual int GetNumberOfEffectBitmaps | ( | ) | [pure virtual] |
Returns the number of bitmaps used by the currently loaded effect.
The number of bitmaps returned will be equal to the number of bitmap entries found in the effect file. This will include bitmap slots that haven't been assigned, so it is important to check the return value from the various Bitmap related functions that take an index.
virtual PBBitmap* GetEffectBitmap | ( | int | index | ) | [pure virtual] |
Gets the bitmap used by the effect.
index | The index of the bitmap to retrieve |
virtual void SetEffectBitmap | ( | int | index, |
PBBitmap * | bmap | ||
) | [pure virtual] |
Set the bitmap used by the effect.
index | The index of the bitmap to set |
*bmap | A PBBitmap pointer for the bitmap to set |
virtual const MaxSDK::AssetManagement::AssetUser& GetEffectFile | ( | ) | [pure virtual] |
Get the Dx Effect file AssetUser.
This can also be accessed via the paramblock, but it is simply provided for completeness
virtual void SetEffectFile | ( | const MaxSDK::AssetManagement::AssetUser & | file | ) | [pure virtual] |
Set the Dx Effect file AssetUser.
This can also be accessed via the paramblock, but it is simply provided for completeness
file | The effect file to set |
virtual PBBitmap* GetSoftwareRenderBitmap | ( | ) | [pure virtual] |
Get the bitmap used for the software rendering overrride.
This can also be set by the Paramblock, it is just used for completeness return The Bitmap used
virtual void SetSoftwareRenderBitmap | ( | PBBitmap * | bmap | ) | [pure virtual] |
virtual int GetNumberOfLightParams | ( | ) | [pure virtual] |
Get the number of light based parameters.
This will return the number of parameters that are light based, even Light Color. Care needs to be taken with Light Color as it could also have a Color Swatch associated with it, so could already have been exported as part of the ParamBlock.
virtual INode* GetLightNode | ( | int | index | ) | [pure virtual] |
The actual node used by the parameter.
This represent the light node used by the parameter. Care needs to taken as this could be a NULL pointer. There are two reason for this. The first is that the LightColor Semantic is stored internally as a LightElement, but the writer of the Effect file may not have specified a parentID for the light, this will result in a NULL. Secondly if the user has not actually assigned a light via the UI drop down list, then again this will again result in a NULL pointer.
index | The index of the light to return. |
virtual MCHAR* GetLightParameterName | ( | int | index | ) | [pure virtual] |
The name of the parameter in the Effect file.
virtual LightSemantics GetLightSemantic | ( | int | index | ) | [pure virtual] |
The light semantic as defined in the effect file.