3ds Max C++ API Reference
|
A system to manage the current state of the Dx Scene and render passes. More...
#include <RTMax.h>
Public Types | |
enum | DXEffectType { kPreEffect , kPostEffect , kEnvEffect } |
Describes the effect in use. More... | |
enum | DXPassType { kStandard , kEnvironment , kEnvironmentLast } |
Describes what the current pass is doing, standard rendering to the viewport, or for example creating textures for use later in the render process. More... | |
Public Member Functions | |
virtual | ~IDxSceneManager () |
Destructor. | |
virtual void | StoreSceneEffect (Mtl *dxMtl, DXEffectType effectType=kPostEffect, int numberOfPasses=0)=0 |
Add a scene effect to the database. | |
virtual void | StoreSceneEffect (Tab< Mtl * > &dxMtl)=0 |
Add a scene effect to the database. | |
virtual int | GetNumberOfSceneEffects (DXEffectType effectType=kPostEffect)=0 |
Number of Scene effects active. | |
virtual Mtl * | GetSceneEffect (int index, DXEffectType effectType=kPostEffect)=0 |
Get the scene effect. | |
virtual void | ResetSceneEffects ()=0 |
flush out the effects, and reset all Render Targets | |
virtual void | RemoveSceneEffect (int index, DXEffectType effectType=kPostEffect)=0 |
Remove specified Effect. | |
virtual void | StartScene (GraphicsWindow *gw)=0 |
Called at the beginning of the Scene Traversal - All effects PreRenders are called here. | |
virtual void | EndScene (GraphicsWindow *gw)=0 |
Called at the end of traversal. | |
virtual LPDIRECT3DBASETEXTURE9 | GetSceneRenderTarget (bool env=false, const MCHAR *paramName=NULL)=0 |
Get access to the scene Render Target. This will change depending on how many effects are loaded. | |
virtual void | SetSceneRenderTarget (LPDIRECT3DBASETEXTURE9 texture, const MCHAR *paramName)=0 |
Set the environment texture for use by an object based effect. The paramName needs to be consistant. | |
virtual void | EnableDebugMode (bool onOff, const MCHAR *outputPath, const MCHAR *namePrefix)=0 |
Special Debugging mode - textures will be saved for each pass/combiner - USE WITH CAUTION !! | |
virtual void | EnableSceneTraversal (bool state, IValidateNodeCallback *proc)=0 |
Turn on the traversal system. | |
virtual IDxSceneTransformManager * | GetTransformManager ()=0 |
access to the Transform manager | |
virtual void | SceneInitialize (GraphicsWindow *gw)=0 |
A one time per scene initialisation that must be called first before the scene is rendered. | |
virtual int | GetNumberOfPasses ()=0 |
The number of passes required to render the scene based on the effects loaded. | |
virtual int | GetCurrentPassNumber ()=0 |
The value of the current pass. | |
virtual IDxSceneManager::DXPassType | GetActivePassType ()=0 |
Provides access to the type of pass being rendered. | |
virtual bool | IsSceneEffectValid ()=0 |
Specifies whether the current scene effects are valid or not. | |
Static Public Member Functions | |
static DllExport IDxSceneManager * | GetIDxSceneManager () |
Access to the singleton. | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
A system to manage the current state of the Dx Scene and render passes.
This will provide support for RTT scene based effects, as well as handling matrix conversions.
enum DXEffectType |
Describes the effect in use.
Enumerator | |
---|---|
kPreEffect | Pre Effect – drawn behind the geometry. |
kPostEffect | Post Effect – drawn on top as a screen quad. |
kEnvEffect | Environment effect, used to create shadow buffers etc. |
enum DXPassType |
Describes what the current pass is doing, standard rendering to the viewport, or for example creating textures for use later in the render process.
Enumerator | |
---|---|
kStandard | General scene rendering. |
kEnvironment | Texture generation. |
kEnvironmentLast | Final environment render call in current environment pass. |
|
inlinevirtual |
Destructor.
|
pure virtual |
Add a scene effect to the database.
*dxMtl | A pointer to a DirectX Shader Material |
effectType | Describes what type of effect is being stored |
numberOfPasses | How many passes are required. This is only really useful for environment effects |
Add a scene effect to the database.
&dxMtl | A table of effects. This would be used to copy a complete block over. This is useful when setting multi effects, or the ordering has changed. |
|
pure virtual |
Number of Scene effects active.
effectType | The type of effect to query |
|
pure virtual |
Get the scene effect.
index | The index of the material to access |
effectType | The type of effect to query |
|
pure virtual |
flush out the effects, and reset all Render Targets
|
pure virtual |
Remove specified Effect.
index | The index of the effect to remove |
effectType | The type of effect |
|
pure virtual |
Called at the beginning of the Scene Traversal - All effects PreRenders are called here.
*gw | The current viewport being rendered |
|
pure virtual |
Called at the end of traversal.
The main effects Render method is called here.
*gw | The current viewport being rendered |
|
pure virtual |
Get access to the scene Render Target. This will change depending on how many effects are loaded.
This is used to access any rendertargets that are either the result of a full render, or can be stored by the parsers. Only Environmental effects can store render targets, and they can then be looked up by name
env | Defines whether the requested Render Target is the result of an environmental effect |
*paramName | The name of the Render Target to access |
|
pure virtual |
Set the environment texture for use by an object based effect. The paramName needs to be consistant.
texture | The Render Target to store |
*paramName | The name to be used to store the render target. This will be used in GetSceneRenderTarget |
|
pure virtual |
Special Debugging mode - textures will be saved for each pass/combiner - USE WITH CAUTION !!
The various passes will be saved as DDS file to the specified location - they will be titled XXX_Pre_pass and XXX_post_pass - the final rendered pass is not saved, as this is available in the viewport. The XX is the name prefix supplied
onOff | Turn debug on/off |
*outputPath | A pointer to a string containing the path, ending with "\" |
*namePrefix | A pointer to a string containing a name prefix |
|
pure virtual |
Turn on the traversal system.
When activated the developer can control what is rendered to the viewport
state | a boolean used to turn the traversal on/off |
*proc | A callback used to validate and sort nodes |
|
pure virtual |
access to the Transform manager
This provides scene level access to the various DX transforms. When rendering scene based effects these transforms should be used It is safe when drawing object level effect to still use this, but only for PROJECTION and VIEW. World should be obtained from the regular methods.
|
pure virtual |
A one time per scene initialisation that must be called first before the scene is rendered.
*gw | The viewport being rendered |
|
pure virtual |
The number of passes required to render the scene based on the effects loaded.
|
pure virtual |
The value of the current pass.
|
pure virtual |
Provides access to the type of pass being rendered.
This allows developers to pre process or switch techniques based on whether environmental effects are being calculated or actual scene drawing is taking place
|
pure virtual |
Specifies whether the current scene effects are valid or not.
The system will check the validity channel of the post effects to determine whether a full scene update is required. This is mainly for effects that require a TIME semantic, which denotes that it constantly runs and updates the scene.
|
static |
Access to the singleton.