This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions, Porting Object Plug-ins to Nitrous, Handling Requests for Interfaces, Plug-in Display Interface.
#include <IObjectDisplay.h>
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. Plugin needs to decide the type of the most fit render items and fill in correct graphics data into them.
Public Member Functions |
|
GraphicsDriverAPI | IObjectDisplay () |
virtual GraphicsDriverAPI | ~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 (const MaxContext &maxContext, const UpdateDisplayContext &displayContext)=0 |
Manually update all render items of this
object. |
|
virtual GraphicsDriverAPI bool | AddRenderItems (const MaxContext &maxContext, RenderNodeHandle &hTargetNode, IRenderItemContainer &targetRenderItemContainer) |
Add render items of this plugin to the given
node. |
|
virtual
const RenderItemHandleArray & |
GetRenderItems () const =0 |
Retrieves the render items to be displayed.
|
|
virtual
GraphicsDriverAPI Interface_ID |
GetID () |
virtual
GraphicsDriverAPI BaseInterface * |
GetInterface (Interface_ID id) |
GraphicsDriverAPI void | SetFrameStamp (size_t framestamp) |
GraphicsDriverAPI size_t | GetFrameStamp () const |
Static Public Member Functions |
|
static GraphicsDriverAPI bool | DefaultAddRenderItems (const MaxContext &maxContext, RenderNodeHandle &hTargetNode, IRenderItemContainer &targetRenderItemContainer, const IRenderItemContainer &sourceRenderItemContainer) |
This is the default implementation to add
render items to the given node. |
GraphicsDriverAPI IObjectDisplay | ( | ) |
virtual GraphicsDriverAPI ~IObjectDisplay | ( | ) | [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 | ( | const MaxContext & | maxContext, |
const UpdateDisplayContext & | displayContext | ||
) | [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.
maxContext | Contains all viewports in which this object will be displayed. |
displayContext | The display context, which contains all the requirements for plugin to generate render items. |
virtual GraphicsDriverAPI bool AddRenderItems | ( | const MaxContext & | maxContext, |
RenderNodeHandle & | hTargetNode, | ||
IRenderItemContainer & | targetRenderItemContainer | ||
) | [virtual] |
Add render items of this plugin to the given node.
maxContext | Contains all viewports in which this object will be displayed. |
hTargetNode | the render node handle that reference this plugin object. |
targetRenderItemContainer | the target render item container to which this plugin object will be added. |
virtual const RenderItemHandleArray& GetRenderItems | ( | ) | const [pure virtual] |
Retrieves the render items to be displayed.
static GraphicsDriverAPI bool DefaultAddRenderItems | ( | const MaxContext & | maxContext, |
RenderNodeHandle & | hTargetNode, | ||
IRenderItemContainer & | targetRenderItemContainer, | ||
const IRenderItemContainer & | sourceRenderItemContainer | ||
) | [static] |
This is the default implementation to add render items to the given node.
maxContext | Contains all viewports in which the object will be displayed. |
hTargetNode | the render node handle that reference the plugin object. |
targetRenderItemContainer | the target render item container to which this plugin object will be added. |
sourceRenderItemContainer | the source render item container. |
virtual GraphicsDriverAPI Interface_ID GetID | ( | ) | [virtual] |
Reimplemented from BaseInterface.
virtual GraphicsDriverAPI BaseInterface* GetInterface | ( | Interface_ID | id | ) | [virtual] |
Reimplemented from BaseInterface.
GraphicsDriverAPI void SetFrameStamp | ( | size_t | framestamp | ) |
GraphicsDriverAPI size_t GetFrameStamp | ( | ) | const |