IEffectManager Class Reference

#include <RTMax.h>

Class Description

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.

+ Inheritance diagram for IEffectManager:

Public Types

enum  { kDirectX9, kDirectX10 }
 

Public Member Functions

virtual ~IEffectManager ()
 Destructor. More...
 
virtual void SetFloatParam (D3DXHANDLE handle, const MCHAR *paramName, const MCHAR *uiName, float val, float min, float max, float step, MaxSemantics semantic)=0
 Display a floating point value in the Dialog box. More...
 
virtual void SetIntParam (D3DXHANDLE handle, const MCHAR *paramName, const MCHAR *uiName, int val, int min, int max, int step, MaxSemantics semantic)=0
 Display an integer value in the Dialog box. More...
 
virtual void SetColorParam (D3DXHANDLE handle, const MCHAR *paramName, const MCHAR *uiName, D3DXVECTOR4 color, MaxSemantics semantic)=0
 Display a color value in the Dialog box. More...
 
virtual void SetPoint4Param (D3DXHANDLE handle, const MCHAR *paramName, const MCHAR *uiName, D3DXVECTOR4 val, float min, float max, float step, MaxSemantics semantic)=0
 Display a D3DVECTOR4 value in the Dialog box. More...
 
virtual void SetBooleanParam (D3DXHANDLE handle, const MCHAR *paramName, const MCHAR *uiName, BOOL val, MaxSemantics semantic)=0
 Display a boolean value in the Dialog box. More...
 
virtual void SetTextureParam (D3DXHANDLE handle, const MCHAR *paramName, const MCHAR *uiName, const MCHAR *filename, MaxSemantics semantic, bool mappingEnabled=false, int mappingChannel=1)=0
 Display a bitmap selection button. More...
 
virtual void SetLightParam (D3DXHANDLE handle, const MCHAR *paramName, const MCHAR *uiName, bool target, MaxSemantics semantic)=0
 Display a Light selection box, or provide access to lights based on the parameter. More...
 
virtual void SetTransformParam (D3DXHANDLE handle, MaxSemantics semantic)=0
 Non UI Element used to set various transforms defined in the effect file. More...
 
virtual void SetGeometryParam (D3DXHANDLE handle, MaxSemantics semantic)=0
 Non UI Element used to set various geometry based data defined in the effect file. More...
 
virtual void SetEnvironmentParam (D3DXHANDLE handle, MaxSemantics semantic)=0
 Non UI Element used to set various environmental based data defined in the effect file. More...
 
virtual void SetTechnique (D3DXHANDLE handle, const MCHAR *techniqueName, bool bDefault)=0
 Set the techniques used in the effect file. More...
 
virtual UINT GetDirectXVersion ()=0
 Get the current DirectX version. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Member Enumeration Documentation

anonymous enum
Enumerator
kDirectX9 
kDirectX10 
109  {
110  kDirectX9,
111  kDirectX10,
112  };
Definition: RTMax.h:111
Definition: RTMax.h:110

Constructor & Destructor Documentation

virtual ~IEffectManager ( )
inlinevirtual

Destructor.

114 {;}

Member Function Documentation

virtual void SetFloatParam ( D3DXHANDLE  handle,
const MCHAR paramName,
const MCHAR uiName,
float  val,
float  min,
float  max,
float  step,
MaxSemantics  semantic 
)
pure virtual

Display a floating point value in the Dialog box.

Parameters
handleThe handle to the parameter in the effect file
paramNameThe name of the actual parameter. This will be used in the paramblock
uiNameThe name to be displayed in the Dialog box
valThe default value
minThe minimum value for the UI control
maxThe maximum value for the UI control
stepThe increment value for the UI control
semanticThe semantic of the parameter.
virtual void SetIntParam ( D3DXHANDLE  handle,
const MCHAR paramName,
const MCHAR uiName,
int  val,
int  min,
int  max,
int  step,
MaxSemantics  semantic 
)
pure virtual

Display an integer value in the Dialog box.

Parameters
handleThe handle to the parameter in the effect file
paramNameThe name of the actual parameter. This will be used in the paramblock
uiNameThe name to be displayed in the Dialog box
valThe default value
minThe minimum value for the UI control
maxThe maximum value for the UI control
stepThe increment value for the UI control
semanticThe semantic of the parameter.
virtual void SetColorParam ( D3DXHANDLE  handle,
const MCHAR paramName,
const 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

Parameters
handleThe handle to the parameter in the effect file
paramNameThe name of the actual parameter. This will be used in the paramblock
uiNameThe name to be displayed in the Dialog box
colorThe default color to display
semanticThe semantic of the parameter.
virtual void SetPoint4Param ( D3DXHANDLE  handle,
const MCHAR paramName,
const 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

Parameters
handleThe handle to the parameter in the effect file
paramNameThe name of the actual parameter. This will be used in the paramblock
uiNameThe name to be displayed in the Dialog box
valThe default value
minThe minimum value for the UI control
maxThe maximum value for the UI control
stepThe increment value for the UI control
semanticThe semantic of the parameter.
virtual void SetBooleanParam ( D3DXHANDLE  handle,
const MCHAR paramName,
const 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

Parameters
handleThe handle to the parameter in the effect file
paramNameThe name of the actual parameter. This will be used in the paramblock
uiNameThe name to be displayed in the Dialog box
valThe default color to display
semanticThe semantic of the parameter.
virtual void SetTextureParam ( D3DXHANDLE  handle,
const MCHAR paramName,
const MCHAR uiName,
const MCHAR filename,
MaxSemantics  semantic,
bool  mappingEnabled = false,
int  mappingChannel = 1 
)
pure virtual

Display a bitmap selection button.

Parameters
handleThe handle to the parameter in the effect file
paramNameThe name of the actual parameter. This will be used in the paramblock
uiNameThe name to be displayed in the Dialog box
filenameThe default filename to display
semanticThe semantic of the parameter. This is defined in the effect file and is used for render to texture.
mappingEnabledSpecifies whether the mapping channel UI should be shown for the texture
mappingChannelThis provides the default mapping channel to use.
virtual void SetLightParam ( D3DXHANDLE  handle,
const MCHAR paramName,
const MCHAR uiName,
bool  target,
MaxSemantics  semantic 
)
pure virtual

Display a Light selection box, or provide access to lights based on the parameter.

Parameters
handleThe handle to the parameter in the effect file
paramNameThe name of the actual parameter. This will be used in the paramblock
uiNameThe name to be displayed in the Dialog box
targetSpecifies if the light is a directional light. This is used to filter the UI light list.
semanticThe 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.

Parameters
handleThe handle to the parameter in the effect file
semanticThe 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.

Parameters
handleThe handle to the parameter in the effect file
semanticThe 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.

Parameters
handleThe handle to the parameter in the effect file
semanticThe semantic of the transform to set.
virtual void SetTechnique ( D3DXHANDLE  handle,
const 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

Parameters
handleThe handle to the technique
techniqueNameThe name to display in the UI
bDefaultThe default technique to used
virtual UINT GetDirectXVersion ( )
pure virtual

Get the current DirectX version.

Currently this will ONLY return kDirectX9

Returns
This will return kDirectX9. In the future this could also be kDirectX10