HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DM_SceneRenderHook Class Referenceabstract

Scene render hook instance, which does the actual rendering for a viewport. More...

#include <DM_SceneHook.h>

Public Member Functions

 DM_SceneRenderHook (DM_VPortAgent &vport, DM_ViewportType view_mask)
 
virtual ~DM_SceneRenderHook ()
 
virtual bool supportsRenderer (GR_RenderVersion version)
 Restrict hook to only certain Viewport Renderer versions This method allows you to restrict this hook to only operate in some of the viewport renderers (H11 - GL3). If the viewport is set to a a renderer and this method returns false, it will be skipped. The default action is to support all viewport renderers. More...
 
virtual bool render (RE_RenderContext r, const DM_SceneHookData &hook_data)=0
 Render method called when the rendering task is required. render() performs the rendering task for the hook, or returns false if if it cannot. The RE_Render contains the active GL context and the hook_data contains viewport-specific and hook-specific data. More...
 
virtual void viewportClosed ()
 Callback method when the viewport is no longer visible. Called when the viewport is temporarily closed (quad/single switch, pane switch). This gives the hook the opportunity to clean up expensive GL objects or caches. More...
 
virtual void selectionResult (const UT_Array< GR_PickRecord > &selection)
 
DM_VPortAgentviewport () const
 Viewport this scene render is attached to. More...
 
DM_ViewportType getViewportMask () const
 
int getID () const
 
const OP_NodegetDisplayLOP () const
 Get the currently displayed LOP (LOP hook specific) More...
 
const OP_NodegetCurrentLOP () const
 

Detailed Description

Scene render hook instance, which does the actual rendering for a viewport.

Examples:
DM/DM_BackgroundHook.C, DM/DM_InfoHook.C, DM/DM_LightBloomHook.C, DM/DM_ObjectPathHook.C, DM/DM_OverdrawHook.C, and DM/DM_SceneBoundsHook.C.

Definition at line 101 of file DM_SceneHook.h.

Constructor & Destructor Documentation

DM_SceneRenderHook::DM_SceneRenderHook ( DM_VPortAgent vport,
DM_ViewportType  view_mask 
)

A Scene render hook has a parent viewport and a view type mask which determines which viewport types it will display in (eg. perspective, ortho, UV, all). The viewer_scope determines which viewer type it will appear in (Obj/Sop/Dop, or Lop).

virtual DM_SceneRenderHook::~DM_SceneRenderHook ( )
virtual

Member Function Documentation

const OP_Node* DM_SceneRenderHook::getCurrentLOP ( ) const

Get the current LOP, the LOP that is displaying handles and in the parm dialog (LOP hook specific)

const OP_Node* DM_SceneRenderHook::getDisplayLOP ( ) const

Get the currently displayed LOP (LOP hook specific)

int DM_SceneRenderHook::getID ( ) const
inline

Definition at line 141 of file DM_SceneHook.h.

DM_ViewportType DM_SceneRenderHook::getViewportMask ( ) const
inline

Definition at line 140 of file DM_SceneHook.h.

virtual bool DM_SceneRenderHook::render ( RE_RenderContext  r,
const DM_SceneHookData hook_data 
)
pure virtual

Render method called when the rendering task is required. render() performs the rendering task for the hook, or returns false if if it cannot. The RE_Render contains the active GL context and the hook_data contains viewport-specific and hook-specific data.

virtual void DM_SceneRenderHook::selectionResult ( const UT_Array< GR_PickRecord > &  selection)
virtual

For hooks that register with DM_HOOK_FRAMEBUFFER_PICK, this reports the selection back to the hook once it is complete. only picks for this hook are returned, and this may be an empty list.

virtual bool DM_SceneRenderHook::supportsRenderer ( GR_RenderVersion  version)
inlinevirtual

Restrict hook to only certain Viewport Renderer versions This method allows you to restrict this hook to only operate in some of the viewport renderers (H11 - GL3). If the viewport is set to a a renderer and this method returns false, it will be skipped. The default action is to support all viewport renderers.

Definition at line 117 of file DM_SceneHook.h.

DM_VPortAgent& DM_SceneRenderHook::viewport ( ) const
inline

Viewport this scene render is attached to.

Definition at line 139 of file DM_SceneHook.h.

virtual void DM_SceneRenderHook::viewportClosed ( )
virtual

Callback method when the viewport is no longer visible. Called when the viewport is temporarily closed (quad/single switch, pane switch). This gives the hook the opportunity to clean up expensive GL objects or caches.


The documentation for this class was generated from the following file: