This reference page is linked to from the following overview topics: Parsers and Shader Effect Files.
The Effect Manager is responsible for displaying effect parameters. In 3ds Max this is implemented by the DirectX 9 Material.
All parameters except textures are handled by the Effect Manager. This includes setting the data on the render pass. Textures are controlled by the Effect Parser, as the the parser understands the usage, the manager simply provided the resource name from the UI It is the managers responsibility to make sure the data is set for each pass. This may or may not mean providing a UI, but the methods provide enough hints to be able to implement this.
#include <RTMax.h>
Public Types |
|
enum | { kDirectX9, kDirectX10 } |
Public Member Functions |
|
virtual | ~IEffectManager () |
Destructor. |
|
virtual void | SetFloatParam (D3DXHANDLE handle, MCHAR *paramName, MCHAR *uiName, float val, float min, float max, float step, MaxSemantics semantic)=0 |
Display a floating point value in the Dialog
box. |
|
virtual void | SetIntParam (D3DXHANDLE handle, MCHAR *paramName, MCHAR *uiName, int val, int min, int max, int step, MaxSemantics semantic)=0 |
Display an integer value in the Dialog box.
|
|
virtual void | SetColorParam (D3DXHANDLE handle, MCHAR *paramName, MCHAR *uiName, D3DXVECTOR4 color, MaxSemantics semantic)=0 |
Display a color value in the Dialog box.
|
|
virtual void | SetPoint4Param (D3DXHANDLE handle, MCHAR *paramName, MCHAR *uiName, D3DXVECTOR4 val, float min, float max, float step, MaxSemantics semantic)=0 |
Display a D3DVECTOR4 value in the Dialog
box. |
|
virtual void | SetBooleanParam (D3DXHANDLE handle, MCHAR *paramName, MCHAR *uiName, BOOL val, MaxSemantics semantic)=0 |
Display a boolean value in the Dialog box.
|
|
virtual void | SetTextureParam (D3DXHANDLE handle, MCHAR *paramName, MCHAR *uiName, MCHAR *filename, MaxSemantics semantic, bool mappingEnabled=false, int mappingChannel=1)=0 |
Display a bitmap selection button. |
|
virtual void | SetLightParam (D3DXHANDLE handle, MCHAR *paramName, MCHAR *uiName, bool target, MaxSemantics semantic)=0 |
Display a Light
selection box, or provide access to lights based on the parameter.
|
|
virtual void | SetTransformParam (D3DXHANDLE handle, MaxSemantics semantic)=0 |
Non UI Element used to set various
transforms defined in the effect file. |
|
virtual void | SetGeometryParam (D3DXHANDLE handle, MaxSemantics semantic)=0 |
Non UI Element used to set various geometry
based data defined in the effect file. |
|
virtual void | SetEnvironmentParam (D3DXHANDLE handle, MaxSemantics semantic)=0 |
Non UI Element used to set various
environmental based data defined in the effect file. |
|
virtual void | SetTechnique (D3DXHANDLE handle, MCHAR *techniqueName, bool bDefault)=0 |
Set the techniques used in the effect file.
|
|
virtual UINT | GetDirectXVersion ()=0 |
Get the current DirectX version. |
anonymous enum |
{ kDirectX9, kDirectX10, };
virtual ~IEffectManager | ( | ) | [inline, virtual] |
Destructor.
{;}
virtual void SetFloatParam | ( | D3DXHANDLE | handle, |
MCHAR * | paramName, | ||
MCHAR * | uiName, | ||
float | val, | ||
float | min, | ||
float | max, | ||
float | step, | ||
MaxSemantics | semantic | ||
) | [pure virtual] |
Display a floating point value in the Dialog box.
handle | The handle to the parameter in the effect file |
paramName | The name of the actual parameter. This will be used in the paramblock |
uiName | The name to be displayed in the Dialog box |
val | The default value |
min | The minimum value for the UI control |
max | The maximum value for the UI control |
step | The increment value for the UI control |
semantic | The semantic of the parameter. |
virtual void SetIntParam | ( | D3DXHANDLE | handle, |
MCHAR * | paramName, | ||
MCHAR * | uiName, | ||
int | val, | ||
int | min, | ||
int | max, | ||
int | step, | ||
MaxSemantics | semantic | ||
) | [pure virtual] |
Display an integer value in the Dialog box.
handle | The handle to the parameter in the effect file |
paramName | The name of the actual parameter. This will be used in the paramblock |
uiName | The name to be displayed in the Dialog box |
val | The default value |
min | The minimum value for the UI control |
max | The maximum value for the UI control |
step | The increment value for the UI control |
semantic | The semantic of the parameter. |
virtual void SetColorParam | ( | D3DXHANDLE | handle, |
MCHAR * | paramName, | ||
MCHAR * | uiName, | ||
D3DXVECTOR4 | color, | ||
MaxSemantics | semantic | ||
) | [pure virtual] |
Display a color value in the Dialog box.
This will be a standard 3ds Max color swatch
handle | The handle to the parameter in the effect file |
paramName | The name of the actual parameter. This will be used in the paramblock |
uiName | The name to be displayed in the Dialog box |
color | The default color to display |
semantic | The semantic of the parameter. |
virtual void SetPoint4Param | ( | D3DXHANDLE | handle, |
MCHAR * | paramName, | ||
MCHAR * | uiName, | ||
D3DXVECTOR4 | val, | ||
float | min, | ||
float | max, | ||
float | step, | ||
MaxSemantics | semantic | ||
) | [pure virtual] |
Display a D3DVECTOR4 value in the Dialog box.
This will be 4 3ds Max spinner UI elements
handle | The handle to the parameter in the effect file |
paramName | The name of the actual parameter. This will be used in the paramblock |
uiName | The name to be displayed in the Dialog box |
val | The default value |
min | The minimum value for the UI control |
max | The maximum value for the UI control |
step | The increment value for the UI control |
semantic | The semantic of the parameter. |
virtual void SetBooleanParam | ( | D3DXHANDLE | handle, |
MCHAR * | paramName, | ||
MCHAR * | uiName, | ||
BOOL | val, | ||
MaxSemantics | semantic | ||
) | [pure virtual] |
Display a boolean value in the Dialog box.
This will be a standard 3ds Max check box
handle | The handle to the parameter in the effect file |
paramName | The name of the actual parameter. This will be used in the paramblock |
uiName | The name to be displayed in the Dialog box |
val | The default color to display |
semantic | The semantic of the parameter. |
virtual void SetTextureParam | ( | D3DXHANDLE | handle, |
MCHAR * | paramName, | ||
MCHAR * | uiName, | ||
MCHAR * | filename, | ||
MaxSemantics | semantic, | ||
bool | mappingEnabled =
false , |
||
int | mappingChannel =
1 |
||
) | [pure virtual] |
Display a bitmap selection button.
handle | The handle to the parameter in the effect file |
paramName | The name of the actual parameter. This will be used in the paramblock |
uiName | The name to be displayed in the Dialog box |
filename | The default filename to display |
semantic | The semantic of the parameter. This is defined in the effect file and is used for render to texture. |
mappingEnabled | Specifies whether the mapping channel UI should be shown for the texture |
mappingChannel | This provides the default mapping channel to use. |
virtual void SetLightParam | ( | D3DXHANDLE | handle, |
MCHAR * | paramName, | ||
MCHAR * | uiName, | ||
bool | target, | ||
MaxSemantics | semantic | ||
) | [pure virtual] |
Display a Light selection box, or provide access to lights based on the parameter.
handle | The handle to the parameter in the effect file |
paramName | The name of the actual parameter. This will be used in the paramblock |
uiName | The name to be displayed in the Dialog box |
target | Specifies if the light is a directional light. This is used to filter the UI light list. |
semantic | The semantic of the parameter. |
virtual void SetTransformParam | ( | D3DXHANDLE | handle, |
MaxSemantics | semantic | ||
) | [pure virtual] |
Non UI Element used to set various transforms defined in the effect file.
handle | The handle to the parameter in the effect file |
semantic | The semantic of the transform to set. |
virtual void SetGeometryParam | ( | D3DXHANDLE | handle, |
MaxSemantics | semantic | ||
) | [pure virtual] |
Non UI Element used to set various geometry based data defined in the effect file.
handle | The handle to the parameter in the effect file |
semantic | The semantic of the transform to set. |
virtual void SetEnvironmentParam | ( | D3DXHANDLE | handle, |
MaxSemantics | semantic | ||
) | [pure virtual] |
Non UI Element used to set various environmental based data defined in the effect file.
handle | The handle to the parameter in the effect file |
semantic | The semantic of the transform to set. |
virtual void SetTechnique | ( | D3DXHANDLE | handle, |
MCHAR * | techniqueName, | ||
bool | bDefault | ||
) | [pure virtual] |
Set the techniques used in the effect file.
The default is used as the primary technique especially for multi pass effects
handle | The handle to the technique |
techniqueName | The name to display in the UI |
bDefault | The default technique to used |
virtual UINT GetDirectXVersion | ( | ) | [pure virtual] |
Get the current DirectX version.
Currently this will ONLY return kDirectX9