HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DM_VPortAgent Class Reference

#include <DM_VPortAgent.h>

+ Inheritance diagram for DM_VPortAgent:

Public Member Functions

 DM_VPortAgent (DM_SceneManager &app, DM_Viewport *display, GUI_ViewState *view, DM_ViewportType type=DM_VIEWPORT_PERSPECTIVE)
 
virtual ~DM_VPortAgent ()
 
int getUniqueId () const
 Each viewport has a unique integer id used to differentiate them. More...
 
int getBoundingBox (UT_BoundingBox &bbox, const UT_Matrix3R *rot, bool non_templated_only, const DM_Viewport &viewport) const
 Compute bounding box of the scene. More...
 
void setupViewport ()
 
void cleanupViewport ()
 
void refresh () const
 
DM_ViewportType getViewType () const
 The projection type of this viewport. More...
 
GUI_ViewParameter::axis getHomeAxis () const
 For ortho viewports, the projection type (top, front, right, etc) More...
 
int isOrtho () const
 Projection type, ortho or perspective. More...
 
bool isActiveRender () const
 Returns true if user interaction is occuring (drag, tumble, XCF). More...
 
bool isLopsView () const
 Returns true if this is rendering LOPs, and false if Obj,SOPs or DOPs. More...
 
const GUI_ViewStategetViewStateRef () const
 The view state contains transform, projection and display options. More...
 
GUI_ViewStategetViewStateRef ()
 
GUI_DetailLookgetDetailLook (int look_id, const GUI_DetailList *geos)
 
const GUI_DetailLookgetDetailLook (int node_id) const
 
const GUI_DetailLookcurrentDetail () const
 Fetch the detail of the current SOP or POP. More...
 
GUI_DetailLookcurrentDetail ()
 
void drawBackground (bool draw)
 turn on/off the background elements More...
 
void resetForNew ()
 Called when loading a new hip file or File>New. More...
 
void handleDisplayOptionEvent (UI_Event *e)
 handle a change in our display options More...
 
void handleViewParameterEvent (UI_Event *e)
 handle a change in our view parameters More...
 
void doRender (RE_Render *r, int x, int y)
 render all elements in this viewport More...
 
void overlayRender (RE_Render *r, int x, int y)
 render any transient overlay elements in the viewport More...
 
void renderHandles (RE_Render *r, int x, int y, unsigned mask)
 render all handles present in the viewport More...
 
void changeType (UI_Object *by, DM_ViewportType new_type)
 Change the type of the viewport to a different projection or 2D/3D. More...
 
void close ()
 
void requestDraw ()
 Request a deferred redraw. More...
 
RE_TexturegetBeautyPassTexture (RE_Render *r, bool resolve_aa=true) const
 Access the beauty pass textures Get a texture containing the color or depth of the beauty pass buffer. This texture is always single-sampled. More...
 
RE_TexturegetBeautyPassDepthTexture (RE_Render *r, bool resolve_aa=true) const
 
bool copyBeautyToTexture (RE_Render *r, UT_DimRect src_area, RE_Texture *dst_texture, int dst_layer) const
 copy the beauty pass to 'dst_texture'. More...
 
PXL_LookupgetBeautyLUT ()
 Returns the LUT for the beauty pass, if any. More...
 
TIL_RastergetBeautyPassImage (RE_Render *r)
 
TIL_RastergetBeautyPassDepthImage (RE_Render *r)
 
bool getBeautyPassHDR () const
 
void setBeautyPassConsolidate (bool con)
 
void preSetupGeometry (RE_Render *r)
 ensure all geometry is up to date before a redraw, and cleanup after More...
 
void postCleanupGeometry (RE_Render *r)
 
void setupGeometry (RE_Render *r)
 
void cleanupGeometry (RE_Render *r)
 
void fastSetupGeometry (RE_Render *r)
 
bool singlePickObject (RE_Render *r, int x, int y, GR_PickRecord &result, const GR_ObjectPickFlags &pick_flags, fpreal *depth, const GUI_DetailList *geos)
 
bool singlePickHandle (RE_Render *r, int x, int y, GR_PickRecord &result, fpreal *depth)
 Check for a pick on a handle. Returns true if a handle was picked. More...
 
int boxPickObject (RE_Render *r, const UT_DimRect &area, uint8 *texture, UT_Array< GR_PickRecord > &pick_records, bool visible_only, bool wholy_contained, const GUI_DetailList *geos)
 Area select objects, possibly with a matte. returns a list of object IDs for those objects picked. This does not pick handles or SOP geometry. The return value is the length of the pick list. More...
 
bool singlePickComponent (RE_Render *r, int x, int y, GR_PickRecord &result, unsigned pickmask, GEO_PrimTypeCompat::TypeMask pmask, fpreal *depth, const GUI_DetailList *geos, bool enable_occlusion)
 Single select a geomerty element. Returns a single pick result for components in objects 'geos'. More...
 
int boxPickComponent (RE_Render *r, const UT_DimRect &area, uint8 *texture, UT_Array< GR_PickRecord > &pick_records, bool sort_records, unsigned pickmask, GEO_PrimTypeCompat::TypeMask pmask, bool visible_only, bool contained, bool interactive, const GUI_DetailList *geos)
 Box, lasso or paint select components. More...
 
int componentPickRender (RE_Render *r, unsigned int pickmask, unsigned int xray_pickmask, GEO_PrimTypeCompat::TypeMask pmask, const GUI_DetailList *geos, GR_PickStyle pickstyle, bool invert_mask, UT_Array< GR_PickRecord > *pick_rec)
 
bool singleSnapComponent (RE_Render *r, int x, int y, bool hide_selected, bool enable_occlusion, bool do_xray, bool extend_floor, GR_PickRecord &result, UT_Array< GR_PickRecord > &near_results, unsigned pickmask, int gravity, GEO_PrimTypeCompat::TypeMask pmask, const GUI_DetailList *geos=NULL)
 Single select a geometry element to snap to. Returns a single snap result for components in objects 'geos'. More...
 
bool singleSnapPeanut (RE_Render *r, int x, int y, bool hide_selected, bool enable_occlusion, bool do_xray, bool extend_floor, GR_PickRecord &result, unsigned pickmask, GEO_PrimTypeCompat::TypeMask pmask, const GUI_DetailList *geos=NULL)
 Single select a peanut element to snap to. Returns a single snap result for peanuts. More...
 
bool snapGeometry (RE_Render *r, int x, int y, int pnt_rad, int edge_rad, int face_rad, bool occlusion, bool orient_normals, UT_Vector3D &p, UT_Vector3D &n, int64 serial)
 
void invalidatePickBuffers ()
 
GUI_RenderPassFlags renderGeometry (RE_Render *r, GR_RenderMode render_type, GR_ShadingPass shade_pass, GR_AlphaPass apass, OP_Bundle *visible_objs=NULL, DM_GeoSortMode sort=DM_GEO_UNSORTED)
 
void renderDecorations (RE_Render *r, GUI_DisplayOption *dispopt, bool hover_decorations)
 Draw geometry decorations and markers Render all decorations. If 'hover_decorations' is true, only the locate-style decorations will be drawn. More...
 
GUI_RenderPassFlags renderSomeGeometry (RE_Render *r, int x, int y, const UT_Array< OP_Node * > &nodes, const UT_IntArray *detail_indexes, GR_RenderMode render_type, GR_ShadingPass shade_pass, GR_AlphaPass apass, bool do_geometry_setup)
 Render geometry corresponding to the OP_Nodes is the passed list. More...
 
GUI_RenderPassFlags renderSingleGeo (RE_Render *r, GUI_GeoRender *gr, GR_RenderMode render_type, GR_ShadingPass shading_pass, GR_AlphaPass ap, bool init_lights, bool treat_uv_viewport_as_3d=false)
 Render a single geometry using render mode 'render_type'. More...
 
void renderFloor (RE_Render *r, int x, int y)
 Our floor or construction plane. More...
 
void overlayRenderFloor (RE_Render *r, int x, int y)
 Render construction plane in overlayRender. More...
 
const DM_FloorInterface * getFloorInterface () const
 
DM_FloorInterface * getFloorInterface ()
 
DM_ViewportHooks & hooks () const
 Interface to viewport hooks (render and mouse) More...
 
bool needsOverlayRender () const
 
DM_GeoDetail getCurrentDetail () const
 Returns the current detail within the object, when at SOP/POP/DOP level. More...
 
void initGPUTimers (RE_Render *r)
 
void collectGPUTimers (RE_Render *r)
 
GUI_RotoView getRotoViewType ()
 
void markGeoSetup (bool setup, DM_Viewport *setup_port=NULL)
 
bool isGeoSetup () const
 
void setGlobalLightArray (const UT_Array< OBJ_Ambient * > &l)
 
void setGlobalLightArray (const UT_ValArray< RE_Light * > &l)
 
bool setupLights (RE_Render *r, GUI_DisplayOption *opt)
 
void cleanupLights (RE_Render *r)
 
RE_LightListgetLightList ()
 
const UT_ValArray< RE_Light * > & getAllLights () const
 
GR_LightingPass getLightingPass () const
 
void setLightingPass (GR_LightingPass p)
 
int64 getFramebufferUsageKB (bool hdr, bool hql, bool trans, int aa)
 
void getZBufferTransform (float zt[2], RE_Light *light=NULL)
 
void handleNewGeometryEvent (UI_Event *e)
 
void updateAttributeOptions (const GU_DetailHandle &gdh)
 
void startPerfMonTimer (RE_Render *r, RE_GPUTimer &timer, const char *msg) const
 
void stopPerfMonTimer (RE_Render *r, RE_GPUTimer &timer) const
 
int setupBackfaceAndWinding (RE_Render *r, const GUI_DisplayOption *opts)
 
void cleanupBackfaceAndWinding (RE_Render *r, int setup_flags)
 
bool resolveDepthBuffer (RE_Render *r, RE_Texture *aa_depth_tex, RE_Texture *depth_tex) const
 
int64 getSceneVersion (fpreal t, bool shadow, bool &timedep)
 
const DM_Viewport * getDisplay () const
 
DM_Viewport * getDisplay ()
 
int getTransparencyLayers (const GUI_DisplayOption *disp)
 
void prepareStencilRouting (RE_Render *r, int nsamples)
 
void prepareABufferFront (RE_Render *r, int nsamples)
 
void updateTimeDependentLook (fpreal t)
 
bool isToolbarLinked () const
 
const GUI_DetailListgetDetails () const
 
const GUI_DetailListgetDetails ()
 
void setupViewUniforms (RE_Render *r)
 
void cleanupViewUniforms (RE_Render *r)
 
void applyEnvMapOverride (RE_Render *r) const
 
bool needsToDrawFloor () const
 
const DM_SceneManager & modeler () const
 
void renderBackgroundImage (RE_Render *r)
 
bool hasLocates ()
 
void handleLocateEvent (UI_Event *e)
 
int getNumOpaqueObjects () const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
DM_GeoDetail getOpaqueObject (int index) const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
int getNumTransparentObjects () const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
DM_GeoDetail getTransparentObject (int index) const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
int getNumUnlitObjects () const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
DM_GeoDetail getUnlitObject (int index) const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
int getNumXRayObjects () const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
DM_GeoDetail getXRayObject (int index) const
 Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1. More...
 
- Public Member Functions inherited from UI_Object
 UI_Object ()
 
virtual ~UI_Object ()
 
 UI_Object (const UI_Object &)=delete
 
UI_Objectoperator= (const UI_Object &)=delete
 
virtual void handleEvent (UI_Event *event)
 
virtual int interestingEvent (UI_EventType t, UI_DeviceEvent *event) const
 
virtual void deleteReferences (UI_Object *to_whom)
 
UI_ObjectgetParent () const
 
void setParent (UI_Object *p)
 
bool isAncestor (const UI_Object *who) const
 
void addDependent (UI_Object *who)
 
bool removeDependent (UI_Object *who)
 
bool replaceDependent (UI_Object *who, UI_Object *with)
 
bool isDependent (UI_Object *who) const
 
bool hasDependents () const
 
const UI_ObjectListdependents () const
 
void sendEvent (const UI_Event &e) const
 
void distributeEvent (UI_Event *event, int upwards)
 
void relayEvent (UI_Event *event, UI_Object *target)
 
void generateEvent (UI_EventType t, UI_Object *target)
 
void purgeEvents (UI_EventType t, UI_Object *target, UI_EventMethod method=0)
 
void triggerImmediateEvent (UI_Event *event, int upwards)
 
virtual const char * className () const
 
int getProxyId ()
 
void bumpQueueCount (int dir)
 
void setName (const char *symbolName)
 
const char * getName () const
 
void buildFullPath (UT_WorkBuffer &string) const
 
void debugQueueEventsFor (const UI_Value *value, const char *name, UI_EventType t=UI_EVENT_NO_EVENT) const
 
const UI_ValueListvalueInterests () const
 
void interestedInValue (UI_Value *)
 
void removeValueInterest (UI_Value *)
 

Friends

class dm_SetupTask
 

Additional Inherited Members

- Static Public Member Functions inherited from UI_Object
static UI_ManagergetManager ()
 
static UI_Queue * getInputQueue ()
 
static int keycmp (const char *, int key)
 
static int keycmp (const char *, int key, const UI_HotkeyEcho &)
 
static void keyEcho (const char *, const UI_HotkeyEcho &)
 
static void actionKeyEcho (const char *, const char *custom_suffix=0)
 
static void toggleKeyEcho (const char *, bool new_value)
 
- Protected Member Functions inherited from UI_Object
UI_ObjectListdependents ()
 
virtual void preTerminateCallback ()
 

Detailed Description

Constructor & Destructor Documentation

DM_VPortAgent::DM_VPortAgent ( DM_SceneManager &  app,
DM_Viewport *  display,
GUI_ViewState view,
DM_ViewportType  type = DM_VIEWPORT_PERSPECTIVE 
)
virtual DM_VPortAgent::~DM_VPortAgent ( )
virtual

Member Function Documentation

void DM_VPortAgent::applyEnvMapOverride ( RE_Render r) const
int DM_VPortAgent::boxPickComponent ( RE_Render r,
const UT_DimRect area,
uint8 texture,
UT_Array< GR_PickRecord > &  pick_records,
bool  sort_records,
unsigned  pickmask,
GEO_PrimTypeCompat::TypeMask  pmask,
bool  visible_only,
bool  contained,
bool  interactive,
const GUI_DetailList geos 
)

Box, lasso or paint select components.

int DM_VPortAgent::boxPickObject ( RE_Render r,
const UT_DimRect area,
uint8 texture,
UT_Array< GR_PickRecord > &  pick_records,
bool  visible_only,
bool  wholy_contained,
const GUI_DetailList geos 
)

Area select objects, possibly with a matte. returns a list of object IDs for those objects picked. This does not pick handles or SOP geometry. The return value is the length of the pick list.

void DM_VPortAgent::changeType ( UI_Object by,
DM_ViewportType  new_type 
)

Change the type of the viewport to a different projection or 2D/3D.

void DM_VPortAgent::cleanupBackfaceAndWinding ( RE_Render r,
int  setup_flags 
)
void DM_VPortAgent::cleanupGeometry ( RE_Render r)
void DM_VPortAgent::cleanupLights ( RE_Render r)
void DM_VPortAgent::cleanupViewport ( )
void DM_VPortAgent::cleanupViewUniforms ( RE_Render r)
void DM_VPortAgent::close ( )

Called when the viewport closes, but is not deleted (such as a pane tab switch).

void DM_VPortAgent::collectGPUTimers ( RE_Render r)
int DM_VPortAgent::componentPickRender ( RE_Render r,
unsigned int  pickmask,
unsigned int  xray_pickmask,
GEO_PrimTypeCompat::TypeMask  pmask,
const GUI_DetailList geos,
GR_PickStyle  pickstyle,
bool  invert_mask,
UT_Array< GR_PickRecord > *  pick_rec 
)
bool DM_VPortAgent::copyBeautyToTexture ( RE_Render r,
UT_DimRect  src_area,
RE_Texture dst_texture,
int  dst_layer 
) const

copy the beauty pass to 'dst_texture'.

const GUI_DetailLook* DM_VPortAgent::currentDetail ( ) const

Fetch the detail of the current SOP or POP.

GUI_DetailLook* DM_VPortAgent::currentDetail ( )
void DM_VPortAgent::doRender ( RE_Render r,
int  x,
int  y 
)

render all elements in this viewport

void DM_VPortAgent::drawBackground ( bool  draw)

turn on/off the background elements

void DM_VPortAgent::fastSetupGeometry ( RE_Render r)
const UT_ValArray<RE_Light*>& DM_VPortAgent::getAllLights ( ) const
inline

Definition at line 354 of file DM_VPortAgent.h.

PXL_Lookup* DM_VPortAgent::getBeautyLUT ( )

Returns the LUT for the beauty pass, if any.

TIL_Raster* DM_VPortAgent::getBeautyPassDepthImage ( RE_Render r)
RE_Texture* DM_VPortAgent::getBeautyPassDepthTexture ( RE_Render r,
bool  resolve_aa = true 
) const
bool DM_VPortAgent::getBeautyPassHDR ( ) const
TIL_Raster* DM_VPortAgent::getBeautyPassImage ( RE_Render r)
RE_Texture* DM_VPortAgent::getBeautyPassTexture ( RE_Render r,
bool  resolve_aa = true 
) const

Access the beauty pass textures Get a texture containing the color or depth of the beauty pass buffer. This texture is always single-sampled.

int DM_VPortAgent::getBoundingBox ( UT_BoundingBox bbox,
const UT_Matrix3R rot,
bool  non_templated_only,
const DM_Viewport &  viewport 
) const

Compute bounding box of the scene.

DM_GeoDetail DM_VPortAgent::getCurrentDetail ( ) const

Returns the current detail within the object, when at SOP/POP/DOP level.

GUI_DetailLook* DM_VPortAgent::getDetailLook ( int  look_id,
const GUI_DetailList geos 
)

Given a look id, and possibly a GUI_DetailList, find the GUI_DetailLook with the supplied id.

const GUI_DetailLook* DM_VPortAgent::getDetailLook ( int  node_id) const
const GUI_DetailList& DM_VPortAgent::getDetails ( ) const
const GUI_DetailList& DM_VPortAgent::getDetails ( )
const DM_Viewport* DM_VPortAgent::getDisplay ( ) const
inline

Definition at line 401 of file DM_VPortAgent.h.

DM_Viewport* DM_VPortAgent::getDisplay ( )
inline

Definition at line 402 of file DM_VPortAgent.h.

const DM_FloorInterface* DM_VPortAgent::getFloorInterface ( ) const
inline

Definition at line 299 of file DM_VPortAgent.h.

DM_FloorInterface* DM_VPortAgent::getFloorInterface ( )
inline

Definition at line 301 of file DM_VPortAgent.h.

int64 DM_VPortAgent::getFramebufferUsageKB ( bool  hdr,
bool  hql,
bool  trans,
int  aa 
)
GUI_ViewParameter::axis DM_VPortAgent::getHomeAxis ( ) const

For ortho viewports, the projection type (top, front, right, etc)

GR_LightingPass DM_VPortAgent::getLightingPass ( ) const
inline

Definition at line 357 of file DM_VPortAgent.h.

RE_LightList* DM_VPortAgent::getLightList ( )
inline

Definition at line 352 of file DM_VPortAgent.h.

int DM_VPortAgent::getNumOpaqueObjects ( ) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 876 of file DM_VPortAgent.h.

int DM_VPortAgent::getNumTransparentObjects ( ) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 888 of file DM_VPortAgent.h.

int DM_VPortAgent::getNumUnlitObjects ( ) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 900 of file DM_VPortAgent.h.

int DM_VPortAgent::getNumXRayObjects ( ) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 912 of file DM_VPortAgent.h.

DM_GeoDetail DM_VPortAgent::getOpaqueObject ( int  index) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 882 of file DM_VPortAgent.h.

GUI_RotoView DM_VPortAgent::getRotoViewType ( )
int64 DM_VPortAgent::getSceneVersion ( fpreal  t,
bool  shadow,
bool &  timedep 
)
int DM_VPortAgent::getTransparencyLayers ( const GUI_DisplayOption disp)
DM_GeoDetail DM_VPortAgent::getTransparentObject ( int  index) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 894 of file DM_VPortAgent.h.

int DM_VPortAgent::getUniqueId ( ) const

Each viewport has a unique integer id used to differentiate them.

Examples:
DM/DM_OverdrawHook.C.
DM_GeoDetail DM_VPortAgent::getUnlitObject ( int  index) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 906 of file DM_VPortAgent.h.

const GUI_ViewState& DM_VPortAgent::getViewStateRef ( ) const

The view state contains transform, projection and display options.

GUI_ViewState& DM_VPortAgent::getViewStateRef ( )
DM_ViewportType DM_VPortAgent::getViewType ( ) const
inline

The projection type of this viewport.

Examples:
DM/DM_OverdrawHook.C.

Definition at line 79 of file DM_VPortAgent.h.

DM_GeoDetail DM_VPortAgent::getXRayObject ( int  index) const
inline

Access displayed objects in the viewport Return a handle to an object displayed in the viewport. Do not cache these over several redraws, as they may become invalid. get*Object()'s index parameter can be 0 to getNum*Objects()-1.

Definition at line 918 of file DM_VPortAgent.h.

void DM_VPortAgent::getZBufferTransform ( float  zt[2],
RE_Light light = NULL 
)
void DM_VPortAgent::handleDisplayOptionEvent ( UI_Event e)

handle a change in our display options

void DM_VPortAgent::handleLocateEvent ( UI_Event e)

Methods to process mouse movement

void DM_VPortAgent::handleNewGeometryEvent ( UI_Event e)
void DM_VPortAgent::handleViewParameterEvent ( UI_Event e)

handle a change in our view parameters

bool DM_VPortAgent::hasLocates ( )

Methods to process mouse movement

DM_ViewportHooks& DM_VPortAgent::hooks ( ) const
inline

Interface to viewport hooks (render and mouse)

Definition at line 304 of file DM_VPortAgent.h.

void DM_VPortAgent::initGPUTimers ( RE_Render r)
void DM_VPortAgent::invalidatePickBuffers ( )

Call to manually invalidate any cached pick/snap buffers when the automatic detection is insufficient.

bool DM_VPortAgent::isActiveRender ( ) const

Returns true if user interaction is occuring (drag, tumble, XCF).

bool DM_VPortAgent::isGeoSetup ( ) const
inline

Definition at line 343 of file DM_VPortAgent.h.

bool DM_VPortAgent::isLopsView ( ) const

Returns true if this is rendering LOPs, and false if Obj,SOPs or DOPs.

int DM_VPortAgent::isOrtho ( ) const

Projection type, ortho or perspective.

bool DM_VPortAgent::isToolbarLinked ( ) const
void DM_VPortAgent::markGeoSetup ( bool  setup,
DM_Viewport *  setup_port = NULL 
)
const DM_SceneManager& DM_VPortAgent::modeler ( ) const
inline

Definition at line 426 of file DM_VPortAgent.h.

bool DM_VPortAgent::needsOverlayRender ( ) const
inline

Definition at line 306 of file DM_VPortAgent.h.

bool DM_VPortAgent::needsToDrawFloor ( ) const
inline

Definition at line 423 of file DM_VPortAgent.h.

void DM_VPortAgent::overlayRender ( RE_Render r,
int  x,
int  y 
)

render any transient overlay elements in the viewport

void DM_VPortAgent::overlayRenderFloor ( RE_Render r,
int  x,
int  y 
)

Render construction plane in overlayRender.

void DM_VPortAgent::postCleanupGeometry ( RE_Render r)
void DM_VPortAgent::prepareABufferFront ( RE_Render r,
int  nsamples 
)
void DM_VPortAgent::prepareStencilRouting ( RE_Render r,
int  nsamples 
)
void DM_VPortAgent::preSetupGeometry ( RE_Render r)

ensure all geometry is up to date before a redraw, and cleanup after

void DM_VPortAgent::refresh ( ) const
void DM_VPortAgent::renderBackgroundImage ( RE_Render r)
void DM_VPortAgent::renderDecorations ( RE_Render r,
GUI_DisplayOption dispopt,
bool  hover_decorations 
)

Draw geometry decorations and markers Render all decorations. If 'hover_decorations' is true, only the locate-style decorations will be drawn.

void DM_VPortAgent::renderFloor ( RE_Render r,
int  x,
int  y 
)

Our floor or construction plane.

GUI_RenderPassFlags DM_VPortAgent::renderGeometry ( RE_Render r,
GR_RenderMode  render_type,
GR_ShadingPass  shade_pass,
GR_AlphaPass  apass,
OP_Bundle visible_objs = NULL,
DM_GeoSortMode  sort = DM_GEO_UNSORTED 
)

Box, lasso or paint select components. Render all geometry in the viewport using render mode 'render_type'.

void DM_VPortAgent::renderHandles ( RE_Render r,
int  x,
int  y,
unsigned  mask 
)

render all handles present in the viewport

GUI_RenderPassFlags DM_VPortAgent::renderSingleGeo ( RE_Render r,
GUI_GeoRender gr,
GR_RenderMode  render_type,
GR_ShadingPass  shading_pass,
GR_AlphaPass  ap,
bool  init_lights,
bool  treat_uv_viewport_as_3d = false 
)

Render a single geometry using render mode 'render_type'.

GUI_RenderPassFlags DM_VPortAgent::renderSomeGeometry ( RE_Render r,
int  x,
int  y,
const UT_Array< OP_Node * > &  nodes,
const UT_IntArray detail_indexes,
GR_RenderMode  render_type,
GR_ShadingPass  shade_pass,
GR_AlphaPass  apass,
bool  do_geometry_setup 
)

Render geometry corresponding to the OP_Nodes is the passed list.

void DM_VPortAgent::requestDraw ( )
inline

Request a deferred redraw.

Definition at line 137 of file DM_VPortAgent.h.

void DM_VPortAgent::resetForNew ( )

Called when loading a new hip file or File>New.

bool DM_VPortAgent::resolveDepthBuffer ( RE_Render r,
RE_Texture aa_depth_tex,
RE_Texture depth_tex 
) const
void DM_VPortAgent::setBeautyPassConsolidate ( bool  con)
void DM_VPortAgent::setGlobalLightArray ( const UT_Array< OBJ_Ambient * > &  l)
void DM_VPortAgent::setGlobalLightArray ( const UT_ValArray< RE_Light * > &  l)
void DM_VPortAgent::setLightingPass ( GR_LightingPass  p)
inline

Definition at line 358 of file DM_VPortAgent.h.

int DM_VPortAgent::setupBackfaceAndWinding ( RE_Render r,
const GUI_DisplayOption opts 
)
void DM_VPortAgent::setupGeometry ( RE_Render r)
bool DM_VPortAgent::setupLights ( RE_Render r,
GUI_DisplayOption opt 
)
void DM_VPortAgent::setupViewport ( )

Called by DM_Viewport to initialize and retire the viewport agent when opening and closing. Treat as private.

void DM_VPortAgent::setupViewUniforms ( RE_Render r)
bool DM_VPortAgent::singlePickComponent ( RE_Render r,
int  x,
int  y,
GR_PickRecord result,
unsigned  pickmask,
GEO_PrimTypeCompat::TypeMask  pmask,
fpreal depth,
const GUI_DetailList geos,
bool  enable_occlusion 
)

Single select a geomerty element. Returns a single pick result for components in objects 'geos'.

bool DM_VPortAgent::singlePickHandle ( RE_Render r,
int  x,
int  y,
GR_PickRecord result,
fpreal depth 
)

Check for a pick on a handle. Returns true if a handle was picked.

bool DM_VPortAgent::singlePickObject ( RE_Render r,
int  x,
int  y,
GR_PickRecord result,
const GR_ObjectPickFlags pick_flags,
fpreal depth,
const GUI_DetailList geos 
)

returns a single pick result from the x,y mouse coords. The pick buffer must be rendered first. Returns false if nothing was picked.

bool DM_VPortAgent::singleSnapComponent ( RE_Render r,
int  x,
int  y,
bool  hide_selected,
bool  enable_occlusion,
bool  do_xray,
bool  extend_floor,
GR_PickRecord result,
UT_Array< GR_PickRecord > &  near_results,
unsigned  pickmask,
int  gravity,
GEO_PrimTypeCompat::TypeMask  pmask,
const GUI_DetailList geos = NULL 
)

Single select a geometry element to snap to. Returns a single snap result for components in objects 'geos'.

bool DM_VPortAgent::singleSnapPeanut ( RE_Render r,
int  x,
int  y,
bool  hide_selected,
bool  enable_occlusion,
bool  do_xray,
bool  extend_floor,
GR_PickRecord result,
unsigned  pickmask,
GEO_PrimTypeCompat::TypeMask  pmask,
const GUI_DetailList geos = NULL 
)

Single select a peanut element to snap to. Returns a single snap result for peanuts.

bool DM_VPortAgent::snapGeometry ( RE_Render r,
int  x,
int  y,
int  pnt_rad,
int  edge_rad,
int  face_rad,
bool  occlusion,
bool  orient_normals,
UT_Vector3D p,
UT_Vector3D n,
int64  serial 
)
void DM_VPortAgent::startPerfMonTimer ( RE_Render r,
RE_GPUTimer timer,
const char *  msg 
) const

Methods for starting and stopping events in the old performance monitor.

void DM_VPortAgent::stopPerfMonTimer ( RE_Render r,
RE_GPUTimer timer 
) const
void DM_VPortAgent::updateAttributeOptions ( const GU_DetailHandle gdh)
void DM_VPortAgent::updateTimeDependentLook ( fpreal  t)

Friends And Related Function Documentation

friend class dm_SetupTask
friend

Definition at line 432 of file DM_VPortAgent.h.


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