3ds Max C++ API Reference
ID3D9GraphicsWindow Class Referenceabstract

#include <id3d9graphicswindow.h>

+ Inheritance diagram for ID3D9GraphicsWindow:

Public Member Functions

virtual Interface_ID GetID ()
 
virtual LifetimeType LifetimeControl ()
 
virtual LPDIRECT3DDEVICE9 GetDevice ()=0
 Get Direct3D Device from GFX. More...
 
virtual LPDIRECT3DVERTEXBUFFER9 GetVertexBuffer (UINT length, DWORD FVF)=0
 Get VertexBuffer from GFX. More...
 
virtual LPDIRECT3DINDEXBUFFER9 GetIndexBuffer (UINT length, D3DFORMAT format)=0
 Get IndexBuffer from GFX. More...
 
virtual D3DXMATRIX GetWorldXform ()=0
 Get Transforms from GFX. More...
 
virtual D3DXMATRIX GetViewXform ()=0
 
virtual D3DXMATRIX GetProjXform ()=0
 
virtual D3DCOLOR GetColor (ColorType t)=0
 Get Constant Color of specified type from GFX. More...
 
virtual Tab< D3DLIGHT9 * > * GetLights ()=0
 Get a pointer to a 'Tab' table array of pointers to enabled Direct3D Lights from GFX. More...
 
virtual D3DMATERIAL9 GetMaterial ()=0
 Get Material from GFX. More...
 
virtual DWORD GetTextureTiling (int texStage, int coord)=0
 Get Texture Tiling for specified texStage and texCoord from GFX. More...
 
virtual D3DXMATRIX GetTexXform (int texStage)=0
 Get Texture Transform for specified texStage from GFX. More...
 
virtual void GetWindowDimension (int &width, int &height)=0
 Get the current viewport dimensions. More...
 
virtual BOOL IsAntiAliasingEnabled ()=0
 Get MSAA status from GFX. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- 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 Function Documentation

◆ GetID()

virtual Interface_ID GetID ( )
inlinevirtual
Remarks
This method returns the unique interface ID.

Reimplemented from BaseInterface.

#define D3D9_GRAPHICS_WINDOW_INTERFACE_ID
Definition: id3d9graphicswindow.h:20

◆ LifetimeControl()

virtual LifetimeType LifetimeControl ( )
inlinevirtual
Remarks
This method allows inquiries into the actual lifetime policy of a client and provide a server-controlled delete notify callback.
Returns
One of the following LifetimeTypes:

noRelease

Do not call release, use interface as long as you like. This is the default.

immediateRelease

The interface is only good for one call. The release is implied so a call to release is not required.

wantsRelease

The clients are controlling the lifetime, so the interface needs a Release() when the client has finished.

serverControlled

The server controls the lifetime and will use the InterfaceNotifyCallback to inform the code when it is gone.
Default Implementation:
{ return noRelease; }

Reimplemented from BaseInterface.

30 { return noRelease; }
@ noRelease
Definition: baseinterface.h:104

◆ GetDevice()

virtual LPDIRECT3DDEVICE9 GetDevice ( )
pure virtual

Get Direct3D Device from GFX.

◆ GetVertexBuffer()

virtual LPDIRECT3DVERTEXBUFFER9 GetVertexBuffer ( UINT  length,
DWORD  FVF 
)
pure virtual

Get VertexBuffer from GFX.


Unless older Flexible Vertex Formats are in use, FVF should be zero.

◆ GetIndexBuffer()

virtual LPDIRECT3DINDEXBUFFER9 GetIndexBuffer ( UINT  length,
D3DFORMAT  format 
)
pure virtual

Get IndexBuffer from GFX.

◆ GetWorldXform()

virtual D3DXMATRIX GetWorldXform ( )
pure virtual

Get Transforms from GFX.

◆ GetViewXform()

virtual D3DXMATRIX GetViewXform ( )
pure virtual

◆ GetProjXform()

virtual D3DXMATRIX GetProjXform ( )
pure virtual

◆ GetColor()

virtual D3DCOLOR GetColor ( ColorType  t)
pure virtual

Get Constant Color of specified type from GFX.

◆ GetLights()

virtual Tab<D3DLIGHT9 *>* GetLights ( )
pure virtual

Get a pointer to a 'Tab' table array of pointers to enabled Direct3D Lights from GFX.

◆ GetMaterial()

virtual D3DMATERIAL9 GetMaterial ( )
pure virtual

Get Material from GFX.

◆ GetTextureTiling()

virtual DWORD GetTextureTiling ( int  texStage,
int  coord 
)
pure virtual

Get Texture Tiling for specified texStage and texCoord from GFX.

◆ GetTexXform()

virtual D3DXMATRIX GetTexXform ( int  texStage)
pure virtual

Get Texture Transform for specified texStage from GFX.

◆ GetWindowDimension()

virtual void GetWindowDimension ( int width,
int height 
)
pure virtual

Get the current viewport dimensions.

Get the current viewport dimensions. This is useful for doing multi pass rendering and the off screen buffer needs to be created the same size as the viewport currently being drawn.

Parameters
[out]width- The width of the current viewport.
[out]height- The height of the current viewport.

◆ IsAntiAliasingEnabled()

virtual BOOL IsAntiAliasingEnabled ( )
pure virtual

Get MSAA status from GFX.

Returns
TRUE if viewport MSAA is enabled. Otherwise, return FALSE.