HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUI_DetailLook.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GUI_DetailLook.h ( GUI Library, C++)
7  *
8  * COMMENTS:
9  * A detail look encapsulates all of the data necessary to render a
10  * geometry in a viewport.
11  *
12  * The name is a holdover from when it was derived from UI_Rectangle.
13  */
14 
15 #ifndef __GUI_DetailLook__
16 #define __GUI_DetailLook__
17 
18 #include "GUI_API.h"
19 #include <UT/UT_Assert.h>
20 #include <UT/UT_BoundingBox.h>
21 #include <UT/UT_BoundingSphere.h>
22 #include <UT/UT_Color.h>
23 #include <UT/UT_IntrusivePtr.h>
24 #include <UT/UT_Map.h>
25 #include <UT/UT_Matrix4.h>
26 #include <UT/UT_PerfMonAutoEvent.h>
27 #include <UT/UT_PerfMonTypes.h>
28 #include <UT/UT_String.h>
29 #include <UT/UT_StringHolder.h>
30 #include <UT/UT_UniquePtr.h>
31 #include <UI/UI_Value.h>
32 #include <GEO/GEO_PackedTypes.h>
33 #include <GU/GU_Detail.h>
34 #include <GU/GU_DetailHandle.h>
35 #include <OP/OP_Network.h>
36 #include <RE/RE_RenderContext.h>
37 #include <GR/GR_DisplayOption.h>
38 #include <GR/GR_Light.h>
39 #include <BM/BM_State.h>
40 #include "GUI_DisplayOption.h"
41 #include "GUI_RenderCommon.h"
42 #include "GUI_VisInterface.h"
43 #include "GUI_GroupData.h"
45 
46 #include <utility>
47 
48 class RE_Render;
49 class RE_Light;
50 class RE_Material;
51 class RE_Geometry;
52 class PXL_Raster;
53 class SIM_Data;
54 class SIM_RootData;
55 class GUI_GeoRender;
56 class GU_Detail;
58 class gui_Instance;
59 class gui_GeoInstanceInfo;
61 
63 
65 {
66 public:
67  // This determines if the detail passed to setDetailHandle() is refenced or
68  // copied to a new detail within this look.
70  {
72  REFERENCE_DETAIL
73  };
74 
76  const char *detail_name = NULL,
77  SetDetailMode mode = REFERENCE_DETAIL);
78 
79  void incref()
80  {
81  myRefCount.add(1);
82  }
83  void decref()
84  {
85  myRefCount.add(-1);
86  UT_ASSERT(myRefCount.relaxedLoad() >= 0);
87  if (myRefCount.relaxedLoad() == 0)
88  delete this;
89  }
90 
91  virtual const char *className() const;
92 
93  virtual bool isDopGuide() const { return false; }
94  virtual bool needsOverlayRender() { return false; }
95 
96  const char *getName() const { return myDetailName; }
97  void setName(const char *name);
98 
99  void setInitialized() { myInitializedFlag = true; }
100  bool isInitialized() const { return myInitializedFlag; }
101 
102  // Find out which node our gdp represents, if any:
103  OP_Node *getObject() const; // inline, below
104  OP_Node *getSop() const; // inline, below
105  OP_Node *getShopsRelativeTo() const; // inline, below
106  int getVisualizedNodeId() const; // inline, below
107 
108  // Set to new object/sop pair. returns true if the object or sop was
109  // actually changed.
110  bool setObject(OP_Node *node);
111  bool setSop(OP_Node *node);
112 
113  // New Viewport codepaths
114 
115  // setupForRender() can be called in parallel. setup() methods are expected
116  // to do non-GL work, such as convexing, surfacing, point normal computation
117  virtual GUI_SetupResult setupForRender(
118  const GUI_DisplayOption &opts,
119  bool show_selections,
120  GR_DecorationOverride selmask_dec,
121  GR_DecorationOverride &sel_dec);
122 
123  // This is a stripped down version of setupForRender() when the viewer is
124  // showing more than 1 viewport. The first viewport rendered does a full
125  // setupForRender(), and subsequent viewports do fastSetupForRender(), since
126  // many things do not change.
127  bool fastSetupForRender(GUI_DisplayOption &opts);
128 
129  // updateForRender() is called in serial. It does all the GL updating based
130  // on the precomputed results in setup().
131  void updateForRender(
133  GUI_DisplayOption &opts,
134  GR_LightList *lights,
135  GR_DecorationOverride selmask_dec,
136  const char *view_name,
137  const GR_FrustumList &view_frustums,
138  bool &needs_alpha,
139  bool normal_update,
140  GR_UpdateReason additional_reasons);
141 
142  void updateForRenderInit(
144  GUI_DisplayOption &opts,
145  GR_LightList *lights,
146  GR_DecorationOverride selmask_dec,
147  const char *view_name,
148  const GR_FrustumList &view_frustums,
149  bool &needs_alpha,
150  bool normal_update,
151  GR_UpdateReason additional_reasons);
152 
153 
154  // updatePrimitivesForRender() is called in parallel for VK, serial
155  // for GL. It does updates the GR_Primitive objects based on the
156  // results of precomputed results in setup().
157  void updateForRenderParallel(
159  GUI_DisplayOption &opts,
160  GR_LightList *lights,
161  GR_DecorationOverride selmask_dec,
162  const char *view_name,
163  const GR_FrustumList &view_frustums,
164  bool &needs_alpha,
165  bool normal_update,
166  GR_UpdateReason additional_reasons);
167 
168  virtual void cleanupAfterRender(RE_RenderContext r);
169 
170  // An update is still pending on this look's geoemtry.
171  void updatePending(bool up) { myUpdatePending = up; }
172  bool isUpdatePending() const { return myUpdatePending; }
173 
174  // The serial part of update is finished, threaded update is still pending
175  void threadedUpdatePending(bool up) { myThreadedUpdatePending = up; }
176  bool isThreadedUpdatePending() const { return myThreadedUpdatePending; }
177 
178  // Materials still need updating on this look (textures).
180  { myMatUpdatePending = up; }
182  { return myMatUpdatePending; }
183 
184  // called when this look is no longer displayed, but kept around for a short
185  // time in case it might be displayed in the future
186  void retire();
187  bool isRetired() const { return myRetiredFlag; };
188  void reactivateRetired();
189 
190  // called when temporarily hidden, such as as display flag off.
191  void hide();
192 
193  // appends the contained geometry objects to 'geos'.
194  void getGeometryRenders(
197  int geo_index = -1);
198  void setSingleGeometryRender(OP_Node *node);
199  void resetGeometryRender();
200 
201  // Set selection data to be displayed with this geometry.
202  const UT_Array<GUI_GroupDataHandle> &getSelectData(int geo_index) const;
203  void addSelectData(GUI_GroupDataHandle select_data,
204  int geo_index);
205  void clearSelectData();
206  bool hasSelectData() const;
207 
208  // This method determines whether this detail look should be rendered
209  // for picking. It only checks if it is potentially pickable, but does
210  // not check if it currently being drawn. This only refers to the component
211  // level picking present in SOPs. For object picking, check the isPickable()
212  // flag on the getObject() node.
213  virtual bool isPickable() const;
214 
215  // Allows for custom pick priorities. 0 is normal, <0 low, >0 higher.
216  virtual bool hasPickPriority() const { return false; }
217  virtual bool getPickPriority(const GR_PickRecord &pick,
218  int & /*priority*/) const { return false; }
219 
220  // This method checks if this detail look is even rendered given the
221  // specified display options.
222  virtual bool isVisible(const GUI_DisplayOption &dopt) const;
223 
224  // Returns true if any of the contained details are lit.
225  bool areAnyLit() const
226  { return drawLit() && !isWireframeOnly(); }
227 
228  // returns true if any of the contained details are unlit.
229  bool areAnyUnlit() const { return myHasUnlitGeometry; }
230 
231  // returns true if any of the contained details have transparency.
232  bool hasTransparency() const;
233 
234  // returns true if any of the materials are reflective.
235  bool hasReflectiveMaterial() const;
236 
237  // returns a bitfield of decorations supported by all the GR_Primitives in
238  // this look.
239  int64 getPrimDecorMask() const { return myDecorMask; }
240 
241  // This look will not free the detail, it is up to the user
242  int setDetailHandle(GU_DetailHandle handle);
243  virtual int getNumDetailHandles() const; // inlined below
244  virtual GU_DetailHandle getDetailHandle(int i) const;
245  virtual UT_Matrix4D getDetailXform(int i) const;
246  virtual void appendDOPDataName(UT_String &str, int i,
247  bool descriptive) const;
248  virtual const SIM_Data *getDOPData(int i) const;
249  virtual const SIM_RootData *getDOPRootData(int i) const;
250  virtual bool getIsDetailTempSelected(int i) const;
251  // Get world space position
252  virtual UT_Vector4F getDetailPosition(int i) const;
253  virtual void getDetailName(UT_String &name, int i) const;
254  virtual void getDetailPath(UT_String &path, int i) const;
255  virtual void getDetailDescriptiveName(UT_String &name,
256  int i) const;
257  virtual void getDetailDescriptivePath(UT_String &path,
258  int i) const;
259  void signalNodeSelectionChanged(int i) const;
260 
261  virtual void setTempComponentSelection(
263  virtual GU_SelectionHandle getTempComponentSelection(int i) const;
264 
265  virtual void releaseAllTempComponentSelections();
266 
267  void setEnableDOPDisplay(bool enable)
268  { myEnableDOPDisplay = enable; }
269  bool getEnableDOPDisplay() const
270  { return myEnableDOPDisplay; }
271  void setIsChosenDopnet(bool ischosen)
272  { myIsChosenDopnet = ischosen; }
273  bool getIsChosenDopnet() const
274  { return myIsChosenDopnet; }
275 
276  bool hasUserSelection() const;
277 
278  void useNewLightInterface(bool i)
279  { myUseNewLightInterface=i;}
280  bool useNewLightInterface() const
281  { return myUseNewLightInterface; }
282  void addObjLight(int obj_light_id);
283  bool hasObjLight(int obj_light_id) const;
284  void removeObjLight(int obj_light_id);
285  void clearObjLights();
286  const UT_Set<int> & activeObjLights() const { return myActiveLights; }
287 
288  // v Old light interface
289  void setLightArray(RE_Light *lights[], int nLights = 0);
290 
291  void setGlobalLightArray(const UT_ValArray<RE_Light *> &lts,
292  bool headlight);
293  void removeLight(RE_Light *light);
294  void enableAllLights();
295 
296  int getNumLights() const { return myLights.entries(); }
297  RE_Light *getLight(int i) const { return myLights(i); }
298  const UT_ValArray<RE_Light *> &getLights() const { return myLights; }
300  { return myEnabledLights; }
301  // ^ end old light interface
302 
303  static RE_Light *getGlobalHeadlight(bool for_solaris=false);
304  static RE_Light *getGlobalDomelight();
305 
306  void setUseWireColor(int c);
307  void setWireColor(const UT_Color &clr);
308  void setOutlineColor(const UT_Vector4F &clr);
309 
310  // The id passed in here may be either a node id or a "guide" id set by
311  // the OP3D_GuideList on each piece of guide geometry.
312  virtual UT_Color getWireColor(int id) const
313  { return myWireColor; }
314 
316  { return myOutlineColor; }
317 
318  // Methods to manage the view matrix, the user may use any of the
319  // UT_Matrix4 methods to transform the matrix.
320  void setXform(const UT_Matrix4D &mat)
321  { myXform = mat; myXformDirty = true; }
323  { return isObjSolo() ? (myXform*mySoloXform) :myXform; }
325  { myPivot = pivot; }
326 
327  void setAllowShadingOpenCurves(bool val);
328  bool shadeOpenCurves() const
329  { return myFlag.shade_open_curves; }
330 
331  void setDisplayAsSubdiv(bool val);
332 
333  // Methods to handle the look of the detail drawn.
334  void copyFlagsFrom(const GUI_DetailLookPtr &look);
335 
336  virtual void setDetailDisplay(bool display)
337  {
338  if(!myFlag.overrideDisplay)
339  {
340  if(myFlag.display != display)
341  myDisplaySetDirty= true;
342  myFlag.display = display;
343  }
344  }
345 
346  void setGeometry(bool enable) { myFlag.isGeometry = enable; }
347  void setShowAxes(bool show_axes) { myFlag.showAxes = show_axes; }
348  void setPicking(bool picking)
349  { myFlag.shouldPick = picking; }
350 
351  void setRender(bool render) { myFlag.render = render; }
352  void setTemplate(bool templated)
353  {
354  if(myFlag.templated!=templated)
355  myDisplaySetDirty=true;
356  myFlag.templated = templated;
357  }
358  void setFootprint(bool footprint)
359  { if(myFlag.footprinted!=footprint)
360  myDisplaySetDirty=true;
361  myFlag.footprinted = footprint; }
362  void setHighlight(bool highlight)
363  { myDisplaySetDirty |= (myFlag.highlighted != highlight);
364  myFlag.highlighted = highlight; }
365  void setXray(bool xray)
366  { myFlag.xray = xray; }
367  void setTargetOutput(bool target_output)
368  { if(myFlag.targetoutput !=target_output)
369  myDisplaySetDirty=true;
370  myFlag.targetoutput = target_output; }
371  void setCurrentOutput(bool current_output);
372  void setDrawLit(int onoff); // it's a bit more complicated now
373  void setDrawCookComponentSelection(bool enable);
374  void setSnappable(int onoff) { myFlag.snappable = onoff; }
375  void setSecondarySelection(int onoff);
376  void setObjSelection(bool obj_sel);
377  void setObjCurrent(bool obj_current);
378  void setObjSelectionHint(bool obj_sel_hint);
379  virtual void setObjGhost(bool obj_ghost, OP_Node *for_node);
380  void setObjHidden(bool hide) { myFlag.objHide = hide; }
381  void setObjSolo(bool solo, const UT_Matrix4D *solo_transform=nullptr);
382  void setObjOutput(bool output) { myFlag.objOutput = output; }
383  void setOutputIndex(int index) { myOutputIndex = index; }
384  void setObjTypeMask(unsigned mask) { myObjTypeMask = mask; }
385  void setWireframeOnly(bool wireframe_only)
386  { myFlag.wireframeOnly = wireframe_only; }
387  void setOutline(bool outline)
388  { myFlag.outline = outline; }
390  { myFlag.separateOutline = b; }
391  void setBeautyRender(bool b)
392  { myFlag.beautyRender = b; }
393  void setActiveModel(bool active_model)
394  {
395  if(myFlag.active_model != active_model)
396  {
397  myDisplaySetDirty = true;
398  myFlag.active_model = active_model;
399  }
400  }
401  // Is a DM_Drawable look
402  void setIsDrawableLook(bool dr) { myDrawableFlag = dr; }
403  bool isDrawableLook() const { return myDrawableFlag; }
404 
405  void setIsControlLook(bool c) { myFlag.isControlLook = c; }
406  bool isControlLook() const { return myFlag.isControlLook; }
407 
408  static void setUVObject(OP_Node *object);
409  bool isUVObject() const;
410 
411  void setOnionSkinning(int onion_skin_state);
412  bool isOnionSkinning() const { return myFlag.onion_skin; }
413  bool isOnionSkinDeformation() const { return myFlag.onion_skin_deform;}
414 
415  void onionSkinRender(RE_RenderContext r, GUI_DisplayOption &disp_opt,
416  int nsamples);
417 
418 
419  // Frustum culling is enabled by default.
420  void useFrustumCulling(bool frust_cull)
421  { myFlag.use_frustum_culling = frust_cull; }
422  bool usesFrustumCulling() const
423  { return myFlag.use_frustum_culling && !myFlag.onion_skin
424  && !myLastPointInstanceState &&
425  getUsesGeoRenderInstancing(); }
426 
427  virtual void applyBundleToDisplayedObjects( OP_Bundle *bdl, int object_vis_change_count);
428 
429  // The following methods allow the user to set the display flag while
430  // caching the old value, and resetting it back later.
431  virtual void setDisplaySavingPrevValue(int onoff)
432  {
433  myFlag.prevDisplay = myFlag.display;
434  myFlag.display = onoff;
435  myFlag.overrideDisplay = true;
436  }
437 
439  {
440  myFlag.display = myFlag.prevDisplay;
441  myFlag.overrideDisplay = false;
442  }
443 
444  // this is not the underlying node's display flag state.
445  bool isDetailDisplayOn() const; // inlined below
446  // just the display state alone; use the above for almost everything.
447  bool getDetailDisplay() const { return myFlag.display; }
448 
449  bool getShowAxes() const { return myFlag.showAxes; }
450  bool isGeometry() const { return myFlag.isGeometry; }
451  bool isSymbolicGeometry() const { return myFlag.isSymGeo; }
452  bool isPickingOn() const { return myFlag.shouldPick; }
453  bool isRenderOn() const { return myFlag.render; }
454  bool isTemplated() const { return myFlag.templated; }
455  bool isFootprinted() const { return myFlag.footprinted; }
456  bool isHighlighted() const { return myFlag.highlighted; }
457  virtual bool isXray() const { return myFlag.xray || myFlag.geoxray || myIsXRay; }
458  bool isTargetOutput() const { return myFlag.targetoutput; }
459  bool isCurrentOutput() const { return myFlag.currentoutput; }
460  virtual bool isGuide() const { return false; }
461  virtual bool useWireColor(int node_id) const { return myFlag.usewireclr; }
462  bool drawLit() const { return myFlag.drawLit; }
463  bool displayAsSubdiv() { return myFlag.displayAsSubdiv; }
465  { return myFlag.drawCookComponentSelection; }
466  bool isSnappable() const { return myFlag.snappable; }
467  bool isSecondarySelection() const { return myFlag.secondarySelection; }
468  bool isObjSelection() const { return myFlag.objSelection; }
469  bool isObjCurrent() const { return myFlag.objCurrent; }
470  bool isObjSelectionHint() const { return myFlag.objSelectionHint; }
471  bool isObjGhost() const { return myFlag.objGhost; }
472  bool isObjHidden() const { return myFlag.objHide; }
473  bool isObjSolo() const { return myFlag.objSolo; }
474  bool isObjOutput() const { return myFlag.objOutput; }
475  int getOutputIndex() { return myOutputIndex; }
476  unsigned getObjTypeMask() const { return myObjTypeMask; }
477  bool isWireframeOnly() const { return myFlag.wireframeOnly; }
478  bool isOutline() const { return myFlag.outline; }
479  bool isSeparateOutline() const { return myFlag.separateOutline; }
480  bool isBeautyRender() const { return myFlag.beautyRender; }
481  bool isActiveModel() const { return myFlag.active_model; }
482  bool isPointInstanced() const { return myHasPointInstancing; }
483  bool hasInstanceFile() const { return myHasInstanceFile; }
485  { return myInstanceUseTransform; }
486 
487  bool needsAlphaPass() const
488  { return myFlag.needsAlphaPass; }
489  void setNeedsAlphaPass(bool e)
490  { myFlag.needsAlphaPass = e; }
491 
492  // Flag as a deleted look, so that it can be deleted rather than cached.
493  void setIsDeleted() { myFlag.being_deleted = true; }
494  bool isDeleted() { return myFlag.being_deleted; }
495 
496  // Weak flag that affects only GUI_DetailLook::isVisible()
497  bool forceHidden() const { return myFlag.forceHidden; }
498  void setForceHidden(bool on)
499  {
500  if(myFlag.forceHidden != on)
501  {
502  myDisplaySetDirty= true;
503  myFlag.forceHidden = on;
504  }
505  }
506 
507  // If true, this flag forces GUI_DetailLook to be a UVObject.
508  bool forceAsUVObject() const
509  {
510  return myFlag.forceAsUVObject;
511  }
512  void setForceAsUVObject(bool on)
513  {
514  myFlag.forceAsUVObject = on;
515  }
516 
517  bool castShadows() const { return myFlag.castShadows; }
518  void setCastShadows(bool on)
519  {
520  if(myFlag.castShadows != on)
521  {
522  myDisplaySetDirty= true;
523  myFlag.castShadows = on;
524  }
525  }
526 
527  // Set information about which geometry groups to color.
528  const UT_StringHolder &showGroupMask() const;
529  void setShowGroupMask(const UT_StringHolder &mask);
530  GA_GroupType showGroupType() const;
531  void setShowGroupType(GA_GroupType group_type);
532  int showGroupColorVersion() const;
533  void setShowGroupColorVersion(int version);
534 
535  int getBoundingBox2D(UT_BoundingBox &bbox,
536  const char *name,
537  int use_vertex) const;
538  int getBoundingBox3D(UT_BoundingBox &bbox,
539  const UT_Matrix3R *rot) const;
540 
541  void updateBBox();
542  void invalidateBBox();
543  const UT_BoundingBox &worldBBox();
544 
545  // Viewport type mask (PERSP, TOP, UV, etc)
546  void setViewportMask(unsigned mask)
547  { myViewportMask = mask; }
548  unsigned int getViewportMask() const
549  { return myViewportMask; }
550 
551  // Per-Viewport display. ID is the viewport's unique ID.
552  bool shownInViewport(int viewport_id) const;
553  void showInViewport(int viewport_id);
554  void showInAllViewports();
555 
557  int serial, int serial2, int id)
558  {
559  disp.common().setViewSerialNum(serial, serial2, id);
560  }
561 
562  // return the display set that this object belongs to.
564  {
565  if(!myDisplaySetDirty)
566  return myDisplaySet;
567  return privGetDisplaySetType();
568  }
569 
571  { return privGetDisplaySetType(); }
572 
573 
574  void renderObjectName(RE_RenderContext r,
575  GUI_DisplayOption *dispopt);
576  virtual void renderOrQueueObjectAxes(UT_Vector3FArray &axes,
577  UT_Vector3FArray &pivots);
578  static void renderQueuedObjectAxes(RE_RenderContext r,
579  GUI_DisplayOption *dispopt,
580  const UT_Vector3FArray &axes,
581  const UT_Vector3FArray &pivots);
582 
583  // The global chosen dopnet is set to filter out the drawing of geometry
584  // flagged as originating from this dopnet.
585  static void setGlobalChosenDopnet(OP_Node *dopnet)
586  {
587  if( dopnet )
588  {
590  dopnet->getFullPath(path);
591  ourChosenDopnetPath = path;
592  }
593  else
594  {
595  ourChosenDopnetPath.clear();
596  }
597  }
598  static const char *getGlobalChosenDopnetPath()
599  {
600  return ourChosenDopnetPath.c_str();
601  }
602 
603  static bool matchesChosenDopnetPath(const char *path)
604  {
605  auto len = ourChosenDopnetPath.length();
606  return len
607  && !strncmp(ourChosenDopnetPath, path, len)
608  && (path[len] == ':' || path[len] == '\0');
609  }
610 
611  // Used to assign a temporary ID to the look.
612  void setLookID(int id) { myID = id; }
613  int getLookID() const { return myID; }
614 
615  // Get/Set the object's viewport LOD
616  GEO_ViewportLOD getObjectLOD() const { return myObjectLOD; }
618  { myObjectLOD = lod; }
619 
620  void useObjectMaterials(bool use_obj_mat);
621  bool getAssignedMaterials(UT_Array<OP_Node *> &nodes) const;
622 
623  void setShowMaterials(bool show)
624  { myFlag.showMaterials = show; }
625  bool showMaterials() const
626  { return myFlag.showMaterials; }
627 
628  // Override the default material for this look (otherwise the material is
629  // taken from GUI_MaterialManager::getFactoryMaterial()).
631  { myFactoryMaterialGL = material; }
633  { myFactoryMaterial = material; }
634  RE_MaterialPtr getFactoryMaterialGL(bool lit, bool draw_uv);
636  { return myFactoryMaterialGL || myFactoryMaterial; }
638  { return myFactoryMaterialGL; }
640  { return myFactoryMaterial; }
641 
642  GR_MaterialPtr getFactoryMaterial(bool lit, bool draw_uv);
643  virtual bool isTimeDependent(fpreal t);
644  bool areInstancesTimeDependent(fpreal t);
645  virtual int64 getVersion();
646  void bumpVersion() { myLookVersion++; }
647 
648  /// @{
649  /// Flag the look as time-dependent, even if its source node is not (e.g.
650  /// APEX character scenes). This is reset on each update.
651  bool forceTimeDependent() const { return myFlag.forceTimeDep; }
652  void setForceTimeDependent(bool v) { myFlag.forceTimeDep = v; }
653  /// @}
654 
655  // The name of the actively rendering or updating viewport
656  static void setActiveViewport(const char *name, int id);
657  // viewname (persp1)
658  static const char *getActiveViewport();
659  // viepwort unique id
660  static int getActiveViewportId();
661  // viewname/Material setup
662  static const char *getActiveViewportMatString();
663 
664 
665  static void visibleViewportTypes(bool view_3d, bool view_2d);
666  static bool hasVisible3D();
667  static bool hasVisibleUV();
668 
669  static void visibleUVAttribs(UT_StringArray &attribs);
670  static const UT_StringArray &visibleUVAttribs();
671  static int64 visibleUVAttribSerial();
672 
673  enum { VIEW_3D = 0x1, VIEW_2D = 0x2 }; // for the masks
674  static void visibleViewportBoundaries(
675  bool bound_3d,
676  UT_StringArray &bound_3d_uvs,
677  UT_Array<std::pair<UT_StringHolder,int> > &uvs);
678  static bool hasVisibleBoundaries();
679  static bool visible3DBoundary();
680  static const UT_StringArray &visible3DBoundariesInUV();
681  // uv name, view mask
683  &visibleUVBoundaries();
684 
686  { return myActiveVisualizers; }
688  { return myActiveVisualizers.entries(); }
689  void appendActiveVisualizer(int vis_id)
690  { myActiveVisualizers.append(vis_id);
691  myCollectVisPrimitives.append(0); }
693  {
694  myActiveVisualizers.clear();
695  myCollectVisPrimitives.clear();
696  }
698  { return myCollectVisPrimitives(i); }
700  { myCollectVisPrimitives(i) = prim; }
701 
702  void requireErrorCheck() { myFlag.errorsChecked = false; }
703  void checkForErrors();
704  int64 getNodeErrorID() const { return myOpErrorPosted; }
705 
706  void setRedrawValue(UI_Value *redraw)
707  { myRedrawValue = redraw; }
709  { if(myRedrawValue) myRedrawValue->changed(NULL); }
710 
712  {
713  myFlag.visualizerCheck = true;
714  myFlag.needVisualizerSetup = false;
715  }
716  void needVisualizerSetup(bool setup)
717  {
718  myFlag.visualizerCheck = false;
719  myFlag.needVisualizerSetup = setup;
720  }
721  bool runVisualizerSetup() const
722  {
723  return (myFlag.needVisualizerSetup ||
724  myFlag.visualizerCheck);
725  }
726 
727  virtual const PXL_Raster *getImage(RE_Render *)
728  { return nullptr; }
730  { return myContextMicroNode.get(); }
732  { myContextMicroNode = std::move(micronode); }
733 
734  // Wrapper class to avoid sprintf's when not recording
736  {
737  public:
739  {
740  // Early exit if we're not recording
742  bool record_viewport = perf->isRecordingViewportStats();
743  bool record_memory = perf->isRecordingMemoryStats();
744  if (!record_viewport && !record_memory)
745  return;
746 
747  const char *
749  const char *
750  look_name = look.getName();
751 
752  if (record_viewport)
753  {
754  setTimedEventId_(
756  viewport_name, look_name, UT_PERFMON_3D_VIEWPORT));
757  }
758 
759  if (record_memory)
760  {
761  setMemoryEventId_(
763  viewport_name, look_name, UT_PERFMON_3D_VIEWPORT));
764  }
765  }
766  };
767 
768 protected:
769  ~GUI_DetailLook() override;
770 
771  void cacheNodePtrs();
772 
773  // Multi-object instancing
774  void initInstanceTable();
775  GUI_GeoRender *addInstance(GU_ConstDetailHandle cgdh,
776  const char *name,
777  const UT_Matrix4D &xform,
778  int64 version,
779  int instance_index,
780  int object_id,
781  int inst_object_id,
782  bool is_guide,
783  bool time_dep);
784  void finalizeInstanceTable();
785 
786  using gui_CachedInstGeo = std::pair<GUI_GeoRender *, bool>;
787 
788  bool createObjectInstance(const char *instance_path,
789  int64 base_version,
790  fpreal t,
791  gui_Instance &instance,
792  OBJ_Node *instancer,
794  bool rel_to_sop);
795  void markGeoForRemoval(GUI_GeoRender *gr);
796  void removeDeletedGeos();
797  int64 computeInstanceVersion(const GU_Detail *dtl);
798 
799  // Indicates whether instancing should be implemented using the
800  // GUI_GeoRender instancing capabilities. If false, GUI_GeoRenderShared
801  // objects are used to instance the geometry without true OGL instancing.
802  virtual bool getUsesGeoRenderInstancing() const
803  { return true; }
804 
805  // End multi-object instancing
806  GUI_SetupResult setupAllGeos(const GUI_DisplayOption &disp_opt,
807  bool show_selections,
808  GR_DecorationOverride selmask_dec,
809  GR_DecorationOverride &sel_dec);
810 
811  virtual GUI_GeoRender *getOrCreateGeometryRender(int index);
812 
813  void setXRayOverride(bool xray) { myIsXRay = xray; }
814 
819 
822 
823 private:
824 
825  void generateObjectName(RE_RenderContext r,
826  GUI_DisplayOption *dispopt,
827  UT_String name,
828  int geo_index,
829  GR_DecorFontSize fontsize,
830  RE_Geometry &geo);
831  bool setupPointInstancing(bool show_selections,
832  GR_DecorationOverride selmask_dec,
833  GR_DecorationOverride &select_dec,
834  fpreal instance_fract,
835  int limit);
836  GUI_DisplaySetType privGetDisplaySetType() const;
837 
838  void updateInstancingStatus();
839  GUI_GeoRender * createGeoRender(int index,const char *opt_suffix=NULL);
840  void checkGeoRenders();
841 
842  GUI_GeoRender *checkForDetailCaching(GUI_GeoRender *geo);
843  void freeCachedDetails();
844  void freeDeletedCachedDetails();
845 
846  int getNumOnionSkins() const;
847  const GU_DetailHandle &getOnionSkinDetail(int index) const;
848  GUI_SetupResult processSkins(const GUI_DisplayOption &dopt);
849  void addOnionSkin(OBJ_Node *obj, SOP_Node *sop,
850  fpreal skin_t, fpreal geo_t,
851  bool deforming,
852  bool is_pre_frame);
853  void clearOnionSkins();
854 
855  class GUI_DetailLookFlags
856  {
857  public:
858  GUI_DetailLookFlags()
859  {
860  showAxes = false;
861  render = true;
862  isGeometry = true;
863  isSymGeo = false;
864  shouldPick = true;
865  display = true;
866  templated = false;
867  footprinted = false;
868  highlighted = false;
869  xray = false;
870  geoxray = false;
871  targetoutput = false;
872  currentoutput = false;
873  usewireclr = false;
874  drawLit = true;
875  drawCookComponentSelection = true;
876  needsAlphaPass = false;
877  snappable = true;
878  secondarySelection = false;
879  objSelection = false;
880  objCurrent = false;
881  objSelectionHint = false;
882  objGhost = false;
883  wireframeOnly = false;
884  outline = false;
885  separateOutline = false;
886  beautyRender = true;
887  prevDisplay = true;
888  prevShouldPick = true;
889  overrideDisplay = false;
890  displayAsSubdiv = false;
891  shaders_used = false;
892  active_model = false;
893  being_deleted = false;
894  shade_open_curves = false;
895  onion_skin = false;
896  onion_skin_deform = false;
897  use_frustum_culling = true;
898  errorsChecked = false;
899  visualizerCheck = false;
900  needVisualizerSetup = true;
901  forceHidden = false;
902  forceAsUVObject = false;
903  showMaterials = true;
904  castShadows = true;
905  objHide = false;
906  objSolo = false;
907  objOutput = false;
908  isControlLook = false;
909  forceTimeDep = false;
910  }
911 
912  bool showAxes:1, // draw the axes of the detail
913  isGeometry:1, // renderable
914  isSymGeo:1, // symbolic geo only (no materials)
915  render:1, // render the detail
916  shouldPick:1,
917  display:1, // display the detail
918  templated:1,
919  footprinted:1,
920  highlighted:1, // Node has the highlight flag set
921  xray:1, // display wireframe within other geo
922  geoxray:1, // Xray drawing enabled by an attribute on the geometry.
923  targetoutput:1, // display sop when in view current
924  // mode
925  currentoutput:1, // current sop when in view current
926  // mode and the display flag is on a
927  // different sop.
928  usewireclr:1, // Override default wire color
929  drawLit:1, // In shaded mode, draw shaded
930 drawCookComponentSelection:1, // Draw the GU cook component selection
931  needsAlphaPass:1, // requires a second pass
932  snappable:1, // is the detail snappable
933  secondarySelection:1, // Draw a secondary selection
934  objSelection:1, // object selection
935  objCurrent:1, // object current flag
936  objSelectionHint:1, // hint that object makes good selection
937  objGhost:1, // ghosted object
938  wireframeOnly:1, // draw in wireframe only
939  outline:1, // draw the outline
940  separateOutline:1, // draw the outline separately in a separate pass
941  beautyRender:1, // wether or not to draw in beauty mode
942  prevDisplay:1, // cached value of the previous value of the display flag.
943  prevShouldPick:1, // cached value of the previous value of the pick flag.
944  overrideDisplay:1, // don't allow changes to the display
945  displayAsSubdiv:1, // draw as subdivision.
946  shaders_used:1, // Shaders have been used on the object
947  active_model:1, // Use SOP-level display sets
948  being_deleted:1, // We are in the process of deletion
949  shade_open_curves:1, // Open curves are light-shaded
950  onion_skin:1, // Draw faded images before/after
951  onion_skin_deform:1, // Use deformation onion skinning
952  use_frustum_culling:1, // Frustum culling is allowed
953  errorsChecked:1, // Errors checked after cook
954  visualizerCheck:1, // Check for visualizer setup
955  needVisualizerSetup:1, // Requires visualizer setup
956  forceHidden:1, // Force Hidden flag
957  forceAsUVObject:1, // Force the look to be a uv object.
958  showMaterials:1, // Display look with materials
959  castShadows:1, // The look can cast shadows
960  objSolo:1, // object is solo (hidden obj mode)
961  objHide:1, // Object is temporarily hidden (^)
962  objOutput:1, // output SOP of an Object
963  isControlLook:1, // Look represents a control
964  forceTimeDep:1; // Force look to be time-dependent
965  };
966  GUI_DetailLookFlags myFlag;
967 
968  UT_StringHolder myShowGroupMask;
969  GA_GroupType myShowGroupType;
970  int myShowGroupColorVersion;
971  GU_DetailHandle myDetailHandle;
972  UT_Vector4I myDetailVersion;
973  GUI_GUSelectionProxyHandle myTempComponentSelection;
974  UT_Array<GU_DetailHandle> myOnionSkinDetails;
975 
976  // Override the wireframe display color.
977  UT_Color myWireColor;
978 
979  // Override the outline color.
980  // UT_Vector4F instead of UT_Color since we want RGBA,
981  // and UT_Color only supports RGB.
982  UT_Vector4F myOutlineColor;
983 
984  int myObjectID;
985  int mySopID;
986  int myOutputIndex;
987  unsigned myObjTypeMask;
988  OP_Node *myCachedObject;
989  OP_Node *myCachedSop;
990  UT_String myDetailName;
991  int myID;
992  GEO_ViewportLOD myObjectLOD;
993  bool myIsXRay;
994  bool myIsOnionSkin;
995  UT_String myInstanceObjectRef;
996 
997  bool myUseNewLightInterface;
998  UT_Set<int> myActiveLights;
999 
1000  UT_ValArray<RE_Light *> myLights;
1001  UT_ValArray<RE_Light *> myEnabledLights;
1002 
1003  unsigned int myViewportMask;
1004  bool myEnableDOPDisplay;
1005  bool myIsChosenDopnet;
1006  bool myNullDetailFlag;
1007  bool myRetiredFlag;
1008  bool myInitializedFlag;
1009  bool myCopyDetailFlag;
1010  bool myDrawableFlag;
1011 
1012  mutable bool myDisplaySetDirty;
1013  mutable GUI_DisplaySetType myDisplaySet;
1014 
1015  fpreal myPrevInstanceFract;
1016  int myPrevInstanceLimit;
1017  int myInstanceFractSerial;
1018  int64 myPointInstanceVersion;
1019  int myInstanceXformVersion;
1020  fpreal myInstanceTime;
1021  int myInstanceObjectID;
1022  bool myHasInstancing;
1023  bool myHasPointInstancing;
1024  bool myInstanceUseTransform;
1025  bool myHasTransparentPrimitives;
1026  bool myLastPointInstanceState;
1027  bool myHasInstanceFile;
1028  bool myXformDirty;
1029  bool myDetailDirty;
1030  UT_Matrix4D myXform;
1031  UT_Matrix4D mySoloXform;
1032  UT_Vector3F myPivot;
1033  int64 myOpErrorPosted;
1034  int64 myLookVersion;
1035 
1036  // Variable geometry Instancing
1037  UT_Map<int, gui_GeoInstanceInfo *> myDetailTable;
1038  int myGeoCountId;
1039  const GU_Detail *myTempLastDetail;
1040  GUI_GeoRender *myTempLastGeo;
1041 
1042  // Cached details for cached playback (ie cache SOP)
1043  UT_Map<exint, GUI_GeoRender *> myCachedDetailTable;
1044  bool myCachingDetails;
1045  int64 myCacheSopID;
1046  int64 myCacheSopSerial;
1047 
1048  bool myHasUnlitGeometry;
1049  int64 myDecorMask;
1050  bool myUpdatePending;
1051  bool myMatUpdatePending;
1052  bool myThreadedUpdatePending;
1053  RE_MaterialPtr myFactoryMaterialGL;
1054  GR_MaterialPtr myFactoryMaterial;
1055 
1056  exint myVisUpdateTime; // last visualization-triggered
1057  // update time (visualization
1058  // clock measurement)
1059  exint myVisUpdateVersion; // version at the time of last
1060  // visualization-triggered
1061  // update
1062 
1063  UT_IntArray myActiveVisualizers; // unique ids of visualizers
1064  // currently active for look
1065 
1067  myCollectVisPrimitives;
1068 
1069  UT_Array<GUI_GeoRender *> myGeosToRemove;
1070 
1071  UT_BoundingBox myWorldBBox;
1072  UT_UniquePtr<UT_Set<int> > myViewportVisibility;
1073  UT_UniquePtr<DEP_MicroNode> myContextMicroNode;
1074 
1075  class gui_OnionSkinDetail
1076  {
1077  public:
1078  gui_OnionSkinDetail(const GU_DetailHandle &dh)
1079  : myDetail(dh), myRender(NULL), myUsedFlag(true)
1080  {
1081  myDetail.addPreserveRequest();
1082  }
1083  ~gui_OnionSkinDetail();
1084 
1085  GU_DetailHandle myDetail;
1086  GUI_GeoRender *myRender;
1087  bool myUsedFlag;
1088  };
1089  typedef std::pair<exint,int64> gui_OnionSkinId;
1090  typedef UT_Map<gui_OnionSkinId, gui_OnionSkinDetail *> gui_OnionSkins;
1091  gui_OnionSkins myOnionSkins;
1092 
1093  class gui_OnionSkinLayer
1094  {
1095  public:
1096  gui_OnionSkinLayer(gui_OnionSkinId id, fpreal t, const UT_Matrix4D &mat, bool pre)
1097  : myDetailID(id), myTime(t), myRender(NULL),
1098  myTransform(mat), myIsPreFrame(pre) {}
1099 
1100  gui_OnionSkinId myDetailID;
1101  fpreal myTime;
1102  GUI_GeoRender *myRender;
1103  UT_Matrix4D myTransform;
1104  bool myIsPreFrame;
1105  };
1106  UT_Array<gui_OnionSkinLayer *> myOnionSkinLayers;
1107 
1108  class CachedDetailPos {
1109  public:
1110  CachedDetailPos()
1111  : myPos(0,0,0,1)
1112  , myCacheCount(-1)
1113  , myUniqueId(-1)
1114  {}
1115 
1116  CachedDetailPos(const GU_Detail *detail)
1117  {
1118  myCacheCount = detail ? detail->getMetaCacheCount() : -1;
1119  myUniqueId = detail ? detail->getUniqueId() : -1;
1120  }
1121 
1122  void computePosition(const GU_Detail *detail)
1123  {
1124  if(detail)
1125  {
1126  UT_BoundingBox bbox;
1127  detail->getBBox(bbox, UT_Matrix4R::getIdentityMatrix());
1128 
1129  UT_Vector3 point3 = bbox.center();
1130  myPos = UT_Vector4F(point3.x(), point3.y(), point3.z(), 1.0);
1131  }
1132  }
1133 
1134  bool operator==(const CachedDetailPos& p)
1135  {
1136  return myCacheCount == p.myCacheCount
1137  && myUniqueId == p.myUniqueId;
1138  }
1139 
1140  const UT_Vector4F& position() { return myPos; }
1141 
1142  private:
1143  UT_Vector4F myPos;
1144  int myCacheCount;
1145  int myUniqueId;
1146  };
1147  // mutable because these are cached positions
1148  mutable UT_ValArray<CachedDetailPos> myDetailPositions;
1149 
1150  static UT_StringHolder ourChosenDopnetPath;
1151 
1152  UI_Value *myRedrawValue;
1153  SYS_AtomicInt32 myRefCount;
1154 };
1155 
1156 static inline void intrusive_ptr_add_ref(GUI_DetailLook *d) { d->incref(); }
1157 static inline void intrusive_ptr_release(GUI_DetailLook *d) { d->decref(); }
1158 
1159 inline int
1161 {
1162  return myNullDetailFlag ? 0 : 1;
1163 }
1164 
1165 inline OP_Node *
1167 {
1168  if(myCachedObject)
1169  return myCachedObject;
1170  if(myObjectID != OP_INVALID_NODE_ID)
1171  return OP_Node::lookupNode(myObjectID);
1172  return NULL;
1173 }
1174 
1175 inline OP_Node *
1177 {
1178  if(myCachedSop)
1179  return myCachedSop;
1180  if(mySopID != OP_INVALID_NODE_ID)
1181  return OP_Node::lookupNode(mySopID);
1182  return NULL;
1183 }
1184 
1185 inline OP_Node *
1187 {
1188  OP_Node *node = getObject();
1189  if(!node)
1190  {
1191  node = getSop();
1192  if(node)
1193  return node->getCreator();
1194  }
1195  return node;
1196 }
1197 
1198 inline int
1200 {
1202  return mySopID;
1203  else
1204  return myObjectID;
1205 }
1206 
1207 inline bool
1209 {
1210  if((myFlag.display || myFlag.objOutput) && !myFlag.objHide)
1211  {
1212 #if UT_ASSERT_LEVEL > 2
1213  if((myObjectID == OP_INVALID_NODE_ID || OP_Node::lookupNode(myObjectID))
1214  && (mySopID == OP_INVALID_NODE_ID || OP_Node::lookupNode(mySopID)))
1215  return true;
1216  UT_ASSERT_MSG(!"Stale GUI_DetailLook: ", myDetailName);
1217 #else
1218  return true;
1219 #endif
1220  }
1221  return false;
1222 }
1223 
1224 inline void
1225 GUI_DetailLook::setObjSolo(bool solo, const UT_Matrix4D *solo_transform)
1226 {
1227  if(myFlag.objSolo != solo)
1228  {
1229  myFlag.objSolo = solo;
1230  if(solo && solo_transform)
1231  mySoloXform = *solo_transform;
1232  else
1233  mySoloXform.identity();
1234  myXformDirty = true;
1235  }
1236 }
1237 
1238 
1239 // UTformat support.
1240 GUI_API size_t format(char *buffer, size_t buffer_size, const GUI_DetailLook &v);
1241 
1242 
1243 #endif
static const char * getActiveViewportMatString()
static bool matchesChosenDopnetPath(const char *path)
virtual bool getUsesGeoRenderInstancing() const
int64 getNodeErrorID() const
void setTemplate(bool templated)
void setXray(bool xray)
virtual const PXL_Raster * getImage(RE_Render *)
const UT_ValArray< RE_Light * > & getLights() const
void setPivot(const UT_Vector3F &pivot)
bool usesFrustumCulling() const
void materialUpdatePending(bool up)
bool areAnyLit() const
OP_Node * getObject() const
bool isControlLook() const
bool getDetailDisplay() const
int getVersion(int version)
Definition: ImfVersion.h:99
bool castShadows() const
bool isSeparateOutline() const
void threadedUpdatePending(bool up)
void setForceAsUVObject(bool on)
bool getIsChosenDopnet() const
void useNewLightInterface(bool i)
Unsorted map container.
Definition: UT_Map.h:107
bool isTemplated() const
void setNeedsAlphaPass(bool e)
void setCollectVisPrimitive(int i, GR_Primitive *prim)
UT_API UT_Performance * UTgetPerformance(bool create=true)
GR_DecorationOverride
Definition: GR_Defines.h:219
int numActiveVisualizers() const
void setSnappable(int onoff)
bool getBBox(UT_BoundingBox *bbox, const GA_PrimitiveGroup *g=nullptr) const
UT_SharedPtr< GUI_GUSelectionProxy > GUI_GUSelectionProxyHandle
void setShowMaterials(bool show)
bool hasFactoryMaterialOverride()
bool hasInstanceFile() const
bool useInstancerObjTransform() const
const GLdouble * v
Definition: glcorearb.h:837
void setXform(const UT_Matrix4D &mat)
void setFactoryMaterialOverride(GR_MaterialPtr material)
bool isPointInstanced() const
void setObjTypeMask(unsigned mask)
bool forceAsUVObject() const
void setFootprint(bool footprint)
void setOutline(bool outline)
bool isDetailDisplayOn() const
bool drawLit() const
bool isSymbolicGeometry() const
UT_IntrusivePtr< GUI_DetailLook > GUI_DetailLookPtr
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
GA_API const UT_StringHolder rot
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
Definition: RE_Geometry.h:53
void setRedrawValue(UI_Value *redraw)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setViewSerialNum(int num, int num_2d, int id)
void setForceHidden(bool on)
int startTimedViewportDrawEvent(const char *viewport_name, const char *draw_event_name, UT_PerfMonViewportType viewport_type, bool is_gpu_draw=false)
bool isInitialized() const
bool isFootprinted() const
bool isObjCurrent() const
bool isDrawableLook() const
UT_Vector4F getOutlineColor() const
bool displayAsSubdiv()
virtual bool needsOverlayRender()
#define OP_INVALID_NODE_ID
Definition: OP_ItemId.h:24
OP_Network * getCreator() const
void requireErrorCheck()
bool isObjHidden() const
bool isWireframeOnly() const
GUI_DisplaySetType
Context specific display options for geometry states.
const UT_Set< int > & activeObjLights() const
Temporary container for either a RV_Render and an RE_Render.
int getVisualizedNodeId() const
void needVisualizerSetup(bool setup)
bool forceTimeDependent() const
bool isRecordingMemoryStats() const
Return true if Houdini is recording memory stats.
virtual void setDisplaySavingPrevValue(int onoff)
virtual bool useWireColor(int node_id) const
IFDmantra you can see code vm_image_mplay_direction endcode When SOHO starts a render
Definition: HDK_Image.dox:266
bool isSnappable() const
void setHighlight(bool highlight)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
void setIsDrawableLook(bool dr)
void setLookID(int id)
bool getEnableDOPDisplay() const
void setViewportMask(unsigned mask)
#define UT_ASSERT_MSG(ZZ,...)
Definition: UT_Assert.h:159
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
UT_Matrix4D getXform() const
bool isThreadedUpdatePending() const
RE_MaterialPtr getFactoryMaterialOverrideGL()
bool isObjSolo() const
bool getShowAxes() const
const char * getFullPath(UT_String &str) const
Definition: PRM_ParmOwner.h:52
void setPicking(bool picking)
virtual bool isGuide() const
bool isRecordingViewportStats() const
Return true if Houdini is recording viewport draw stats.
OP_Node * getSop() const
Definition: core.h:760
void setGeometry(bool enable)
UT_Array< GUI_GeoRender * > myStashedGeoRenderShared
int getLookID() const
bool isBeautyRender() const
bool isSecondarySelection() const
void setCastShadows(bool on)
bool isObjGhost() const
UT_Vector3T< T > center() const
bool showMaterials() const
#define GUI_API
Definition: GUI_API.h:10
void setIsControlLook(bool c)
void setObjSolo(bool solo, const UT_Matrix4D *solo_transform=nullptr)
bool isUpdatePending() const
const GR_CommonDispOption & common() const
static const UT_Matrix4T< fpreal > & getIdentityMatrix()
bool isMaterialUpdatePending() const
unsigned getObjTypeMask() const
void setObjectLOD(GEO_ViewportLOD lod)
GR_MaterialPtr getFactoryMaterialOverride()
virtual bool isDopGuide() const
UT_Array< GUI_SetupResult > myOnionSkinSetupResults
void setRender(bool render)
GLint GLuint mask
Definition: glcorearb.h:124
RE_Light * getLight(int i) const
GR_DecorFontSize
Definition: GR_Defines.h:200
bool isHighlighted() const
virtual void resetOverrideUsingSavedValue()
GR_UpdateReason
Definition: GR_Defines.h:311
long long int64
Definition: SYS_Types.h:116
GUI_SetupResult
virtual bool hasPickPriority() const
GLuint id
Definition: glcorearb.h:655
void identity()
Set the matrix to identity.
Definition: UT_Matrix4.h:1128
virtual UT_Color getWireColor(int id) const
bool isOnionSkinning() const
GLuint const GLchar * name
Definition: glcorearb.h:786
void setContextMicroNode(UT_UniquePtr< DEP_MicroNode > &&micronode)
virtual int getNumDetailHandles() const
bool isPickingOn() const
void setBeautyRender(bool b)
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
void setTargetOutput(bool target_output)
bool isRenderOn() const
UT_Map< int, UT_Array< GUI_GroupDataHandle > > mySelectData
bool isGeometry() const
UT_SharedPtr< GU_Selection > GU_SelectionHandle
void setEnableDOPDisplay(bool enable)
bool isActiveModel() const
GLdouble t
Definition: glad.h:2397
exint getUniqueId() const
Definition: GA_Detail.h:117
GLenum mode
Definition: glcorearb.h:99
GT_API const UT_StringHolder version
void setSeparateOutline(bool b)
virtual bool isXray() const
DEP_MicroNode * contextMicroNode()
GUI_DisplaySetType getDisplaySetType() const
UT_Array< GUI_GeoRender * > myGeoRender
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
static void setGlobalViewSerial(GUI_DisplayOption &disp, int serial, int serial2, int id)
GR_Primitive * getCollectVisPrimitive(int i)
bool isRetired() const
bool isOutline() const
virtual void setDetailDisplay(bool display)
unsigned int getViewportMask() const
bool useNewLightInterface() const
void setActiveModel(bool active_model)
OP_Node * getShopsRelativeTo() const
UT_Vector4T< fpreal32 > UT_Vector4F
GEO_ViewportLOD
void clearActiveVisualizers()
GA_API const UT_StringHolder up
fpreal64 fpreal
Definition: SYS_Types.h:277
bool needsAlphaPass() const
GEO_ViewportLOD getObjectLOD() const
GUI_API size_t format(char *buffer, size_t buffer_size, const GUI_DetailLook &v)
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition: GA_Types.h:161
GLuint index
Definition: glcorearb.h:786
bool isTargetOutput() const
SIM_API const UT_StringHolder position
void setXRayOverride(bool xray)
GLuint GLfloat * val
Definition: glcorearb.h:1608
bool isObjSelectionHint() const
void setFactoryMaterialOverride(RE_MaterialPtr material)
GR_LightingPass
Definition: GR_Defines.h:146
int64 getMetaCacheCount() const
Definition: GA_Detail.h:2378
int64 getPrimDecorMask() const
void resetVisualizerCheck()
GA_API const UT_StringHolder pivot
void setOutputIndex(int index)
const UT_ValArray< RE_Light * > & getEnabledLights() const
void setInitialized()
bool drawCookComponentSelection() const
void updatePending(bool up)
static OP_Node * lookupNode(int unique_id, bool include_proxy=false)
Definition: OP_Node.h:707
void setIsChosenDopnet(bool ischosen)
bool runVisualizerSetup() const
static void setGlobalChosenDopnet(OP_Node *dopnet)
void useFrustumCulling(bool frust_cull)
bool forceHidden() const
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
std::pair< GUI_GeoRender *, bool > gui_CachedInstGeo
bool isOnionSkinDeformation() const
const UT_IntArray & getActiveVisualizers() const
GLboolean r
Definition: glcorearb.h:1222
bool areAnyUnlit() const
const char * getName() const
PerfMonAutoMatEvent(const GUI_DetailLook &look)
UT_Array< GUI_GeoRender * > myOnionSkinRenders
bool isObjOutput() const
bool isObjSelection() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static const char * getGlobalChosenDopnetPath()
void setWireframeOnly(bool wireframe_only)
virtual bool getPickPriority(const GR_PickRecord &pick, int &) const
void setForceTimeDependent(bool v)
void setShowAxes(bool show_axes)
void setObjHidden(bool hide)
bool isCurrentOutput() const
GLint lod
Definition: glcorearb.h:2765
UT_Array< GUI_SetupResult > mySetupResults
int getNumLights() const
void appendActiveVisualizer(int vis_id)
GUI_DisplaySetType updateDisplaySetType()
void setObjOutput(bool output)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
int startMemoryViewportDrawEvent(const char *viewport_name, const char *draw_event_name, UT_PerfMonViewportType viewport_type, bool is_gpu_draw=false)
bool shadeOpenCurves() const