This reference page is linked to from the following overview topics: Porting Object Plug-ins to Nitrous, Handling Requests for Interfaces.
This is the base interface for all objects that want to be displayed in viewport.
A plug-in which desires to be displayed in the viewport must expose this interface to 3ds Max via the GetInterface function. Max will then obtain graphics data via this interfaces. The possible plug-in types that need this interface are: Modifiers, Objects and Controllers.
Internally plugin should maintain a set of render items and manage the life time of all those items. A render item should be created by calling XXXRenderItem::CreateInstance() and release via its ReleaseInterface function. plugin needs to decide the type of the most fit render items and fill in correct graphics data into them.
#include <IObjectDisplay.h>
Public Member Functions |
|
IObjectDisplay () | |
virtual | ~IObjectDisplay () |
virtual bool | RequiresSupportForLegacyDisplayMode () const =0 |
Check if this plugin contains legacy display
code and want legacy code to be called as well. |
|
virtual bool | UpdateDisplay (unsigned long renderItemCategories, const MaterialRequiredStreams &materialRequiredStreams, TimeValue t)=0 |
Manually update all render items of this
object. |
|
virtual
const RenderItemHandleArray & |
GetRenderItems () const =0 |
Retrieves the render items to be displayed.
|
|
virtual Interface_ID | GetID () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
void | SetDirtyFlag (unsigned long flags) |
unsigned long | GetDirtyFlag () const |
IObjectDisplay | ( | ) | [inline] |
{}
virtual ~IObjectDisplay | ( | ) | [inline, virtual] |
{}
virtual bool RequiresSupportForLegacyDisplayMode | ( | ) | const [pure virtual] |
Check if this plugin contains legacy display code and want legacy code to be called as well.
virtual bool UpdateDisplay | ( | unsigned long | renderItemCategories, |
const MaterialRequiredStreams & | materialRequiredStreams, | ||
TimeValue | t | ||
) | [pure virtual] |
Manually update all render items of this object.
Plugin should build render items in this function to satisfy the input category, flags and required streams.
renderItemCategories | A combination of RenderItemCategory |
materialRequiredStreams | required streams of render items |
t | current time. |
virtual const RenderItemHandleArray& GetRenderItems | ( | ) | const [pure virtual] |
Retrieves the render items to be displayed.
virtual Interface_ID GetID | ( | ) | [inline, virtual] |
Reimplemented from BaseInterface.
{
return IOBJECT_DISPLAY_INTERFACE_ID;
}
virtual BaseInterface* GetInterface | ( | Interface_ID | id | ) | [inline, virtual] |
Reimplemented from BaseInterface.
{ if (id == IOBJECT_DISPLAY_INTERFACE_ID) { return this; } return BaseInterface::GetInterface(id); }
void SetDirtyFlag | ( | unsigned long | flags | ) | [inline] |
{ mFlags = flags; }
unsigned long GetDirtyFlag | ( | ) | const [inline] |
{
return mFlags;
}