Class ID3DGraphicsWindow

3DS Max Plug-In SDK

Class ID3DGraphicsWindow

See Also: Class IDX8VertexShader, Class IDX8PixelShader, Class BaseInterface

class ID3DGraphicsWindow : public BaseInterface

Description:

This class is available in release 4.0 and later only.

The abstract interface to the D3D graphics window class. The methods here provide low-level access to 3ds max's Direct-3D graphics system. These methods are available for plug-ins to do any graphics work not possible using the standard high-level graphics methods of 3ds max. These methods are for use in the existing 3ds max viewports. Note that these APIs are not for casual use, as they are not intended to be a high level graphics library. A number of structures, classes, and data types used here are part of the Microsoft DirectX SDK.

Methods:

public:

Prototype:

virtual Interface_ID GetID();

Remarks:

This method returns the interface ID of the class.

Default Implementation:

{ return D3D_GRAPHICS_WINDOW_INTERFACE_ID; }

Prototype:

virtual LifetimeType LifetimeControl();

Remarks:

This method returns the type of lifetime control for this interface.

Default Implementation:

{ return noRelease; }

Prototype:

virtual LPDIRECT3DDEVICE8 GetDevice() = 0;

Remarks:

This method returns the Direct3D Device from GFX.

Prototype:

virtual LPDIRECT3DVERTEXBUFFER8 GetVertexBuffer(UINT length, DWORD FVF) = 0;

Remarks:

This method returns the VertexBuffer from GFX.

Parameters:

UINT length

The size of vertex buffer.

DWORD FVF

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

Prototype:

virtual LPDIRECT3DINDEXBUFFER8 GetIndexBuffer(UINT length, D3DFORMAT format) = 0;

Remarks:

This method returns the Direct-3D index buffer from GFX.

Parameters:

UINT length

The size of vertex buffer.

D3DFORMAT format

The Direct-3D format to use.

Prototype:

virtual D3DXMATRIX GetWorldXform() = 0;

Remarks:

This method returns the World transformation from GFX as a Direct-3D Matrix.

Prototype:

virtual D3DXMATRIX GetViewXform() = 0;

Remarks:

This method returns the View transformation from GFX as a Direct-3D Matrix.

Prototype:

virtual D3DXMATRIX GetProjXform() = 0;

Remarks:

This method returns the Projection transformation from GFX as a Direct-3D Matrix.

Prototype:

virtual D3DCOLOR GetColor(ColorType t) = 0;

Remarks:

This method returns the Constant Color of specified type from GFX.

Parameters:

ColorType t

The type of color you wish to retrieve.

Prototype:

virtual Tab<D3DLIGHT8 *> *GetLights() = 0;

Remarks:

This method returns a pointer to a table of pointers to enabled Direct3D Lights from GFX

Prototype:

virtual D3DMATERIAL8 GetMaterial() = 0;

Remarks:

This method returns the Direct-3D Material from GFX.

Prototype:

virtual DWORD GetTextureTiling(int texStage, int coord) = 0;

Remarks:

This method returns the Texture Tiling for specified texStage and coord from GFX.

Parameters:

int texStage

The specified texture stage to get the tiling for.

int coord

The specified texture coordinate to get the tiling for.

Prototype:

virtual D3DXMATRIX GetTexXform(int texStage) = 0;

Remarks:

This method returns the Texture Transfrom for specified texStage from GFX.

Parameters:

int texStage

The specified texture stage to get the texture transformation for.