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  virtual void cleanupAfterRender(RE_RenderContext r);
143 
144  // An update is still pending on this look's geoemtry.
145  void updatePending(bool up) { myUpdatePending = up; }
146  bool isUpdatePending() const { return myUpdatePending; }
147 
148  // Materials still need updating on this look (textures).
150  { myMatUpdatePending = up; }
152  { return myMatUpdatePending; }
153 
154  // called when this look is no longer displayed, but kept around for a short
155  // time in case it might be displayed in the future
156  void retire();
157  bool isRetired() const { return myRetiredFlag; };
158  void reactivateRetired();
159 
160  // called when temporarily hidden, such as as display flag off.
161  void hide();
162 
163  // appends the contained geometry objects to 'geos'.
164  void getGeometryRenders(
167  int geo_index = -1);
168  void setSingleGeometryRender(OP_Node *node);
169  void resetGeometryRender();
170 
171  // Set selection data to be displayed with this geometry.
172  const UT_Array<GUI_GroupDataHandle> &getSelectData(int geo_index) const;
173  void addSelectData(GUI_GroupDataHandle select_data,
174  int geo_index);
175  void clearSelectData();
176  bool hasSelectData() const;
177 
178  // This method determines whether this detail look should be rendered
179  // for picking. It only checks if it is potentially pickable, but does
180  // not check if it currently being drawn. This only refers to the component
181  // level picking present in SOPs. For object picking, check the isPickable()
182  // flag on the getObject() node.
183  virtual bool isPickable() const;
184 
185  // Allows for custom pick priorities. 0 is normal, <0 low, >0 higher.
186  virtual bool hasPickPriority() const { return false; }
187  virtual bool getPickPriority(const GR_PickRecord &pick,
188  int & /*priority*/) const { return false; }
189 
190  // This method checks if this detail look is even rendered given the
191  // specified display options.
192  virtual bool isVisible(const GUI_DisplayOption &dopt) const;
193 
194  // Returns true if any of the contained details are lit.
195  bool areAnyLit() const
196  { return drawLit() && !isWireframeOnly(); }
197 
198  // returns true if any of the contained details are unlit.
199  bool areAnyUnlit() const { return myHasUnlitGeometry; }
200 
201  // returns true if any of the contained details have transparency.
202  bool hasTransparency() const;
203 
204  // returns true if any of the materials are reflective.
205  bool hasReflectiveMaterial() const;
206 
207  // returns a bitfield of decorations supported by all the GR_Primitives in
208  // this look.
209  int64 getPrimDecorMask() const { return myDecorMask; }
210 
211  // This look will not free the detail, it is up to the user
212  int setDetailHandle(GU_DetailHandle handle);
213  virtual int getNumDetailHandles() const; // inlined below
214  virtual GU_DetailHandle getDetailHandle(int i) const;
215  virtual UT_Matrix4D getDetailXform(int i) const;
216  virtual void appendDOPDataName(UT_String &str, int i,
217  bool descriptive) const;
218  virtual const SIM_Data *getDOPData(int i) const;
219  virtual const SIM_RootData *getDOPRootData(int i) const;
220  virtual bool getIsDetailTempSelected(int i) const;
221  // Get world space position
222  virtual UT_Vector4F getDetailPosition(int i) const;
223  virtual void getDetailName(UT_String &name, int i) const;
224  virtual void getDetailPath(UT_String &path, int i) const;
225  virtual void getDetailDescriptiveName(UT_String &name,
226  int i) const;
227  virtual void getDetailDescriptivePath(UT_String &path,
228  int i) const;
229  void signalNodeSelectionChanged(int i) const;
230 
231  virtual void setTempComponentSelection(
233  virtual GU_SelectionHandle getTempComponentSelection(int i) const;
234 
235  virtual void releaseAllTempComponentSelections();
236 
237  void setEnableDOPDisplay(bool enable)
238  { myEnableDOPDisplay = enable; }
239  bool getEnableDOPDisplay() const
240  { return myEnableDOPDisplay; }
241  void setIsChosenDopnet(bool ischosen)
242  { myIsChosenDopnet = ischosen; }
243  bool getIsChosenDopnet() const
244  { return myIsChosenDopnet; }
245 
246  bool hasUserSelection() const;
247 
248  void useNewLightInterface(bool i)
249  { myUseNewLightInterface=i;}
250  bool useNewLightInterface() const
251  { return myUseNewLightInterface; }
252  void addObjLight(int obj_light_id);
253  bool hasObjLight(int obj_light_id) const;
254  void removeObjLight(int obj_light_id);
255  void clearObjLights();
256  const UT_Set<int> & activeObjLights() const { return myActiveLights; }
257 
258  // v Old light interface
259  void setLightArray(RE_Light *lights[], int nLights = 0);
260 
261  void setGlobalLightArray(const UT_ValArray<RE_Light *> &lts,
262  bool headlight);
263  void removeLight(RE_Light *light);
264  void enableAllLights();
265 
266  int getNumLights() const { return myLights.entries(); }
267  RE_Light *getLight(int i) const { return myLights(i); }
268  const UT_ValArray<RE_Light *> &getLights() const { return myLights; }
270  { return myEnabledLights; }
271  // ^ end old light interface
272 
273  static RE_Light *getGlobalHeadlight();
274  static RE_Light *getGlobalDomelight();
275 
276  void setUseWireColor(int c);
277  void setWireColor(const UT_Color &clr);
278  void setOutlineColor(const UT_Vector4F &clr);
279 
280  // The id passed in here may be either a node id or a "guide" id set by
281  // the OP3D_GuideList on each piece of guide geometry.
282  virtual UT_Color getWireColor(int id) const
283  { return myWireColor; }
284 
286  { return myOutlineColor; }
287 
288  // Methods to manage the view matrix, the user may use any of the
289  // UT_Matrix4 methods to transform the matrix.
290  void setXform(const UT_Matrix4D &mat)
291  { myXform = mat; myXformDirty = true; }
293  { return isObjSolo() ? (myXform*mySoloXform) :myXform; }
295  { myPivot = pivot; }
296 
297  void setAllowShadingOpenCurves(bool val);
298  bool shadeOpenCurves() const
299  { return myFlag.shade_open_curves; }
300 
301  void setDisplayAsSubdiv(bool val);
302 
303  // Methods to handle the look of the detail drawn.
304  void copyFlagsFrom(const GUI_DetailLookPtr &look);
305 
306  virtual void setDetailDisplay(bool display)
307  {
308  if(!myFlag.overrideDisplay)
309  {
310  if(myFlag.display != display)
311  myDisplaySetDirty= true;
312  myFlag.display = display;
313  }
314  }
315 
316  void setGeometry(bool enable) { myFlag.isGeometry = enable; }
317  void setShowAxes(bool show_axes) { myFlag.showAxes = show_axes; }
318  void setPicking(bool picking)
319  { myFlag.shouldPick = picking; }
320 
321  void setRender(bool render) { myFlag.render = render; }
322  void setTemplate(bool templated)
323  {
324  if(myFlag.templated!=templated)
325  myDisplaySetDirty=true;
326  myFlag.templated = templated;
327  }
328  void setFootprint(bool footprint)
329  { if(myFlag.footprinted!=footprint)
330  myDisplaySetDirty=true;
331  myFlag.footprinted = footprint; }
332  void setHighlight(bool highlight)
333  { myDisplaySetDirty |= (myFlag.highlighted != highlight);
334  myFlag.highlighted = highlight; }
335  void setXray(bool xray)
336  { myFlag.xray = xray; }
337  void setTargetOutput(bool target_output)
338  { if(myFlag.targetoutput !=target_output)
339  myDisplaySetDirty=true;
340  myFlag.targetoutput = target_output; }
341  void setCurrentOutput(bool current_output);
342  void setDrawLit(int onoff); // it's a bit more complicated now
343  void setDrawCookComponentSelection(bool enable);
344  void setSnappable(int onoff) { myFlag.snappable = onoff; }
345  void setSecondarySelection(int onoff);
346  void setObjSelection(bool obj_sel);
347  void setObjCurrent(bool obj_current);
348  void setObjSelectionHint(bool obj_sel_hint);
349  virtual void setObjGhost(bool obj_ghost, OP_Node *for_node);
350  void setObjHidden(bool hide) { myFlag.objHide = hide; }
351  void setObjSolo(bool solo, const UT_Matrix4D *solo_transform=nullptr);
352  void setObjOutput(bool output) { myFlag.objOutput = output; }
353  void setOutputIndex(int index) { myOutputIndex = index; }
354  void setObjTypeMask(unsigned mask) { myObjTypeMask = mask; }
355  void setWireframeOnly(bool wireframe_only)
356  { myFlag.wireframeOnly = wireframe_only; }
357  void setOutline(bool outline)
358  { myFlag.outline = outline; }
360  { myFlag.separateOutline = b; }
361  void setBeautyRender(bool b)
362  { myFlag.beautyRender = b; }
363  void setActiveModel(bool active_model)
364  {
365  if(myFlag.active_model != active_model)
366  {
367  myDisplaySetDirty = true;
368  myFlag.active_model = active_model;
369  }
370  }
371  // Is a DM_Drawable look
372  void setIsDrawableLook(bool dr) { myDrawableFlag = dr; }
373  bool isDrawableLook() const { return myDrawableFlag; }
374 
375  static void setUVObject(OP_Node *object);
376  bool isUVObject() const;
377 
378  void setOnionSkinning(int onion_skin_state);
379  bool isOnionSkinning() const { return myFlag.onion_skin; }
380  bool isOnionSkinDeformation() const { return myFlag.onion_skin_deform;}
381 
382  void onionSkinRender(RE_RenderContext r, GUI_DisplayOption &disp_opt,
383  int nsamples);
384 
385 
386  // Frustum culling is enabled by default.
387  void useFrustumCulling(bool frust_cull)
388  { myFlag.use_frustum_culling = frust_cull; }
389  bool usesFrustumCulling() const
390  { return myFlag.use_frustum_culling && !myFlag.onion_skin
391  && !myLastPointInstanceState &&
392  getUsesGeoRenderInstancing(); }
393 
394  virtual void applyBundleToDisplayedObjects( OP_Bundle *bdl, int object_vis_change_count);
395 
396  // The following methods allow the user to set the display flag while
397  // caching the old value, and resetting it back later.
398  virtual void setDisplaySavingPrevValue(int onoff)
399  {
400  myFlag.prevDisplay = myFlag.display;
401  myFlag.display = onoff;
402  myFlag.overrideDisplay = true;
403  }
404 
406  {
407  myFlag.display = myFlag.prevDisplay;
408  myFlag.overrideDisplay = false;
409  }
410 
411  // this is not the underlying node's display flag state.
412  bool isDetailDisplayOn() const; // inlined below
413  // just the display state alone; use the above for almost everything.
414  bool getDetailDisplay() const { return myFlag.display; }
415 
416  bool getShowAxes() const { return myFlag.showAxes; }
417  bool isGeometry() const { return myFlag.isGeometry; }
418  bool isSymbolicGeometry() const { return myFlag.isSymGeo; }
419  bool isPickingOn() const { return myFlag.shouldPick; }
420  bool isRenderOn() const { return myFlag.render; }
421  bool isTemplated() const { return myFlag.templated; }
422  bool isFootprinted() const { return myFlag.footprinted; }
423  bool isHighlighted() const { return myFlag.highlighted; }
424  virtual bool isXray() const { return myFlag.xray || myFlag.geoxray || myIsXRay; }
425  bool isTargetOutput() const { return myFlag.targetoutput; }
426  bool isCurrentOutput() const { return myFlag.currentoutput; }
427  virtual bool isGuide() const { return false; }
428  virtual bool useWireColor(int node_id) const { return myFlag.usewireclr; }
429  bool drawLit() const { return myFlag.drawLit; }
430  bool displayAsSubdiv() { return myFlag.displayAsSubdiv; }
432  { return myFlag.drawCookComponentSelection; }
433  bool isSnappable() const { return myFlag.snappable; }
434  bool isSecondarySelection() const { return myFlag.secondarySelection; }
435  bool isObjSelection() const { return myFlag.objSelection; }
436  bool isObjCurrent() const { return myFlag.objCurrent; }
437  bool isObjSelectionHint() const { return myFlag.objSelectionHint; }
438  bool isObjGhost() const { return myFlag.objGhost; }
439  bool isObjHidden() const { return myFlag.objHide; }
440  bool isObjSolo() const { return myFlag.objSolo; }
441  bool isObjOutput() const { return myFlag.objOutput; }
442  int getOutputIndex() { return myOutputIndex; }
443  unsigned getObjTypeMask() const { return myObjTypeMask; }
444  bool isWireframeOnly() const { return myFlag.wireframeOnly; }
445  bool isOutline() const { return myFlag.outline; }
446  bool isSeparateOutline() const { return myFlag.separateOutline; }
447  bool isBeautyRender() const { return myFlag.beautyRender; }
448  bool isActiveModel() const { return myFlag.active_model; }
449  bool isPointInstanced() const { return myHasPointInstancing; }
450  bool hasInstanceFile() const { return myHasInstanceFile; }
452  { return myInstanceUseTransform; }
453 
454  bool needsAlphaPass() const
455  { return myFlag.needsAlphaPass; }
456  void setNeedsAlphaPass(bool e)
457  { myFlag.needsAlphaPass = e; }
458 
459  // Flag as a deleted look, so that it can be deleted rather than cached.
460  void setIsDeleted() { myFlag.being_deleted = true; }
461  bool isDeleted() { return myFlag.being_deleted; }
462 
463  // Weak flag that affects only GUI_DetailLook::isVisible()
464  bool forceHidden() const { return myFlag.forceHidden; }
465  void setForceHidden(bool on)
466  {
467  if(myFlag.forceHidden != on)
468  {
469  myDisplaySetDirty= true;
470  myFlag.forceHidden = on;
471  }
472  }
473 
474  // If true, this flag forces GUI_DetailLook to be a UVObject.
475  bool forceAsUVObject() const
476  {
477  return myFlag.forceAsUVObject;
478  }
479  void setForceAsUVObject(bool on)
480  {
481  myFlag.forceAsUVObject = on;
482  }
483 
484  bool castShadows() const { return myFlag.castShadows; }
485  void setCastShadows(bool on)
486  {
487  if(myFlag.castShadows != on)
488  {
489  myDisplaySetDirty= true;
490  myFlag.castShadows = on;
491  }
492  }
493 
494  // Set information about which geometry groups to color.
495  const UT_StringHolder &showGroupMask() const;
496  void setShowGroupMask(const UT_StringHolder &mask);
497  GA_GroupType showGroupType() const;
498  void setShowGroupType(GA_GroupType group_type);
499  int showGroupColorVersion() const;
500  void setShowGroupColorVersion(int version);
501 
502  int getBoundingBox2D(UT_BoundingBox &bbox,
503  const char *name,
504  int use_vertex) const;
505  int getBoundingBox3D(UT_BoundingBox &bbox,
506  const UT_Matrix3R *rot) const;
507 
508  void updateBBox();
509  void invalidateBBox();
510  const UT_BoundingBox &worldBBox();
511 
512  // Viewport type mask (PERSP, TOP, UV, etc)
513  void setViewportMask(unsigned mask)
514  { myViewportMask = mask; }
515  unsigned int getViewportMask() const
516  { return myViewportMask; }
517 
518  // Per-Viewport display. ID is the viewport's unique ID.
519  bool shownInViewport(int viewport_id) const;
520  void showInViewport(int viewport_id);
521  void showInAllViewports();
522 
524  int serial, int serial2, int id)
525  {
526  disp.common().setViewSerialNum(serial, serial2, id);
527  }
528 
529  // return the display set that this object belongs to.
531  {
532  if(!myDisplaySetDirty)
533  return myDisplaySet;
534  return privGetDisplaySetType();
535  }
536 
538  { return privGetDisplaySetType(); }
539 
540 
541  void renderObjectName(RE_RenderContext r,
542  GUI_DisplayOption *dispopt);
543  virtual void renderOrQueueObjectAxes(UT_Vector3FArray &axes,
544  UT_Vector3FArray &pivots);
545  static void renderQueuedObjectAxes(RE_RenderContext r,
546  GUI_DisplayOption *dispopt,
547  const UT_Vector3FArray &axes,
548  const UT_Vector3FArray &pivots);
549 
550  // The global chosen dopnet is set to filter out the drawing of geometry
551  // flagged as originating from this dopnet.
552  static void setGlobalChosenDopnet(OP_Node *dopnet)
553  {
554  if( dopnet )
555  {
557  dopnet->getFullPath(path);
558  ourChosenDopnetPath = path;
559  }
560  else
561  {
562  ourChosenDopnetPath.clear();
563  }
564  }
565  static const char *getGlobalChosenDopnetPath()
566  {
567  return ourChosenDopnetPath.c_str();
568  }
569 
570  static bool matchesChosenDopnetPath(const char *path)
571  {
572  auto len = ourChosenDopnetPath.length();
573  return len
574  && !strncmp(ourChosenDopnetPath, path, len)
575  && (path[len] == ':' || path[len] == '\0');
576  }
577 
578  // Used to assign a temporary ID to the look.
579  void setLookID(int id) { myID = id; }
580  int getLookID() const { return myID; }
581 
582  // Get/Set the object's viewport LOD
583  GEO_ViewportLOD getObjectLOD() const { return myObjectLOD; }
585  { myObjectLOD = lod; }
586 
587  void useObjectMaterials(bool use_obj_mat);
588  bool getAssignedMaterials(UT_Array<OP_Node *> &nodes) const;
589 
590  void setShowMaterials(bool show)
591  { myFlag.showMaterials = show; }
592  bool showMaterials() const
593  { return myFlag.showMaterials; }
594 
595  // Override the default material for this look (otherwise the material is
596  // taken from GUI_MaterialManager::getFactoryMaterial()).
598  { myFactoryMaterial = material; }
599  RE_MaterialPtr getFactoryMaterialGL(bool lit, bool draw_uv);
601  { return myFactoryMaterial!=nullptr; }
602 
603  GR_MaterialPtr getFactoryMaterial(bool lit, bool draw_uv);
604  virtual bool isTimeDependent(fpreal t);
605  bool areInstancesTimeDependent(fpreal t);
606  virtual int64 getVersion();
607  void bumpVersion() { myLookVersion++; }
608 
609  // The name of the actively rendering or updating viewport
610  static void setActiveViewport(const char *name, int id);
611  // viewname (persp1)
612  static const char *getActiveViewport();
613  // viepwort unique id
614  static int getActiveViewportId();
615  // viewname/Material setup
616  static const char *getActiveViewportMatString();
617 
618 
619  static void visibleViewportTypes(bool view_3d, bool view_2d);
620  static bool hasVisible3D();
621  static bool hasVisibleUV();
622 
623  static void visibleUVAttribs(UT_StringArray &attribs);
624  static const UT_StringArray &visibleUVAttribs();
625  static int64 visibleUVAttribSerial();
626 
627  enum { VIEW_3D = 0x1, VIEW_2D = 0x2 }; // for the masks
628  static void visibleViewportBoundaries(
629  bool bound_3d,
630  UT_StringArray &bound_3d_uvs,
631  UT_Array<std::pair<UT_StringHolder,int> > &uvs);
632  static bool hasVisibleBoundaries();
633  static bool visible3DBoundary();
634  static const UT_StringArray &visible3DBoundariesInUV();
635  // uv name, view mask
637  &visibleUVBoundaries();
638 
640  { return myActiveVisualizers; }
642  { return myActiveVisualizers.entries(); }
643  void appendActiveVisualizer(int vis_id)
644  { myActiveVisualizers.append(vis_id);
645  myCollectVisPrimitives.append(0); }
647  {
648  myActiveVisualizers.clear();
649  myCollectVisPrimitives.clear();
650  }
652  { return myCollectVisPrimitives(i); }
654  { myCollectVisPrimitives(i) = prim; }
655 
656  void requireErrorCheck() { myFlag.errorsChecked = false; }
657  void checkForErrors();
658  int64 getNodeErrorID() const { return myOpErrorPosted; }
659 
660  void setRedrawValue(UI_Value *redraw)
661  { myRedrawValue = redraw; }
663  { if(myRedrawValue) myRedrawValue->changed(NULL); }
664 
666  {
667  myFlag.visualizerCheck = true;
668  myFlag.needVisualizerSetup = false;
669  }
670  void needVisualizerSetup(bool setup)
671  {
672  myFlag.visualizerCheck = false;
673  myFlag.needVisualizerSetup = setup;
674  }
675  bool runVisualizerSetup() const
676  {
677  return (myFlag.needVisualizerSetup ||
678  myFlag.visualizerCheck);
679  }
680 
681  virtual const PXL_Raster *getImage(RE_Render *) { return nullptr; }
682 
683  // Wrapper class to avoid sprintf's when not recording
685  {
686  public:
688  {
689  // Early exit if we're not recording
691  bool record_viewport = perf->isRecordingViewportStats();
692  bool record_memory = perf->isRecordingMemoryStats();
693  if (!record_viewport && !record_memory)
694  return;
695 
696  const char *
698  const char *
699  look_name = look.getName();
700 
701  if (record_viewport)
702  {
703  setTimedEventId_(
705  viewport_name, look_name, UT_PERFMON_3D_VIEWPORT));
706  }
707 
708  if (record_memory)
709  {
710  setMemoryEventId_(
712  viewport_name, look_name, UT_PERFMON_3D_VIEWPORT));
713  }
714  }
715  };
716 
717 protected:
718  ~GUI_DetailLook() override;
719 
720  void cacheNodePtrs();
721 
722  // Multi-object instancing
723  void initInstanceTable();
724  GUI_GeoRender *addInstance(GU_ConstDetailHandle cgdh,
725  const char *name,
726  const UT_Matrix4D &xform,
727  int64 version,
728  int instance_index,
729  int object_id,
730  int inst_object_id,
731  bool is_guide,
732  bool time_dep);
733  void finalizeInstanceTable();
734 
735  using gui_CachedInstGeo = std::pair<GUI_GeoRender *, bool>;
736 
737  bool createObjectInstance(const char *instance_path,
738  int64 base_version,
739  fpreal t,
740  gui_Instance &instance,
741  OBJ_Node *instancer,
743  bool rel_to_sop);
744  void markGeoForRemoval(GUI_GeoRender *gr);
745  void removeDeletedGeos();
746  int64 computeInstanceVersion(const GU_Detail *dtl);
747 
748  // Indicates whether instancing should be implemented using the
749  // GUI_GeoRender instancing capabilities. If false, GUI_GeoRenderShared
750  // objects are used to instance the geometry without true OGL instancing.
751  virtual bool getUsesGeoRenderInstancing() const
752  { return true; }
753 
754  // End multi-object instancing
755  GUI_SetupResult setupAllGeos(const GUI_DisplayOption &disp_opt,
756  bool show_selections,
757  GR_DecorationOverride selmask_dec,
758  GR_DecorationOverride &sel_dec);
759 
760  virtual GUI_GeoRender *getOrCreateGeometryRender(int index);
761 
762  void setXRayOverride(bool xray) { myIsXRay = xray; }
763 
768 
771 
772 private:
773 
774  void generateObjectName(RE_RenderContext r,
775  GUI_DisplayOption *dispopt,
776  UT_String name,
777  int geo_index,
778  GR_DecorFontSize fontsize,
779  RE_Geometry &geo);
780  bool setupPointInstancing(bool show_selections,
781  GR_DecorationOverride selmask_dec,
782  GR_DecorationOverride &select_dec,
783  fpreal instance_fract,
784  int limit);
785  GUI_DisplaySetType privGetDisplaySetType() const;
786 
787  void updateInstancingStatus();
788  GUI_GeoRender * createGeoRender(int index,const char *opt_suffix=NULL);
789 
790  GUI_GeoRender *checkForDetailCaching(GUI_GeoRender *geo);
791  void freeCachedDetails();
792  void freeDeletedCachedDetails();
793 
794  int getNumOnionSkins() const;
795  const GU_DetailHandle &getOnionSkinDetail(int index) const;
796  GUI_SetupResult processSkins(const GUI_DisplayOption &dopt);
797  void addOnionSkin(OBJ_Node *obj, SOP_Node *sop,
798  fpreal skin_t, fpreal geo_t,
799  bool deforming,
800  bool is_pre_frame);
801  void clearOnionSkins();
802 
803  class GUI_DetailLookFlags
804  {
805  public:
806  GUI_DetailLookFlags()
807  {
808  showAxes = false;
809  render = true;
810  isGeometry = true;
811  isSymGeo = false;
812  shouldPick = true;
813  display = true;
814  templated = false;
815  footprinted = false;
816  highlighted = false;
817  xray = false;
818  geoxray = false;
819  targetoutput = false;
820  currentoutput = false;
821  usewireclr = false;
822  drawLit = true;
823  drawCookComponentSelection = true;
824  needsAlphaPass = false;
825  snappable = true;
826  secondarySelection = false;
827  objSelection = false;
828  objCurrent = false;
829  objSelectionHint = false;
830  objGhost = false;
831  wireframeOnly = false;
832  outline = false;
833  separateOutline = false;
834  beautyRender = true;
835  prevDisplay = true;
836  prevShouldPick = true;
837  overrideDisplay = false;
838  displayAsSubdiv = false;
839  shaders_used = false;
840  active_model = false;
841  being_deleted = false;
842  shade_open_curves = false;
843  onion_skin = false;
844  onion_skin_deform = false;
845  use_frustum_culling = true;
846  errorsChecked = false;
847  visualizerCheck = false;
848  needVisualizerSetup = true;
849  forceHidden = false;
850  forceAsUVObject = false;
851  showMaterials = true;
852  castShadows = true;
853  objHide = false;
854  objSolo = false;
855  objOutput = false;
856  }
857 
858  bool showAxes:1, // draw the axes of the detail
859  isGeometry:1, // renderable
860  isSymGeo:1, // symbolic geo only (no materials)
861  render:1, // render the detail
862  shouldPick:1,
863  display:1, // display the detail
864  templated:1,
865  footprinted:1,
866  highlighted:1, // Node has the highlight flag set
867  xray:1, // display wireframe within other geo
868  geoxray:1, // Xray drawing enabled by an attribute on the geometry.
869  targetoutput:1, // display sop when in view current
870  // mode
871  currentoutput:1, // current sop when in view current
872  // mode and the display flag is on a
873  // different sop.
874  usewireclr:1, // Override default wire color
875  drawLit:1, // In shaded mode, draw shaded
876 drawCookComponentSelection:1, // Draw the GU cook component selection
877  needsAlphaPass:1, // requires a second pass
878  snappable:1, // is the detail snappable
879  secondarySelection:1, // Draw a secondary selection
880  objSelection:1, // object selection
881  objCurrent:1, // object current flag
882  objSelectionHint:1, // hint that object makes good selection
883  objGhost:1, // ghosted object
884  wireframeOnly:1, // draw in wireframe only
885  outline:1, // draw the outline
886  separateOutline:1, // draw the outline separately in a separate pass
887  beautyRender:1, // wether or not to draw in beauty mode
888  prevDisplay:1, // cached value of the previous value of the display flag.
889  prevShouldPick:1, // cached value of the previous value of the pick flag.
890  overrideDisplay:1, // don't allow changes to the display
891  displayAsSubdiv:1, // draw as subdivision.
892  shaders_used:1, // Shaders have been used on the object
893  active_model:1, // Use SOP-level display sets
894  being_deleted:1, // We are in the process of deletion
895  shade_open_curves:1, // Open curves are light-shaded
896  onion_skin:1, // Draw faded images before/after
897  onion_skin_deform:1, // Use deformation onion skinning
898  use_frustum_culling:1, // Frustum culling is allowed
899  errorsChecked:1, // Errors checked after cook
900  visualizerCheck:1, // Check for visualizer setup
901  needVisualizerSetup:1, // Requires visualizer setup
902  forceHidden:1, // Force Hidden flag
903  forceAsUVObject:1, // Force the look to be a uv object.
904  showMaterials:1, // Display look with materials
905  castShadows:1, // The look can cast shadows
906  objSolo:1, // object is solo (hidden obj mode)
907  objHide:1, // Object is temporarily hidden (^)
908  objOutput:1; // output SOP of an Object
909  };
910  GUI_DetailLookFlags myFlag;
911 
912  UT_StringHolder myShowGroupMask;
913  GA_GroupType myShowGroupType;
914  int myShowGroupColorVersion;
915  GU_DetailHandle myDetailHandle;
916  UT_Vector4I myDetailVersion;
917  GUI_GUSelectionProxyHandle myTempComponentSelection;
918  UT_Array<GU_DetailHandle> myOnionSkinDetails;
919 
920  // Override the wireframe display color.
921  UT_Color myWireColor;
922 
923  // Override the outline color.
924  // UT_Vector4F instead of UT_Color since we want RGBA,
925  // and UT_Color only supports RGB.
926  UT_Vector4F myOutlineColor;
927 
928  int myObjectID;
929  int mySopID;
930  int myOutputIndex;
931  unsigned myObjTypeMask;
932  OP_Node *myCachedObject;
933  OP_Node *myCachedSop;
934  UT_String myDetailName;
935  int myID;
936  GEO_ViewportLOD myObjectLOD;
937  bool myIsXRay;
938  bool myIsOnionSkin;
939  UT_String myInstanceObjectRef;
940 
941  bool myUseNewLightInterface;
942  UT_Set<int> myActiveLights;
943 
944  UT_ValArray<RE_Light *> myLights;
945  UT_ValArray<RE_Light *> myEnabledLights;
946 
947  unsigned int myViewportMask;
948  bool myEnableDOPDisplay;
949  bool myIsChosenDopnet;
950  bool myNullDetailFlag;
951  bool myRetiredFlag;
952  bool myInitializedFlag;
953  bool myCopyDetailFlag;
954  bool myDrawableFlag;
955 
956  mutable bool myDisplaySetDirty;
957  mutable GUI_DisplaySetType myDisplaySet;
958 
959  fpreal myPrevInstanceFract;
960  int myPrevInstanceLimit;
961  int myInstanceFractSerial;
962  int64 myPointInstanceVersion;
963  int myInstanceXformVersion;
964  fpreal myInstanceTime;
965  int myInstanceObjectID;
966  bool myHasInstancing;
967  bool myHasPointInstancing;
968  bool myInstanceUseTransform;
969  bool myHasTransparentPrimitives;
970  bool myLastPointInstanceState;
971  bool myHasInstanceFile;
972  bool myXformDirty;
973  bool myDetailDirty;
974  UT_Matrix4D myXform;
975  UT_Matrix4D mySoloXform;
976  UT_Vector3F myPivot;
977  int64 myOpErrorPosted;
978  int64 myLookVersion;
979 
980  // Variable geometry Instancing
982  int myGeoCountId;
983  const GU_Detail *myTempLastDetail;
984  GUI_GeoRender *myTempLastGeo;
985 
986  // Cached details for cached playback (ie cache SOP)
987  UT_Map<exint, GUI_GeoRender *> myCachedDetailTable;
988  bool myCachingDetails;
989  int64 myCacheSopID;
990  int64 myCacheSopSerial;
991 
992  bool myHasUnlitGeometry;
993  int64 myDecorMask;
994  bool myUpdatePending;
995  bool myMatUpdatePending;
996  RE_MaterialPtr myFactoryMaterial;
997 
998  exint myVisUpdateTime; // last visualization-triggered
999  // update time (visualization
1000  // clock measurement)
1001  exint myVisUpdateVersion; // version at the time of last
1002  // visualization-triggered
1003  // update
1004 
1005  UT_IntArray myActiveVisualizers; // unique ids of visualizers
1006  // currently active for look
1007 
1009  myCollectVisPrimitives;
1010 
1011  UT_Array<GUI_GeoRender *> myGeosToRemove;
1012 
1013  UT_BoundingBox myWorldBBox;
1014  UT_UniquePtr<UT_Set<int> > myViewportVisibility;
1015 
1016  class gui_OnionSkinDetail
1017  {
1018  public:
1019  gui_OnionSkinDetail(const GU_DetailHandle &dh)
1020  : myDetail(dh), myRender(NULL), myUsedFlag(true)
1021  {
1022  myDetail.addPreserveRequest();
1023  }
1024  ~gui_OnionSkinDetail();
1025 
1026  GU_DetailHandle myDetail;
1027  GUI_GeoRender *myRender;
1028  bool myUsedFlag;
1029  };
1030  typedef std::pair<exint,int64> gui_OnionSkinId;
1031  typedef UT_Map<gui_OnionSkinId, gui_OnionSkinDetail *> gui_OnionSkins;
1032  gui_OnionSkins myOnionSkins;
1033 
1034  class gui_OnionSkinLayer
1035  {
1036  public:
1037  gui_OnionSkinLayer(gui_OnionSkinId id, fpreal t, const UT_Matrix4D &mat, bool pre)
1038  : myDetailID(id), myTime(t), myRender(NULL),
1039  myTransform(mat), myIsPreFrame(pre) {}
1040 
1041  gui_OnionSkinId myDetailID;
1042  fpreal myTime;
1043  GUI_GeoRender *myRender;
1044  UT_Matrix4D myTransform;
1045  bool myIsPreFrame;
1046  };
1047  UT_Array<gui_OnionSkinLayer *> myOnionSkinLayers;
1048 
1049  class CachedDetailPos {
1050  public:
1051  CachedDetailPos()
1052  : myPos(0,0,0,1)
1053  , myCacheCount(-1)
1054  , myUniqueId(-1)
1055  {}
1056 
1057  CachedDetailPos(const GU_Detail *detail)
1058  {
1059  myCacheCount = detail ? detail->getMetaCacheCount() : -1;
1060  myUniqueId = detail ? detail->getUniqueId() : -1;
1061  }
1062 
1063  void computePosition(const GU_Detail *detail)
1064  {
1065  if(detail)
1066  {
1067  UT_BoundingBox bbox;
1068  detail->getBBox(bbox, UT_Matrix4R::getIdentityMatrix());
1069 
1070  UT_Vector3 point3 = bbox.center();
1071  myPos = UT_Vector4F(point3.x(), point3.y(), point3.z(), 1.0);
1072  }
1073  }
1074 
1075  bool operator==(const CachedDetailPos& p)
1076  {
1077  return myCacheCount == p.myCacheCount
1078  && myUniqueId == p.myUniqueId;
1079  }
1080 
1081  const UT_Vector4F& position() { return myPos; }
1082 
1083  private:
1084  UT_Vector4F myPos;
1085  int myCacheCount;
1086  int myUniqueId;
1087  };
1088  // mutable because these are cached positions
1089  mutable UT_ValArray<CachedDetailPos> myDetailPositions;
1090 
1091  static UT_StringHolder ourChosenDopnetPath;
1092 
1093  UI_Value *myRedrawValue;
1094  SYS_AtomicInt32 myRefCount;
1095 };
1096 
1097 static inline void intrusive_ptr_add_ref(GUI_DetailLook *d) { d->incref(); }
1098 static inline void intrusive_ptr_release(GUI_DetailLook *d) { d->decref(); }
1099 
1100 inline int
1102 {
1103  return myNullDetailFlag ? 0 : 1;
1104 }
1105 
1106 inline OP_Node *
1108 {
1109  if(myCachedObject)
1110  return myCachedObject;
1111  if(myObjectID != OP_INVALID_NODE_ID)
1112  return OP_Node::lookupNode(myObjectID);
1113  return NULL;
1114 }
1115 
1116 inline OP_Node *
1118 {
1119  if(myCachedSop)
1120  return myCachedSop;
1121  if(mySopID != OP_INVALID_NODE_ID)
1122  return OP_Node::lookupNode(mySopID);
1123  return NULL;
1124 }
1125 
1126 inline OP_Node *
1128 {
1129  OP_Node *node = getObject();
1130  if(!node)
1131  {
1132  node = getSop();
1133  if(node)
1134  return node->getCreator();
1135  }
1136  return node;
1137 }
1138 
1139 inline int
1141 {
1143  return mySopID;
1144  else
1145  return myObjectID;
1146 }
1147 
1148 inline bool
1150 {
1151  if((myFlag.display || myFlag.objOutput) && !myFlag.objHide)
1152  {
1153 #if UT_ASSERT_LEVEL > 2
1154  if((myObjectID == OP_INVALID_NODE_ID || OP_Node::lookupNode(myObjectID))
1155  && (mySopID == OP_INVALID_NODE_ID || OP_Node::lookupNode(mySopID)))
1156  return true;
1157  UT_ASSERT_MSG(!"Stale GUI_DetailLook: ", myDetailName);
1158 #else
1159  return true;
1160 #endif
1161  }
1162  return false;
1163 }
1164 
1165 inline void
1166 GUI_DetailLook::setObjSolo(bool solo, const UT_Matrix4D *solo_transform)
1167 {
1168  if(myFlag.objSolo != solo)
1169  {
1170  myFlag.objSolo = solo;
1171  if(solo && solo_transform)
1172  mySoloXform = *solo_transform;
1173  else
1174  mySoloXform.identity();
1175  myXformDirty = true;
1176  }
1177 }
1178 
1179 
1180 // UTformat support.
1181 GUI_API size_t format(char *buffer, size_t buffer_size, const GUI_DetailLook &v);
1182 
1183 
1184 #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 getDetailDisplay() const
int getVersion(int version)
Definition: ImfVersion.h:86
bool castShadows() const
bool isSeparateOutline() const
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:208
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)
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 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 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 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)
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:189
bool isHighlighted() const
virtual void resetOverrideUsingSavedValue()
GR_UpdateReason
Definition: GR_Defines.h:300
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
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
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:160
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:135
int64 getMetaCacheCount() const
Definition: GA_Detail.h:2370
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:696
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 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