Public Member Functions

ViewportDisplayCallback Class Reference

Search for all occurrences

Detailed Description

See also:
Class Interface, Class ViewExp, Data Types.

Description:
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. See the methods in class Interface that register and unregister this callback object:

Inteface::RegisterViewportDisplayCallback(), and Interface::UnRegisterViewportDisplayCallback()

Also see the method Interface::NotifyViewportDisplayCallbackChanged().

#include <maxapi.h>

Inheritance diagram for ViewportDisplayCallback:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual  ~ViewportDisplayCallback ()
virtual void  Display (TimeValue t, ViewExp *vpt, int flags)=0
virtual void  GetViewportRect (TimeValue t, ViewExp *vpt, Rect *rect)=0
virtual BOOL  Foreground ()=0

Constructor & Destructor Documentation

virtual ~ViewportDisplayCallback ( ) [inline, virtual]
Remarks:
Destructor.
{}

Member Function Documentation

virtual void Display ( TimeValue  t,
ViewExp vpt,
int  flags 
) [pure virtual]
Remarks:
This method is called to allow the plug-in to draw in the viewports.
Parameters:
TimeValue t

The current time when this method is called.

ViewExp *vpt

An interface into the viewport.

int flags

These flags are used internally.
virtual void GetViewportRect ( TimeValue  t,
ViewExp vpt,
Rect rect 
) [pure virtual]
Remarks:
Retrieves the dimensions of the specified viewport given an ViewExp interface to it.
Parameters:
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]
Remarks:
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.

ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback
ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback ViewportDisplayCallback