This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions, Plug-in Display Interface, About RenderItem.
#include <IObjectDisplay2.h>
To give object plugins better control of display, now object plugins can expose IObjectDisplay2 interface.
This interface allows object plugins to provide different RenderItem for different nodes and different views.
If an object plugin provides both IObjectDisplay2 and IObjectDisplay interface, only IObjectDisplay2 will be used. IObjectDisplay interface is still supported by Nitrous, however, we don�t suggest plugins to use it anymore. In the future it will be obsoleted.
Public Member Functions |
|
GraphicsDriverAPI | IObjectDisplay2 () |
virtual GraphicsDriverAPI | ~IObjectDisplay2 () |
virtual
GraphicsDriverAPI unsigned long |
GetObjectDisplayRequirement () const |
Return the object display requirement of
this object. |
|
virtual bool | PrepareDisplay (const MaxContext &maxContext, const UpdateDisplayContext &prepareDisplayContext)=0 |
An object could be referenced by multiple
nodes at the same time, while different node may requires different
display of the object (backface cull vs. |
|
virtual bool | UpdatePerNodeItems (const MaxContext &maxContext, const UpdateDisplayContext &updateDisplayContext, UpdateNodeContext &nodeContext, IRenderItemContainer &targetRenderItemContainer)=0 |
This function will be called for each owner
nodes of a given object plugin. |
|
virtual GraphicsDriverAPI bool | UpdatePerViewItems (const MaxContext &maxContext, const UpdateDisplayContext &updateDisplayContext, UpdateNodeContext &nodeContext, UpdateViewContext &viewContext, IRenderItemContainer &targetRenderItemContainer) |
This function will be called for each
viewport and for each owner nodes of a given object plugin.
|
|
virtual
GraphicsDriverAPI Interface_ID |
GetID () |
virtual
GraphicsDriverAPI BaseInterface * |
GetInterface (Interface_ID id) |
GraphicsDriverAPI IObjectDisplay2 | ( | ) |
virtual GraphicsDriverAPI ~IObjectDisplay2 | ( | ) | [virtual] |
virtual GraphicsDriverAPI unsigned long GetObjectDisplayRequirement | ( | ) | const [virtual] |
Return the object display requirement of this object.
virtual bool PrepareDisplay | ( | const MaxContext & | maxContext, |
const UpdateDisplayContext & | prepareDisplayContext | ||
) | [pure virtual] |
An object could be referenced by multiple nodes at the same time, while different node may requires different display of the object (backface cull vs.
non-backface cull, vertex color shading vs. material shading, etc.). IObjectDisplay2::PrepareDisplay gives object plugins a chance to prepare display data for all nodes, thus avoid duplicate display data generation for each node or each view. If an object contains a Mesh or MNMesh and wants to display it, then Mesh::PrepareDisplay or MNMesh::PrepareDisplay must be called in this function.
maxContext | Contains all viewports in which this object will be displayed. |
prepareDisplayContext | The display context, which contains all the requirements for plugin to generate render items. |
virtual bool UpdatePerNodeItems | ( | const MaxContext & | maxContext, |
const UpdateDisplayContext & | updateDisplayContext, | ||
UpdateNodeContext & | nodeContext, | ||
IRenderItemContainer & | targetRenderItemContainer | ||
) | [pure virtual] |
This function will be called for each owner nodes of a given object plugin.
Plugins can follow the input node properties, and create appropriate RenderItem. For example, if an object wants to display high-resolution mesh when node is selected, and display low-resolution mesh when node is not selected, it can use this function to create different DisplayItem for different notes.
maxContext | Contains all viewports in which this object will be displayed. |
updateDisplayContext | The display context, which contains all the requirements for plugin to generate render items. |
nodeContext | which contains all infos required for adding per node relevant render items. |
targetRenderItemContainer | the target render item container to which this plugin object will be added. |
virtual GraphicsDriverAPI bool UpdatePerViewItems | ( | const MaxContext & | maxContext, |
const UpdateDisplayContext & | updateDisplayContext, | ||
UpdateNodeContext & | nodeContext, | ||
UpdateViewContext & | viewContext, | ||
IRenderItemContainer & | targetRenderItemContainer | ||
) | [virtual] |
This function will be called for each viewport and for each owner nodes of a given object plugin.
If plugin wants to display / hide certain RenderItem for a given view property, plugin can override this function and update RenderItem based on the input view properties.
maxContext | Contains all viewports in which this object will be displayed. |
pView | the view for which render items will be updated |
updateDisplayContext | The display context, which contains all the requirements for plugin to generate render items. |
nodeContext | which contains all infos required for adding per node relevant render items. |
targetRenderItemContainer | the target render item container to which this plugin object will be added. |
virtual GraphicsDriverAPI Interface_ID GetID | ( | ) | [virtual] |
Reimplemented from BaseInterface.
virtual GraphicsDriverAPI BaseInterface* GetInterface | ( | Interface_ID | id | ) | [virtual] |
Reimplemented from BaseInterface.