IParameterManager Class Reference

#include <RTMax.h>

Class Description

A data management class for accessing data required for displaying real time effects.

An instance of this class is maintained by the DirectX 9 Shader material and is passed into the IEffectParser::PreRender() method. This allows the Effect Parsers to format the data accordingly based on the runtime active for the shader

+ Inheritance diagram for IParameterManager:

Public Types

enum  {
  kPType_Unknown, kPType_Float, kPType_Int, kPType_Bool,
  kPType_Point4, kPType_Matrix, kPType_Color, kPType_Struct,
  kPType_Texture, kPType_Point3
}
 

Public Member Functions

virtual ~IParameterManager ()
 Destructor. More...
 
virtual int GetNumberOfParams ()=0
 The total number of parameters maintained by the manager. More...
 
virtual MaxSemantics GetParamSemantics (int index)=0
 The semantic for the parameter. More...
 
virtual const MCHARGetParamName (int index)=0
 Retireve the name of the parameter. More...
 
virtual bool GetParamData (LPVOID data, int index)=0
 Access to the actual data stored by the manager. More...
 
virtual bool GetParamData (LPVOID data, const MCHAR *paramName)=0
 Access to the actual data stored by the manager. More...
 
virtual int GetParamType (int index)=0
 Access the data type of the parameter. More...
 
virtual int GetParamType (const MCHAR *parmName)=0
 Access the data type of the parameter. More...
 
virtual int GetParamSize (int index)=0
 Access the data size of the parameter (mainly designed for kPType_Struct type) 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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Member Enumeration Documentation

anonymous enum
Enumerator
kPType_Unknown 
kPType_Float 
kPType_Int 
kPType_Bool 
kPType_Point4 
kPType_Matrix 
kPType_Color 
kPType_Struct 
kPType_Texture 
kPType_Point3 
418  {
420  kPType_Float,
421  kPType_Int,
422  kPType_Bool,
425  kPType_Color,
429  };
Definition: RTMax.h:423
Definition: RTMax.h:420
Definition: RTMax.h:422
Definition: RTMax.h:419
Definition: RTMax.h:426
Definition: RTMax.h:425
Definition: RTMax.h:427
Definition: RTMax.h:428
Definition: RTMax.h:424
Definition: RTMax.h:421

Constructor & Destructor Documentation

virtual ~IParameterManager ( )
inlinevirtual

Destructor.

432 {;}

Member Function Documentation

virtual int GetNumberOfParams ( )
pure virtual

The total number of parameters maintained by the manager.

Returns
The number of parameters
virtual MaxSemantics GetParamSemantics ( int  index)
pure virtual

The semantic for the parameter.

This will be the semantic usage found in the shader file when it is parsed by the system

Parameters
indexThe index of the parameter to query
Returns
An item from MaxSemantics representing the semantic found in the file
virtual const MCHAR* GetParamName ( int  index)
pure virtual

Retireve the name of the parameter.

This will be the name of the parameter found in the shader file

Parameters
indexThe index of the parameter to query
Returns
A string containing the name
virtual bool GetParamData ( LPVOID  data,
int  index 
)
pure virtual

Access to the actual data stored by the manager.

This is the main access point for data retrieval. It is the calling code's responsibility to make sure there is enough space allocated to receive the data. This can be determined by calling GetParamType, which will return the data type. If it is a kPtype_Matrix, then internally this is stored as an 4x4 float array

Parameters
dataA pointer to a buffer to receive the data
indexTHe index of the parameter to query
Returns
True/False depending if the parameter was found, and the data copied correctly
virtual bool GetParamData ( LPVOID  data,
const MCHAR paramName 
)
pure virtual

Access to the actual data stored by the manager.

This is an access point for data retrieval. It is the calling code's responsibility to make sure there is enough space allocated to receive the data. This can be determined by calling GetParamType, which will return the data type. If it is a kPtype_Matrix, then internally this is stored as an 4x4 float array

Parameters
dataA pointer to a buffer to receive the data
paramNameThe name of the parameter to query
Returns
True/False depending if the parameter was found, and the data copied correctly
virtual int GetParamType ( int  index)
pure virtual

Access the data type of the parameter.

This method returns the type of parameter. This will be one of the enumerated types define in IParameterManager, kPType_Matrix etc..

Parameters
indexThe index of the parameter to query
Returns
The parameter type
virtual int GetParamType ( const MCHAR parmName)
pure virtual

Access the data type of the parameter.

This method returns the type of parameter. This will be one of the enumerated types define in IParameterManager, kPType_Matrix etc..

Parameters
parmNameThe name of the parameter to query
Returns
The parameter type
virtual int GetParamSize ( int  index)
pure virtual

Access the data size of the parameter (mainly designed for kPType_Struct type)

This method returns the size of the parameter, in D3DXVECTOR4 (upper rounded to), or number of textures.

Parameters
indexThe index of the parameter to query
Returns
The parameter size