This reference page is linked to from the following overview topics: New Classes and Methods.
#include <maxapi.h>
Enables non-geometric plugins to draw in the viewport.
This class is a callback object that enables plug-ins that aren't actually objects (such as utility plug-ins) to draw in the 3ds Max viewports. Plugin classes that sub-class this can also assign a numerical priority to their callbacks by also implementing the ISceneCallbackPriority interface. See the following methods in class Interface that register and unregister this callback object:
Public Member Functions |
|
virtual | ~ViewportDisplayCallback () |
virtual void | Display (TimeValue t, ViewExp *vpt, int flags)=0 |
This method is called to allow the plug-in
to draw in the viewports. |
|
virtual void | GetViewportRect (TimeValue t, ViewExp *vpt, Rect *rect)=0 |
Retrieves the dimensions of the specified
viewport given an ViewExp interface to it. |
|
virtual BOOL | Foreground ()=0 |
Flags whether to draw in the foreground or
background plane. |
virtual ~ViewportDisplayCallback | ( | ) | [inline, virtual] |
{}
This method is called to allow the plug-in to draw in the viewports.
TimeValue | t - The current time when this method is called. |
ViewExp* | vpt - An interface into the viewport. |
int | flags - These flags are used internally. |
Retrieves the dimensions of the specified viewport given an ViewExp interface to it.
TimeValue | t - The time to get the viewport rectangle. |
ViewExp* | vpt - Specifies which viewport |
Rect | *rect - The rectangle is returned here. |
virtual BOOL Foreground | ( | ) | [pure virtual] |
Flags whether to draw in the foreground or background plane.
This method should return TRUE if the object changes a lot or FALSE if it doesn't change very much. This method relates to the foreground/background display system used by 3ds Max. Basically, items that change a lot are placed in the foreground buffer. Items that don't change much are placed in the background buffer and simply biltted to the dispaly. See the Advanced Topics section on Foreground / Background Planes for more details. Most plug-ins can simply return TRUE because they are not likely to be very heavyweight objects (they are usually just a gizmo or apparatus image) and can simply go into the foreground. On the other hande, some items, for instance the 3ds Max home grid, don't change and can always go into the background. The home grid only changes when the view direction is changed in which case everything is redrawn.