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 Types

using RasterPtr = UT_UniquePtr< TIL_Raster >
 

Public Member Functions

 DM_VPortAgent (DM_SceneManager &app, DM_Viewport *display, GUI_ViewState *view, DM_ViewportType type=DM_VIEWPORT_PERSPECTIVE)
 
 ~DM_VPortAgent () override
 
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, bool skip_view_cam, 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_DetailLookPtr getDetailLook (int look_id, const GUI_DetailList *geos)
 
GUI_DetailLookPtr getDetailLook (int node_id) const
 
GUI_DetailLookPtr getDetailLookByIndex (int index) const
 
const GUI_DetailLookcurrentDetail () const
 Fetch the detail of the current SOP or POP. More...
 
GUI_DetailLookcurrentDetail ()
 
OP_NodecurrentCamera () const
 
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...
 
UT_UniquePtr< TIL_RastergetBeautyPassImage (RE_Render *r)
 
UT_UniquePtr< 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_RenderContext r)
 
void cleanupGeometry (RE_RenderContext r)
 
void fastSetupGeometry (RE_RenderContext 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, bool handle_pick_radius)
 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)
 
bool getComponentPickBuffers (UT_SharedPtr< RE_Texture > &pickhigh, UT_SharedPtr< RE_Texture > &picklow, UT_SharedPtr< RE_Texture > &depth)
 
void getObjectPickGeos (const GUI_DetailList *looks, UT_Array< GUI_GeoRender * > &out_all_geos, UT_Array< GUI_GeoRender * > &out_xray_geos, UT_Array< GUI_GeoRender * > &out_xray_sec_geos)
 
void getComponentPickGeos (const GUI_DetailList *looks, unsigned int xray_pickmask, UT_Array< GUI_GeoRender * > &out_all_geos, UT_Array< GUI_GeoRender * > &out_xray_geos)
 
bool singleSnapComponent (RE_Render *r, int x, int y, bool hide_selected, bool enable_occlusion, bool do_current, bool do_xray, bool do_guides, bool extend_floor, GR_PickRecord &result, UT_Vector2i *result_offset, 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 do_guides, bool extend_floor, GR_PickRecord &result, UT_Vector2i *result_offset, 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_RenderContext r, int x, int y, int pnt_rad, int edge_rad, int face_rad, bool occlusion, bool orient_normals, DM_SnapSelection snap_sel, UT_Vector3D &p, UT_Vector3D &n, int64 serial)
 
void invalidatePickBuffers ()
 
GUI_RenderPassFlags renderGeometry (RE_RenderContext 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_RenderContext 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_RenderContext 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_RenderContext 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, GR_ThreadingPass thread_mode=GR_THREADING_SINGLE)
 Render a single geometry using render mode 'render_type'. More...
 
void renderFloor (RE_RenderContext 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...
 
bool checkAndClearTransientFloorFlag ()
 Check if the floor still needs to be rendered and then clear it. 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_RenderContext r, GUI_DisplayOption *opt)
 
void cleanupLights ()
 
const UT_Array< 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_RenderContext r, RE_GPUTimer &timer, const char *msg) const
 
void stopPerfMonTimer (RE_RenderContext 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 (RE_RenderContext r, const GUI_DisplayOption *disp)
 
void prepareStencilRouting (RE_RenderContext r, int nsamples)
 
void prepareABufferFront (RE_RenderContext r, int nsamples)
 
void updateTimeDependentLook (fpreal t)
 
bool isToolbarLinked () const
 
const GUI_DetailPtrListgetDetails () const
 
const GUI_DetailPtrListgetDetails ()
 
void setupViewUniforms (RE_RenderContext rc)
 
void cleanupViewUniforms (RE_RenderContext rc)
 
void setupViewUniformsGL (RE_Render *r)
 
void cleanupViewUniformsGL (RE_Render *r)
 
void applyEnvMapOverride (RE_Render *r) const
 
bool needsToDrawFloor () const
 
void initFogVolume (RE_Render *r, DM_Viewport *vport, GUI_FogMode fog, const RE_Texture *zdepth) const
 
RE_TexturegetFogVolumeTexture () const
 
RE_TexturegetRandomDitherTexture (RE_Render *r)
 
const DM_SceneManager & modeler () const
 
void renderBackgroundImage (RE_RenderContext r)
 
void renderForegroundImage (RE_RenderContext r)
 
void resolveBeautyColorPass (RE_Render *r, RE_Texture *aa_color, RE_Texture *aa_depth, RE_Texture *aa_nml, bool xray) const
 
void renderToVulkanImages ()
 
void renderVulkan (RE_RenderContext r, UT_Vector2i res)
 
UT_UniquePtr< PXL_RasterextractColorImage (RE_RenderContext r)
 
UT_UniquePtr< PXL_RasterextractDepthImage (RE_RenderContext 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 *)
 
void addKeyDelegateClientship (UI_KeyDelegate *)
 
void removeKeyDelegateClientship (UI_KeyDelegate *)
 

Static Public Member Functions

static bool shouldHideAsViewCamObject (const DM_Viewport &vport, const GUI_DetailLook &look)
 
static bool shouldHideAsViewCamObject (const DM_Viewport &vport, const OBJ_Node &node)
 
- 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)
 

Friends

class dm_SetupTask
 

Additional Inherited Members

- Protected Member Functions inherited from UI_Object
UI_ObjectListdependents ()
 
virtual void preTerminateCallback ()
 

Detailed Description

Member Typedef Documentation

Definition at line 175 of file DM_VPortAgent.h.

Constructor & Destructor Documentation

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

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.

Parameters
containedonly return results completely inside area
interactiveif true, only return "visible" results, ignoring primitives which rasterize to less than a single pixel.
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.

bool DM_VPortAgent::checkAndClearTransientFloorFlag ( )
inline

Check if the floor still needs to be rendered and then clear it.

Definition at line 368 of file DM_VPortAgent.h.

void DM_VPortAgent::cleanupBackfaceAndWinding ( RE_Render r,
int  setup_flags 
)
void DM_VPortAgent::cleanupGeometry ( RE_RenderContext  r)
void DM_VPortAgent::cleanupLights ( )
void DM_VPortAgent::cleanupViewport ( )
void DM_VPortAgent::cleanupViewUniforms ( RE_RenderContext  rc)
void DM_VPortAgent::cleanupViewUniformsGL ( 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)
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'.

OP_Node* DM_VPortAgent::currentCamera ( ) const
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

UT_UniquePtr<PXL_Raster> DM_VPortAgent::extractColorImage ( RE_RenderContext  r)
UT_UniquePtr<PXL_Raster> DM_VPortAgent::extractDepthImage ( RE_RenderContext  r)
void DM_VPortAgent::fastSetupGeometry ( RE_RenderContext  r)
const UT_Array<RE_Light*>& DM_VPortAgent::getAllLights ( ) const
inline

Definition at line 429 of file DM_VPortAgent.h.

PXL_Lookup* DM_VPortAgent::getBeautyLUT ( )

Returns the LUT for the beauty pass, if any.

UT_UniquePtr<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
UT_UniquePtr<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,
bool  skip_view_cam,
const DM_Viewport &  viewport 
) const

Compute bounding box of the scene.

bool DM_VPortAgent::getComponentPickBuffers ( UT_SharedPtr< RE_Texture > &  pickhigh,
UT_SharedPtr< RE_Texture > &  picklow,
UT_SharedPtr< RE_Texture > &  depth 
)
void DM_VPortAgent::getComponentPickGeos ( const GUI_DetailList looks,
unsigned int  xray_pickmask,
UT_Array< GUI_GeoRender * > &  out_all_geos,
UT_Array< GUI_GeoRender * > &  out_xray_geos 
)
DM_GeoDetail DM_VPortAgent::getCurrentDetail ( ) const

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

GUI_DetailLookPtr 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.

GUI_DetailLookPtr DM_VPortAgent::getDetailLook ( int  node_id) const
GUI_DetailLookPtr DM_VPortAgent::getDetailLookByIndex ( int  index) const
const GUI_DetailPtrList& DM_VPortAgent::getDetails ( ) const
const GUI_DetailPtrList& DM_VPortAgent::getDetails ( )
const DM_Viewport* DM_VPortAgent::getDisplay ( ) const
inline

Definition at line 476 of file DM_VPortAgent.h.

DM_Viewport* DM_VPortAgent::getDisplay ( )
inline

Definition at line 477 of file DM_VPortAgent.h.

const DM_FloorInterface* DM_VPortAgent::getFloorInterface ( ) const
inline

Definition at line 375 of file DM_VPortAgent.h.

DM_FloorInterface* DM_VPortAgent::getFloorInterface ( )
inline

Definition at line 377 of file DM_VPortAgent.h.

RE_Texture* DM_VPortAgent::getFogVolumeTexture ( ) const
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 432 of file DM_VPortAgent.h.

int DM_VPortAgent::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.

int DM_VPortAgent::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.

int DM_VPortAgent::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.

int DM_VPortAgent::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.

void DM_VPortAgent::getObjectPickGeos ( const GUI_DetailList looks,
UT_Array< GUI_GeoRender * > &  out_all_geos,
UT_Array< GUI_GeoRender * > &  out_xray_geos,
UT_Array< GUI_GeoRender * > &  out_xray_sec_geos 
)
DM_GeoDetail DM_VPortAgent::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.

RE_Texture* DM_VPortAgent::getRandomDitherTexture ( RE_Render r)
GUI_RotoView DM_VPortAgent::getRotoViewType ( )
int64 DM_VPortAgent::getSceneVersion ( fpreal  t,
bool  shadow,
bool &  timedep 
)
int DM_VPortAgent::getTransparencyLayers ( RE_RenderContext  r,
const GUI_DisplayOption disp 
)
DM_GeoDetail DM_VPortAgent::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.

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

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.

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 98 of file DM_VPortAgent.h.

DM_GeoDetail DM_VPortAgent::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.

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 380 of file DM_VPortAgent.h.

void DM_VPortAgent::initFogVolume ( RE_Render r,
DM_Viewport *  vport,
GUI_FogMode  fog,
const RE_Texture zdepth 
) const
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 419 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 517 of file DM_VPortAgent.h.

bool DM_VPortAgent::needsOverlayRender ( ) const
inline

Definition at line 382 of file DM_VPortAgent.h.

bool DM_VPortAgent::needsToDrawFloor ( ) const
inline

Definition at line 508 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_RenderContext  r,
int  nsamples 
)
void DM_VPortAgent::prepareStencilRouting ( RE_RenderContext  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_RenderContext  r)
void DM_VPortAgent::renderDecorations ( RE_RenderContext  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_RenderContext  r,
int  x,
int  y 
)

Our floor or construction plane.

void DM_VPortAgent::renderForegroundImage ( RE_RenderContext  r)
GUI_RenderPassFlags DM_VPortAgent::renderGeometry ( RE_RenderContext  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_RenderContext  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,
GR_ThreadingPass  thread_mode = GR_THREADING_SINGLE 
)

Render a single geometry using render mode 'render_type'.

GUI_RenderPassFlags DM_VPortAgent::renderSomeGeometry ( RE_RenderContext  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::renderToVulkanImages ( )
void DM_VPortAgent::renderVulkan ( RE_RenderContext  r,
UT_Vector2i  res 
)
void DM_VPortAgent::requestDraw ( )
inline

Request a deferred redraw.

Definition at line 159 of file DM_VPortAgent.h.

void DM_VPortAgent::resetForNew ( )

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

void DM_VPortAgent::resolveBeautyColorPass ( RE_Render r,
RE_Texture aa_color,
RE_Texture aa_depth,
RE_Texture aa_nml,
bool  xray 
) const
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 433 of file DM_VPortAgent.h.

int DM_VPortAgent::setupBackfaceAndWinding ( RE_Render r,
const GUI_DisplayOption opts 
)
void DM_VPortAgent::setupGeometry ( RE_RenderContext  r)
bool DM_VPortAgent::setupLights ( RE_RenderContext  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_RenderContext  rc)
void DM_VPortAgent::setupViewUniformsGL ( RE_Render r)
static bool DM_VPortAgent::shouldHideAsViewCamObject ( const DM_Viewport &  vport,
const GUI_DetailLook look 
)
static
static bool DM_VPortAgent::shouldHideAsViewCamObject ( const DM_Viewport &  vport,
const OBJ_Node node 
)
static
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,
bool  handle_pick_radius 
)

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_current,
bool  do_xray,
bool  do_guides,
bool  extend_floor,
GR_PickRecord result,
UT_Vector2i result_offset,
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  do_guides,
bool  extend_floor,
GR_PickRecord result,
UT_Vector2i result_offset,
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_RenderContext  r,
int  x,
int  y,
int  pnt_rad,
int  edge_rad,
int  face_rad,
bool  occlusion,
bool  orient_normals,
DM_SnapSelection  snap_sel,
UT_Vector3D p,
UT_Vector3D n,
int64  serial 
)
void DM_VPortAgent::startPerfMonTimer ( RE_RenderContext  r,
RE_GPUTimer timer,
const char *  msg 
) const

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

void DM_VPortAgent::stopPerfMonTimer ( RE_RenderContext  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 539 of file DM_VPortAgent.h.


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