An instance of this class is passed into the MtlBase::BuildMaps() method.
This is used for the Mirror and Automatic Cubic maps. These maps callback to methods of this class to perform a rendering from a particular view. Sample code using these methods is available in /MAXSDK/SAMPLES/MATERIALS/MIRROR.CPP and ACUBIC.CPP. All methods of this class are implemented by the system.
#include <render.h>
Public Member Functions |
|
virtual | ~RenderMapsContext () |
Destructor. |
|
virtual INode * | GetNode ()=0 |
Returns the INode pointer of the node being rendered.
|
|
virtual int | NodeRenderID ()=0 |
Returns the node ID for the item being
rendered or -1 if not set. |
|
virtual void | GetCurrentViewParams (ViewParams &vp)=0 |
Retrieves the current view dependent
parameters. |
|
virtual void | GetSubRendParams (SubRendParams &srp)=0 |
Retrieves the sub-render parameters.
|
|
virtual int | SubMtlIndex ()=0 |
Returns the current sub material index or -1
if at node material level. |
|
virtual void | SetSubMtlIndex (int mindex)=0 |
virtual void | FindMtlPlane (float pl[4])=0 |
Computes the plane containing the current
material or sub material. |
|
virtual void | FindMtlScreenBox (Rect &sbox, Matrix3 *viewTM=NULL, int mtlIndex=-1)=0 |
This method computes the rectangle in screen
space of the specified material. |
|
virtual Box3 | CameraSpaceBoundingBox ()=0 |
virtual Box3 | ObjectSpaceBoundingBox ()=0 |
virtual Matrix3 | ObjectToWorldTM ()=0 |
virtual RenderGlobalContext * | GetGlobalContext () |
virtual int | Render (Bitmap *bm, ViewParams &vp, SubRendParams &srp, Point4 *clipPlanes=NULL, int nClipPlanes=0)=0 |
Renders the scene and stores in the result
into bm. |
|
virtual INT_PTR | Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) |
virtual ~RenderMapsContext | ( | ) | [inline, virtual] |
Destructor.
{ }
virtual INode* GetNode | ( | ) | [pure virtual] |
virtual int NodeRenderID | ( | ) | [pure virtual] |
Returns the node ID for the item being rendered or -1 if not set.
This ID is assigned when the scene is being rendered - each node is simply given an ID: 0, 1, 2, 3, etc. The NodeRenderID() is simply a number automatically assigned to every node being rendered so that they can be differentiated in texture maps such as the Auto-cubic, which needs to store a cubic map for each node it is applied to.
virtual void GetCurrentViewParams | ( | ViewParams & | vp | ) | [pure virtual] |
Retrieves the current view dependent parameters.
virtual void GetSubRendParams | ( | SubRendParams & | srp | ) | [pure virtual] |
Retrieves the sub-render parameters.
virtual int SubMtlIndex | ( | ) | [pure virtual] |
Returns the current sub material index or -1 if at node material level.
virtual void SetSubMtlIndex | ( | int | mindex | ) | [pure virtual] |
virtual void FindMtlPlane | ( | float | pl[4] | ) | [pure virtual] |
Computes the plane containing the current material or sub material.
This is used by the Flat Mirror material.
virtual void FindMtlScreenBox | ( | Rect & | sbox, |
Matrix3 * | viewTM = NULL , |
||
int | mtlIndex =
-1 |
||
) | [pure virtual] |
This method computes the rectangle in screen space of the specified material.
This uses the viewTM, but assumes the remaining view params (devWidth, devHeight, devAspect, fov) are the same as the main render. This method is specific to the Flat Mirror material.
virtual Box3 CameraSpaceBoundingBox | ( | ) | [pure virtual] |
virtual Box3 ObjectSpaceBoundingBox | ( | ) | [pure virtual] |
virtual Matrix3 ObjectToWorldTM | ( | ) | [pure virtual] |
virtual RenderGlobalContext* GetGlobalContext | ( | ) | [inline, virtual] |
{ return NULL; }
virtual int Render | ( | Bitmap * | bm, |
ViewParams & | vp, | ||
SubRendParams & | srp, | ||
Point4 * | clipPlanes = NULL , |
||
int | nClipPlanes =
0 |
||
) | [pure virtual] |
Renders the scene and stores in the result into bm.
virtual INT_PTR Execute | ( | int | cmd, |
ULONG_PTR | arg1 = 0 , |
||
ULONG_PTR | arg2 = 0 , |
||
ULONG_PTR | arg3 = 0 |
||
) | [inline, virtual] |
{ return 0; }