HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP3D_InputSelector.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: OP3D_InputSelector.h
7  *
8  * COMMENTS:
9  * This descendant of BM_InputSelector knows about the viewer. It uses
10  * the viewer to find out display/current sop and to use the viewer's
11  * selection type buttons.
12  */
13 
14 #ifndef __OP3D_InputSelector_h__
15 #define __OP3D_InputSelector_h__
16 
17 #include "OP3D_API.h"
18 #include "OP3D_InputSelectorBase.h"
19 #include "OP3D_SelectionManager.h"
20 #include "OP3D_GUSelectionSet.h"
21 #include <UI/UI_HotkeyHelper.h>
22 #include <OP/OP_DataTypes.h>
23 #include <PI/PI_ClassManager.h>
24 #include <GEO/GEO_PrimTypeCompat.h>
25 #include <GU/GU_SelectionSet.h>
27 #include <UT/UT_Rect.h>
28 #include <UT/UT_Map.h>
29 
30 class GU_SelectResult;
31 class GUI_DisplayOption;
32 class OP_Network;
33 class DM_HeldHotkeyCache;
34 class OP3D_InputSelectorUndoWorker;
35 class OP3D_EdgeLoopHelper;
36 class OP3D_PatternSelectHelper;
37 class SOP_Node;
38 class GA_Attribute;
39 class GR_DisplayOption;
40 
42 
44 {
49 };
50 
52 {
54  myGeoIndex(-1), myOpId(-1),
55  myIsSelectionSetOwner(false),
56  myIsSelected(false), myIsLocalScope(true) {}
57 
59  { return mySelectionSet->selection(myActiveType); }
61  { return myActiveType; }
62 
63  void updateProxy(GU_SelectionHandle sel, bool create);
64  GUI_DetailLook *getLook() const;
65 
66 
68  int myOpId;
69  // The index within the geolook.
70  // TODO: The DOP data name is probably more useful.
72 
75 
76  // The auto converted selection is set if we had to convert to an allowed
77  // selection type in selectorFinished() and should be cleared whenever we
78  // respond to a selection type change event.
80 
83 
84  // Proxy which represents the binding between the GUI_DetailLook and
85  // our selection. Manages our reference to the GUI_DetailLook, and
86  // the look's reference to the active selection.
88 
92 };
93 
95 {
96 public:
97 
98  OP3D_InputSelector(OP3D_View &viewer, PI_SelectorTemplate &templ);
99  ~OP3D_InputSelector() override;
100 
101  const char *className() const override;
102 
103  // This selector has the ability to locate components.
104  int hasLocates() const override
105  { return 1; }
106 
107  // The selector handles mouse events and modifies the selection
108  // accordingly. Return 1 if the event was consumed and 0 otherwise.
109  int handleMouseEvent(UI_Event *event) override;
110 
111  // Handle double-click events. Returns true if handled.
112  bool handleDoubleClickEvent(UI_Event *event) override;
113 
114  void getKeyResolveInfo(UI_KeyResolveInfo &info) override;
115 
116  // Selectors respond to keyboard events to know when to finish a selection
117  // stage and possibly enter the next.
118  int handleKeyEvent(int key, UI_Event *event,
119  DM_Viewport &viewport) override;
120  bool handleTransitoryKey(const UI_Event &event,
121  int hotkey_id) override;
122  bool willHandleKeyEvent(int key, UI_Event *event);
123 
124  // Is the selector required to attach an input node to the current
125  // node? If it is but nothing was selected, an empty model sop will
126  // be attached. By default, an input is not required.
127  bool inputRequired() const { return myInputRequiredFlag; }
128  void setInputRequired(bool onoff)
129  { myInputRequiredFlag = onoff; }
130 
131  // Some sops (eg. group and delete) need a '*' in the input field if
132  // everything is selected. Other sops will operate on everything if
133  // the input field is blank.
135  { return myUseAsteriskToSelectAll; }
136  void setUseAsteriskToSelectAll(bool onoff)
137  { myUseAsteriskToSelectAll = onoff;}
138 
139  // Specifies whether or not to use primitive id's when selecting edges.
140  // This setting allows the selector to distinguish between a general edge
141  // (e.g p0-1) and an edge on a primitive (e.g. 0e1)
142  void setUsePrimsInEdgeSelections(bool use_prims)
143  { myUsePrimsInEdgeSelectionFlag = use_prims; }
144 
145  // Specifies whether the selector can guess and return edge rings based
146  // on the choice of end elements or should always stick to edge loops.
147  void setAllowEdgeRingSelection(bool allow)
148  { myAllowEdgeRingSelection = allow; }
149 
150  // Specifies whether the selector can guess and return edge rings based
151  // on the choice of end elements or should always stick to edge loops.
153  { myOffsetVertexMarkersOverride = offset; }
154 
155  // Get or set the primitive mask used for picking. The virtual primMask
156  // overrides DM_InputSelector which allows DM_Viewport to access the
157  // primitive mask for pre-selection highlighting.
159  primMask() const override
160  { return myPrimMask; }
162  { myPrimMask = primmask; }
163 
164  // A selector can optionally be "sloppy" whereby the user can initially
165  // pick any of the component types allowed by getSelectionAllowedTypes(),
166  // regardless of the selection type UI value. Once a component has been
167  // picked in this mode, only components of that type can be picked until
168  // the selections are cleared or a pick occurs as a GU_ReplaceSelect.
169  //
170  // The component type of area select operations when a component has not
171  // yet been picked is determined by the selection type UI value.
172  //
173  // The selection type UI values can be used in this mode to convert the
174  // current selection and are also automatically updated by the selector
175  // as the user picks different component types.
176  //
177  // NB: setSloppy() should be called after setSelectionAllowedTypes().
178  void setSloppyPick(bool on);
179  bool getSloppyPick() const
180  { return mySloppyPick; }
181 
182  // Restrict sloppy picks to a subset of getSelectionAllowedTypes(). Must
183  // be called after setSloppyPick(true) in order to have an effect.
184  //
185  // Note that this only restricts the subset of component types allowed for
186  // sloppy picks and will not affect the current selection, even when it is
187  // of a type we're excluding.
188  bool restrictSloppyAllowedTypesToSubset(
189  const PI_GeometryTypeArray &types);
190 
191  // Some selectors allow picking components at the object level.
192  void setPickAtObjLevel(bool flag)
193  { myPickAtObjLevelFlag = flag; }
194  bool getPickAtObjLevel() const
195  { return myPickAtObjLevelFlag; }
196 
197  // The selector needs to be notified when it starts/stops selecting
198  // so it can add/remove interests (the selection type, etc.).
199  void startSelecting() override;
200  void stopSelecting() override;
201  void restartWithStashedSelection();
202 
203  // Commit the pre-selection in the viewport to a geometry selection.
205  GU_SelectionRule sel_rule) override;
206 
207  // Return a list of looks from which we can select.
208  void getSelectableLooks(GUI_DetailList &looklist) override;
209 
210  // Add the cook selection, if any, from the specified SOP to our current
211  // selection.
212  bool addCookedSelection(SOP_Node *sop);
213 
214  // The selector needs to know the node for which it is reselecting so that
215  // it can properly place visibility operators.
216  void nodeIdForReselecting(int node_id)
217  { myNodeIdForReselecting = node_id; }
218 
219  // Clear the selections of the selection. This method is called when,
220  // for example, the selection stages are aborted.
221  virtual void clearSelections();
222 
223  // Consume the user selections made for this selector by clearing any
224  // correponding selections stashed in the selection manager/cache and
225  // clear our selection infos.
226  virtual void consumeSelections();
227 
228  // Remove the selections we assigned to detail looks.
229  void removeSelectionsFromDetailLooks();
230 
231  // NB: This method is normally called automatically in stopSelecting().
232  // You should be careful calling it explicitly. The stash shares
233  // pointers with this selector instance, so it's not a good idea to
234  // call this method if you expect to continue to use this instance
235  // without restarting it.
236  void stashPendingSelection();
237 
238  // This method allows the resource manager can set the workbench to
239  // something different if a selector is reused. It should not be used
240  // otherwise. A nil pointer is allowed so the select can remove any
241  // of its interests. However, methods of the selector should never be
242  // called when its workbench is nil. The method is virtual so
243  // descendants can also have a chance to clean up.
244  void setViewer(BM_View *viewer) override;
245 
246  // This method must be called after retrieving a new/recycled selector
247  // from the resource manager.
248  void setSelectionUIValues(UI_Value *sel_type,
249  UI_Value *sel_rule,
250  UI_Value *sel_style,
251  UI_Value *sel_visible,
252  UI_Value *sel_contained,
253  UI_Value *sel_full,
254  UI_Value *locate_always,
255  UI_Value *finished,
256  UI_Value *located=nullptr);
257 
258  // Any nodes created by this selector are tagged with the creator state's
259  // name.
260  void setCreatorStateName(const char *state_name)
261  { myCreatorStateName.harden(state_name); }
263  { return myCreatorStateName; }
264 
265  // Can this selector use a box or lasso for picking, or just click picks?
266  void setAllowDragSelect(bool allow_drag)
267  { myAllowDragSelFlag = allow_drag; }
268 
269  // Should this selector only select the full geometry?
270  void setSelectFullGeometry(bool select_full)
271  { myFullSelFlag = select_full; }
272 
273  // Should this selector start with the existing selection, if any? The
274  // cook group will be used for the chosen SOP if true and there is no
275  // applicable pending temporary selection. In some cases, you'll want
276  // to control whether we use existing temp or cook selections separately.
277  void setUseExistingSelection(bool use_existing)
278  {
279  setUseExistingTempSelection(use_existing);
280  setUseExistingCookSelection(use_existing);
281  }
282  bool useExistingSelection() const
283  {
284  return useExistingTempSelection() ||
285  useExistingCookSelection();
286  }
287 
288  // Should this selector start with the existing temporary selection,
289  // if any?
290  void setUseExistingTempSelection(bool use_existing)
291  { myUseExistingTempSelection = use_existing; }
293  { return myUseExistingTempSelection; }
294 
295  // Should this selector start with the cook selection for the chosen SOP
296  // either if useExistTempSelection() is false or there was no applicable
297  // pending temporary selection.
298  void setUseExistingCookSelection(bool use_existing)
299  { myUseExistingCookSelection = use_existing; }
301  { return myUseExistingCookSelection; }
302 
303  // TODO: Rename to setExportUserSelectionOnFinish().
304  void setStashSelectionOnFinish(bool stash)
305  { myStashSelectionOnFinish = stash; }
307  { return myStashSelectionOnFinish; }
308 
309  void setAllowMultiPickLoopStart(bool allow)
310  { myAllowMultiPickLoopStart = allow; }
311 
312  // Set an initial selection for the given op path.
313  //
314  // If useExistingTempSelection() or useExistingCookSelection() is true,
315  // then this initial selection will be in addition to those selections,
316  // and may even overwrite them entirely. Any number of op paths can be
317  // set. Only the op paths that exist within the selector context will
318  // have their initial selection set.
319  void setInitialSelection(const char *op_path,
321  const char *selection_string);
322 
323  // Should this selector save undo information?
324  void setSaveUndos(bool yesno) { mySaveUndosFlag = yesno; }
325  bool saveUndos() const { return mySaveUndosFlag; }
326 
327  // Generate merge(s) and connect them to the given op, filling in the
328  // specified input parm with the selection. If there is a menu in the
329  // op that needs to be set and menu_idx is not null, the value menu_idx
330  // points to will be set to a non-negative index into the menu. If menu_idx
331  // is not null but there is no menu, *menu_idx = -1.
332  // If the selection consists of the entire gdp, the group field
333  // is filled with an empty string. To force it to be filled
334  // with a string (even for the entire gdp), use force_selection_string.
335  // An array of the previous input nodes may optionally be provided to
336  // suppress the automatic repositioning of new_node when it is simply
337  // reconnected to the same inputs.
338  bool connectOps(OP_Node &new_node, int op_input_index,
339  const UT_String &input_parm,
340  int *menu_idx = 0,
341  bool branch_off = false,
342  bool multi_input = false,
343  bool force_selection_string = false,
344  bool force_numeric = false,
345  const UT_IntArray *prev_input_nodes = 0);
346 
347  /// Some convenience methods for managing mySelectedInfoIndices.
348  void addSelectedInfo(int info_i, bool set_pick_order=true);
349  void removeSelectedInfo(int info_i);
350 
351  /// Update our internal selection cache and the detail look, if any, with
352  /// the provided selection.
353  int updateSelection(const char *path, OP_Node *node,
354  GUI_DetailLook *look, int geo_idx,
356  const GU_Detail &gdp);
357 
358  /// Returns the current set of ops that have selections on them using this
359  /// selector. The size of the array matches that of the array returned by
360  /// \c selectedselections and \c selectedAutoConvertedSelections.
361  UT_StringArray selectedOpPaths() const;
362 
363  /// Returns the current set of selection objects used to mark the
364  /// component selection for each op used for selection. The size of this
365  /// array matches that of the array returned by \c selectedOpPaths.
366  ///
367  /// In many cases you should use \c selectedAutoConvertedSelections
368  /// instead of this method.
369  OP3D_SelectionHandles selectedSelections() const;
370 
371  /// Returns the current set of auto converted (to the best allowed
372  /// selection type) selection objects for each op used for selection.
373  /// The size of this array matches that of the array returned by
374  /// \c selectedOpPaths.
375  //
376  /// The conversion is done in selectorFinished(), so if this method is
377  /// called before this it is identical to calling selectedSelections().
378  /// Typically you'll want to use this method wherever you call either
379  /// getGeometryTypeAtFinish() or getGroupTypeMenuValAtFinish(). Unlike
380  /// selectedSelections(), entries may be empty or even NULL.
381  OP3D_SelectionHandles selectedAutoConvertedSelections() const;
382 
383  /// Returns a selection handle, given an op path. If the selector is not
384  /// holding a matching op path, then an empty handle is returned.
385  GU_SelectionHandle selectionFromOpPath(UT_StringRef path,
386  bool only_selected=true) const;
387 
388  /// Returns a selection handle, given an info key. If the selector is not
389  /// holding a matching info, then an empty handle is returned.
390  class InfoKey;
391  GU_SelectionHandle selectionFromInfoKey(const InfoKey &key,
392  bool only_selected=true) const;
393 
394  // Returns whether this selector has a non-empty selection instance.
395  bool hasNonEmptySelection() const;
396 
397  // Return the stored selection for the specified geometry, or, if none,
398  // return the selection of the specified type passed in new_selection,
399  // if any, or return an entirely new selection of the specified type
400  // and set new_selection to point to it.
401  GU_SelectionHandle getOrCreateSelection(int node_id, int detail_index,
402  int &info_i,
403  GU_SelectionHandle &new_selection,
404  GA_GroupType sel_type);
405  GU_SelectionHandle getExistingSelection(int node_id, int detail_index,
406  int &info_i,
407  GA_GroupType sel_type);
408 
409  // The state needs to be able to get the current prompt and set the default
410  // prompt. The custom message is for the selector, and the default message
411  // is displayed by the state. The default prompt is passed on by the state
412  // and should not be changed. If you make the const versions public and
413  // the non-const versions private it won't compile, so they're all public.
414  const UT_String &currentPrompt() const { return myCurrentPrompt; }
415  UT_String &currentPrompt() { return myCurrentPrompt; }
416  const UT_String &defaultPrompt() const { return myDefaultPrompt; }
417  UT_String &defaultPrompt() { return myDefaultPrompt; }
418 
419  // Clean up when selector is about to transmit done event. If drag is
420  // true, the selector indicates to the state that the selection should
421  // be dragged right away.
422  void selectorFinished(bool drag = false);
423 
424  // Create an object merge for the given object-sop combination, or combine
425  // the given path into the network if do_combine is true. In that case,
426  // the sop path and selection instance is updated to point to the moved
427  // sop.
428  static SOP_Node *createObjectMerge(OP_Network *network,
429  UT_String &path,
431  const UT_String &creator_state_name,
432  bool keep_original_objects,
433  bool display_origina_objects);
434 
435  // Override the undo worker that gets used for undos. Pass in NULL to use
436  // a default worker.
437  void setUndoWorker(OP3D_InputSelectorUndoWorker *worker=0);
438  // Sets and returns a default undo worker.
439  OP3D_InputSelectorUndoWorker *getDefaultUndoWorker();
440 
441  // Return the feel containing the RMB menu.
442  UI_Menu *getSelectorMenu() const override;
443  UI_Menu *getSelectorHotkeyMenu() const override;
444 
445  void setValidForPickFilter(void *data,
447 
448  // Get or set the current selection type or selection rule explicitly.
449  // Setting the selection type will change the selection type for all
450  // displayed geometry and all geometry that has been selected.
451  void setGeometryType(PI_GeometryType geo_type,
452  bool update_buttons);
453  GA_GroupType selectionType() const;
454 
455  // Get the component type as it was set when the selection was completed.
456  PI_GeometryType getGeometryTypeAtFinish() const;
457  int getGroupTypeMenuValAtFinish() const;
458  bool getKeepOriginalObjects() const;
459 
460  // Query if the selector is currently updating the geometry selection
461  // type button. This can be useful in determining if the selector is
462  // responsible for a given selection type change notification sent by
463  // the workbench.
464  bool currentlyUpdatingGeometryTypeButtons() const;
465 
466  const PI_GeometryTypeArray &getSelectionAllowedTypes() const;
467  void setSelectionAllowedTypes(
468  const PI_GeometryTypeArray &allowedtypes);
469 
470  // Call this method to query the next best allowed selection type when the
471  // given type is not allowed. Returns PI_GEOTYPE_INVALID when we have no
472  // explicit preference among the allowed selection types.
473  PI_GeometryType getNextBestAllowedType(
474  PI_GeometryType disallowed_type) const;
475 
476  // Call this method to query the allowed selection type to use for the
477  // given type. The failure_type is returned if there are no preferred
478  // allowed selection types for the given type.
479  PI_GeometryType mapToAllowedType(
481  PI_GeometryType failure_type
482  = PI_GEOTYPE_INVALID) const;
483 
484  // This function uses the below static function to generate a single
485  // selection string for all selections merged into a single detail.
486  //
487  // If consume_selections is true, the selections will be removed from
488  // this selector and the viewer's selection cache.
489  void generateAllSelectionStrings(UT_String &sel_string,
490  bool only_one_gdp,
491  bool force_numeric,
492  bool consume_selections) override;
493  static void generateMergedSelectionString(UT_String &sel_string,
494  UT_StringArray &paths,
495  OP3D_SelectionHandles &selections,
496  bool ordered,
497  bool collapse,
498  bool use_ast_to_select_all,
499  bool force_numeric);
500 
501  // A utility method to get a pick record representing the current loop
502  // start pick with the component indices mapped into a detail composed
503  // by merging all the selected details. Returns true on success, false
504  // otherwise. The record will be cleared on failure. The look ID and
505  // detail index returned in the GR_PickRecord are meaningless. We are
506  // unable to export the component info when myLoopStartPickPath is not
507  // in the list of selected paths.
508  bool getPostMergeLoopStart(GR_PickRecord &pick);
509 
510  // A method for bootstrapping the current loop start pick, typically with
511  // a pick derived from an earlier selector. Only the geometry component
512  // data is relevant in the supplied GR_PickRecord.
513  void bootstrapLoopStart(const char *path,
514  const GR_PickRecord &pick,
515  bool only_selected_path);
516 
517  // This method is used by HOM to replace the current selection for a
518  // particular component type.
519  void scriptReplaceSelection(
520  PI_GeometryType geo_type,
521  const UT_StringArray &paths,
522  OP3D_SelectionHandles &selections);
523 
524  // Convert to a particular geometry selection from the given list of
525  // objects
526  static bool createSelectionFromObjects(
527  const OP_NodeList &objects,
528  DM_Viewport &viewport,
529  PI_GeometryType geo_type,
530  UT_StringArray &paths,
531  OP3D_SelectionHandles &selections);
532 
533  bool getStateParmNames(
534  UT_StringArray &ret,
535  const char* prefix = nullptr) override;
536  bool evalStateParm(
537  const char *name,
538  UT_StringHolder &ret) override;
539  bool setStateParm(
540  const char *name,
541  const UT_StringHolder &val) override;
542  bool pressStateButton(const char *name) override;
543 
544  // Override to allow rendering widgets.
545  void doRender(RE_Render *r, int x, int y,
546  int ghost) override;
547 
548 
550  {
551  public:
552  InfoKey(int node_id, int detail_index)
553  : myNodeId(node_id), myDetailIndex(detail_index)
554  {
555  }
556  bool operator==(const InfoKey &key) const
557  {
558  return myNodeId == key.myNodeId &&
559  myDetailIndex == key.myDetailIndex;
560  }
561  int getNodeId() const { return myNodeId; }
562  int getDetailIndex() const { return myDetailIndex; }
563 
564  private:
565  int myNodeId;
566  int myDetailIndex;
567  };
568 
569  using LocateFilter = std::function<bool(DM_Viewport *)>;
571  { myLocateFilter = filter; }
572 
574  HeldHotkeyCacheUPtr &getHeldHotkeyCache() { return myHeldHotkeyCache; }
575 
576 protected:
577  // React to the user pressing a button to change the component type.
578  virtual void handleSelectionTypeChange(UI_Event *event);
579 
580  /// Called when selection finishes and we need to stash away the group
581  /// menu index that gets set for the target operator of this selector.
582  virtual void updateGroupMenuValue(PI_GeometryType geo_type,
583  int &group_menu_type) = 0;
584 
585  // Called when the selection changes and nothing is removed. Added_geo is
586  // a pointer to the added geometry, allowing derived classes to process it
587  // if they so wish.
589  const char *path,
590  GU_SelectionHandle sel,
591  GU_SelectResult &added_geo)
592  { }
593 
594  // Handle a pick during which nothing was selected. Return true if
595  // any changes were made to the existing selections.
596  virtual bool handleNoPick(UI_Event *event);
597 
598  // Insert additional nodes between the last created node and the
599  // state's node.
600  virtual void appendToLastNode(SOP_Node *&/*input_node*/,
601  const UT_String &/*creator_state_name*/,
602  bool /*branch_off*/) {}
603 
604  // Add additional input nodes for the new node.
605  virtual void generateAdditionalInputNodes(SOP_Node & /*new_node*/,
606  SOP_Node * /*last_selected_node */,
607  const UT_String & /*sel_string*/,
608  const UT_String & /*creator_state_name*/) {}
609 
610  // Modify default parameters if necessary.
611  virtual void setNodeParameters(OP_Node &) {}
612 
613  // Return the pick masks to be used for single or area picks. These masks
614  // are a function of the current selection type for all non-sloppy (normal)
615  // selectors, and both the current selection type and the current selection
616  // state for sloppy selectors. These are the masks used to select entities
617  // that the selection knows how to handle.
618  int singlePickMask(GU_SelectionRule sel_rule) const;
619  int areaPickMask(GU_SelectionRule sel_rule) const;
620 
621  // Return the pick mask to be set in the workbench to control the automatic
622  // display of useful visual markers.
623  int displayPickMask() const;
624 
625  // THESE TWO METHODS ARE DEPRECATED.
626  // Overriding selection type in this manner is dangerous as there
627  // is no guarantee the button bar will remain disabled.
628  // If you find yourself wanting to use this (ie: MSS_JoinSelector)
629  // your selector is likely a state in disguise.
630 
631  // This method is called to overwrite UI values. Disables the
632  // toolbox which allows the user to change the values.
633  void overrideSelectionValues(int sel_type, int sel_rule,
634  int sel_style, int sel_full,
635  int locate);
636  // Restore the values indicated by the UI.
637  void restoreSelectionValues();
638 
639  // Save the contents of the selector so later changes can be undone/redone.
640  void saveForUndo() override;
641 
642  // Implements the getPickName function to return the string representation
643  // of a pick id.
644  bool getPickName(const OP3D_PickId &pickid,
645  UT_String &name,
646  bool descriptivename) const override;
647 
648  // Override the base class needObjectPick() method to add support for our
649  // getPickAtObjLevel() flag.
650  bool needObjectPick() const override;
651 
652  // Clear the selections of all the gdp's with selections in them.
653  // This method is called when failing to select something at all.
654  bool emptySelections(const char *path_to_skip = 0,
655  bool refresh = true);
656 
657  // Delay the selection dirty opChanged calls
659  {
660  public:
661  virtual ~DirtySelectionScope();
662  void delayDirtySelection(SOP_Node *s);
663 
664  private:
666  };
667  // Mark this selection as dirty so that the SOP node and the viewport
668  // will be properly refreshed with the new selection state.
669  void dirtySelection(SOP_Node *sop_node, DirtySelectionScope *scope);
670  void dirtySelection(const GUI_DetailLook &geo_look, int geo_idx, DirtySelectionScope *scope);
671  void dirtySelection(const OP3D_SelectionInfo &sel_info, DirtySelectionScope *scope);
672 
673 
674 
675  // Clear mySelectionInfos as well as mySelectedInfoIndices.
676  void clearSelectionInfos();
677 
678  // Clear mySelectedInfoIndices, but keep mySelectionInfos.
679  void clearSelectedInfoIndices();
680 
681  // Utility method to compute the next unused pick order from our current
682  // selections.
683  int computeNextPickOrder(GA_GroupType sel_type) const;
684 
685  int findInfo(int node_id, int detail_index) const;
686  int findInfo(const char *path) const;
687 
688 
689 private:
690  void handleStartSelecting(UI_Event *event);
691 
692  // Rather than putting the undo code in this file, it's in a friend class.
693  friend class OP3D_InputSelectorUndo;
694 
695  void getPickableGeometry(GUI_DetailList &geos,
696  bool objects_only) const;
697 
698  // Return true if the selection has changed and false otherwise.
699  bool singleSelectGeometry(UI_Event *event,
700  bool save_undo,
701  bool selecting_loop,
703  bool boxSelectGeometry(UI_Event *event,
704  int xcenter, int ycenter,
705  int xsize, int ysize);
706  bool lassoSelectGeometry(UI_Event *event,
707  int *lasso_points);
708  bool brushSelectGeometry(UI_Event *event,
709  uint8 *enablemap,
710  int minx, int miny,
711  int maxx, int maxy,
712  bool visible_only,
713  bool contained_only);
714  bool singleSelectObject(UI_Event *event,
715  UT_Array<GR_PickRecord> &pick_records);
716 
717  // Use the contents of the pick buffer to modify the selections. Return
718  // true if the selection has changed and false otherwise.
719  bool modifySelections(UI_Event *event,
720  const UT_Array<GR_PickRecord> &pick_records,
721  GU_SelectionRule sel_rule);
722 
723  /// Handles a toggle from the "Select Whole Geometry" menu option
724  void fullSelectionChanged(UI_Event *);
725 
726  // Select everything that's visible in the viewport, select nothing, or
727  // toggle the selections of everything in the viewport.
728  void selectAllOrNoneOrToggle(OP3D_SelectionAction action,
729  DM_Viewport &viewport);
730 
731  // Revert the current selection to only the cook selection on the current
732  // node.
733  void revertToCookSelection(DM_Viewport &viewport);
734 
735  // Select the boundary of the current selection. This means
736  // everything which is selected and has a neighbour which is
737  // unselected.
738  void selectBoundary(DM_Viewport &viewport);
739  void selectEdgeBoundary(DM_Viewport &viewport);
740  void shrinkSelection(DM_Viewport &viewport);
741  void growSelection(DM_Viewport &viewport);
742  void selectPrimitivesWithVertexCount(
743  DM_Viewport &viewport,
744  const char *command_name,
745  GA_Size min_vtx, GA_Size max_vtx);
746 
747  using PatternExpandFunc = bool (OP3D_PatternSelectHelper::*)
748  (const GU_Detail &,
751  void patternSet(DM_Viewport &viewport);
752  void patternExpand(DM_Viewport &viewport,
753  PatternExpandFunc func,
755 
756  // Select everything that's visible in the uv viewport, but only if the
757  // face has a specific winding (orientation).
758  void uvSelectAllByWinding(DM_Viewport &viewport,
759  bool front_facing,
760  bool back_facing);
761 
762  void convertSelection(DM_Viewport &viewport,
763  GA_GroupType target_type);
764 
765  bool handlePick(UI_Event *event,
766  const UT_Array<GR_PickRecord> &in_pick_records,
767  GU_SelectionRule sel_rule,
768  bool &added_something);
769 
770  void handleBoxPick(UI_Event *event) override;
771  void activeBoxPick(UI_Event *event) override;
772  void handleLassoPick(UI_Event *event) override;
773  void activeLassoPick(UI_Event *event) override;
774  void handleBrushPick(UI_Event *event) override;
775  void activeBrushPick(UI_Event *event) override;
776  void handleLaserPick(UI_Event *event) override;
777  void activeLaserPick(UI_Event *event) override;
778 
779  // Respond to the user using the selection visibility menu in the toolbar.
780  void handleSelectionHideOrExpose(UI_Event *event);
781 
782  // Should we allow picking from this GUI_DetailLook? (eg. Templates
783  // can't be picked from, and ordered selectors need to pick from the
784  // merges, even if the inputs of the merges are displayed.)
785  bool validForPickRender(GUI_DetailLook *detail,
786  const GUI_DisplayOption &dopt) const;
787 
788  // A higher level method than validForPickRender(), used to consolidate
789  // additional common restrictions.
790  //
791  // TODO: Merge with validForPickRender().
792  bool allowPickOperation(GUI_DetailLook *detail,
793  const GUI_DisplayOption &dopt) const;
794 
795  UT_Array<const OP3D_SelectionInfo *> getNonEmptySelectedInfos() const;
796 
797  // Is any of the geometry visible on the screen selected?
798  bool isAnythingSelected();
799 
800  // Create and connect a visibility sop to modify the visibility of geometry
801  // in the specified sop. Returns the newly created sop, if any, and a flag
802  // indicating whether the visibility sop was inserted above the specified
803  // sop instead of below.
804  SOP_Node *createAndConnectVisibilitySop(SOP_Node *sop,
805  bool *inserted_above);
806 
807  // Set the parameters in the visibility sop to match the action being
808  // performed.
809  void setVisibilitySopParameters(SOP_Node &visibility_sop,
810  bool exposing,
811  bool applying_to_selection,
812  bool cumulative,
813  const UT_String &sel_string);
814 
815  OP3D_EdgeLoopHelper &getEdgeLoopHelper();
816 
817  OP3D_PatternSelectHelper &getPatternSelectHelper(int sop_node_id,
818  int geo_idx);
819 
820  SOP_Node *getChosenSOP() const;
821 
822  SOP_Node * findChosenSop(bool &need_object_pick);
823  void handleSwitchToChosenOp(UI_Event *event);
824 
825  void doneNormalSelection();
826 
827  bool areaSelectGeometry(UI_Event *e,
828  const UT_DimRect &area,
829  uint8 *mask,
830  unsigned pick_mask,
832  bool visible_only,
833  bool contained,
834  bool add_to_existing_picks);
835 
836  // A wrapper around DM_Viewport::adoptLocatedItems() that also handles any
837  // necessary communication with DM_GroupInfo.
838  //
839  // Returns if the viewport located items have changed.
840  bool adoptLocatedItems(DM_Viewport *viewport,
842  UT_Array<GR_PickRecord> &faded_items,
843  bool force_locate = false);
844 
845  // Add any pending (i.e. saved temporary selections) for visible (and
846  // pickable) geometry in the viewer. Returns whether any non-empty
847  // selections were added. We also set have_chosen_sop_temp_sel flag
848  // to indicate if we found any non-null pending selection for the chosen
849  // SOP, including an empty one.
850  bool initWithPendingSelectionForVisibleOps(
851  SOP_Node *chosen_sop,
852  bool &have_chosen_sop_temp_sel);
853 
854  void autoConvertToFinishGeometryType();
855 
856  void addInitialSelections();
857 
858  void handleGeoChanged(UI_Event *event);
859 
860  void updateSelectMask();
861 
862  // Reset mySloppyPickMask from myAllowedTypes.
863  void resetSloppyPickMask();
864 
865  // Update the set sloppy selection type, if any, to the specified type.
866  void updateExistingSloppySelectionType(
867  GA_GroupType sel_type);
868 
869  // Initialize an unset sloppy selection type from the given pick records
870  // and selection rule.
871  void initSloppySelectionType(
872  const UT_Array<GR_PickRecord> &pick_records,
873  GU_SelectionRule sel_rule);
874 
875  // Set the sloppy selection type to the specified type along with any
876  // extra book-keeping.
877  void setSloppySelectionType(
878  GA_GroupType sel_type);
879 
880  static OP_Node * mergeViaCombine(fpreal t,
881  OP_Network *network,
882  UT_String &path,
884  const UT_String &creator_state_name);
885 
886  bool acceptKey(int key, UI_Event *event);
887  bool fullSelectionKey(int key, UI_Event *event);
888  bool selectByNormalKey(int key, UI_Event *event);
889  bool keepOriginalObjKey(int key, UI_Event *event);
890  bool locateKey(int key, UI_Event *event);
891  bool selectAllKey(int key, UI_Event *event);
892  bool invertSelectionKey(int key, UI_Event *event);
893  bool selectNoneKey(int key, UI_Event *event);
894  bool revertToCookSelectionKey(int key, UI_Event *event);
895  bool selectBoundaryKey(int key, UI_Event *event);
896  bool selectEdgeBoundaryKey(int key, UI_Event *event);
897  bool shrinkSelectionKey(int key, UI_Event *event);
898  bool growSelectionKey(int key, UI_Event *event);
899  bool patternSetKey(int key, UI_Event *event);
900  bool patternForwardKey(int key, UI_Event *event);
901  bool patternBackwardKey(int key, UI_Event *event);
902  bool patternLeftKey(int key, UI_Event *event);
903  bool patternRightKey(int key, UI_Event *event);
904  bool patternForwardToEndKey(int key, UI_Event *event);
905  bool patternBackwardToEndKey(int key, UI_Event *event);
906  bool patternLeftToEndKey(int key, UI_Event *event);
907  bool patternRightToEndKey(int key, UI_Event *event);
908  bool selectUVSelectAllFrontKey(int key, UI_Event *event);
909  bool selectUVSelectAllBackKey(int key, UI_Event *event);
910  bool visibleSelectToggleKey(int key, UI_Event *event);
911  bool containedSelectToggleKey(int key, UI_Event *event);
912  bool doubleClickJumpToObjectKey(int key, UI_Event *event);
913  bool redoSelectionKey(int key, UI_Event *event);
914  bool selectNextGroupKey(int key, UI_Event *event);
915  bool selectPrevGroupKey(int key, UI_Event *event);
916  bool copyCurrentGroupNameKey(int key, UI_Event *event);
917  bool copyCurrentSelectionKey(int key, UI_Event *event);
918 
919  bool selectionConvertPointKey(int key, UI_Event *event);
920  bool selectionConvertEdgeKey(int key, UI_Event *event);
921  bool selectionConvertPrimitiveKey(int key, UI_Event *event);
922  bool selectionConvertVertexKey(int key, UI_Event *event);
923  bool selectionConvertBreakpointKey(int key,
924  UI_Event *event);
925 
926  bool selectPrimitiveTrianglesKey(int key, UI_Event *event);
927  bool selectPrimitiveQuadsKey(int key, UI_Event *event);
928  bool selectPrimitiveNgonsKey(int key, UI_Event *event);
929 
930  void handleLocatedPickComplete(UI_Event *event);
931  void handleMouseActionComplete();
932 
933  // Use a seed pick to expand to new picks by normal. Adds new
934  // components to the pick if its normal is within the spread angle
935  // tolerance from the normal of the base pick.
936  void expandPickByNormal(
937  UT_Array<GR_PickRecord> &new_picks,
938  const GR_PickRecord &base_pick,
939  const GU_Detail &gdp,
940  fpreal spread_angle,
941  bool pick_all_matching_normals,
942  bool use_static_reference_normal,
943  const GU_SelectionHandle & prev_selection);
944 
945  // Use a seed pick to expand to new picks by flood filling. Finds
946  // islands of unselected geometry for selection, and/or islands of
947  // selected geometry for deselection.
948  void expandPickByFloodFill(
949  UT_Array<GR_PickRecord> &new_picks,
950  const UT_Array<GR_PickRecord> &seed_picks,
951  const GU_Detail &gdp,
953  GU_SelectionRule rule);
954 
955  // Utility method to update myLoopStartPick to refer to the detail look
956  // corresponding to myLoopStartPickPath when necessary, and, optionally,
957  // note the fact that we've done this in myLoopStartPickRecordMatchesPath
958  // when we expect it to remain synchronized over an extended operation.
959  void updateLoopStartPickRecordFromPath(
960  bool record_match_state);
961 
962  bool selectFromSingleRecord(UI_Event *event,
963  const GR_PickRecord &pick,
964  GU_SelectionRule sel_rule);
965 
966  void addInfoLookup(const OP3D_SelectionInfo &sel_info,
967  int sel_info_index);
968 
969  const GA_Attribute *getUVAttrib(const GU_Detail *gdp);
970  bool areVerticesOfSamePoint(
971  const UT_Array<GR_PickRecord> &pick_records);
972 
973  void extendVertexPickRecords(
974  const UT_Array<GR_PickRecord> &pick_records,
975  UT_Array<GR_PickRecord> &extended_pick_records);
976 
977  // Drawable selection related methods
978  void pickRender(
979  RE_Render * r,
980  const GR_DisplayOption * /*opt*/,
981  unsigned int /*pick_type*/,
982  GR_PickStyle /*pick_style*/,
983  bool /*has_pick_map*/,
984  UT_Array<GR_PickRecord> * /*records*/);
985 
986  // Hotkey methods
987  static UI_HotkeyHelper::Entry theHotkeyList[];
988 
989  UI_HotkeyHelper myHotkeyHelper;
990  DM_Viewport *myHotkeyViewport;
991 
992  UT_String myCurrentPrompt;
993  UT_String myDefaultPrompt;
994 
995  UT_String myCreatorStateName;
996 
997  UI_Value *myGeoChangedValue;
998  UI_Value *mySelectionTypeValue; // prims, points, etc.
999  UI_Value *myFullSelection; // select whole gdp
1000  UI_Value *myAlwaysLocate; // always do locating
1001 
1002  // A selector can optionally be "sloppy" as described in the comment for
1003  // setSloppyPick(), whereby the user can pick any of the component types
1004  // allowed by mySloppyPickMask (automatically built from myAllowedTypes).
1005  // Once a component is picked in this mode, mySloppySelectionType will be
1006  // set and only components of that type can be selected until selections
1007  // are cleared.
1008  unsigned mySloppyPickMask;
1009  GA_GroupType mySloppySelectionType;
1010  GA_GroupType mySloppyFallbackSelectionType;
1011  bool mySloppyPick;
1012  bool mySloppySelectionTypeIsSet;
1013 
1014  // When overriding the values indicated by the UI buttons for the
1015  // above, keep previous values so we can restore.
1016  bool myCustomSelValFlag;
1017  int mySavedSelType;
1018  int mySavedSelRule;
1019  int mySavedSelStyle;
1020  int mySavedFullSel;
1021  int mySavedAlwaysLocate;
1022 
1023  GEO_PrimTypeCompat::TypeMask myPrimMask; // polygon, nurbs, etc.
1024 
1025  // NB: The relative order of the selection infos only matters when the
1026  // individual selections have the same pick order set.
1027  UT_Array<OP3D_SelectionInfo> mySelectionInfos;
1028  UT_Map<InfoKey, int> mySelectionInfoLookup;
1029 
1030  UT_IntArray mySelectedInfoIndices;
1031  int myNextPickOrder;
1032 
1034  ScopeKey myScope;
1035 
1036  int myLastMouseDown; // needed for changed events
1037  int myLastMouseStartX; // " " " "
1038  int myLastMouseStartY; // " " " "
1039 
1040  bool myResizingCursor; // Cursor resize drag active.
1041 
1042  int myNodeIdForReselecting;// reselecting for this node
1043 
1044  bool myUseExistingTempSelection;
1045  bool myUseExistingCookSelection;
1046  bool myStashSelectionOnFinish;
1047  bool myInputRequiredFlag; // is an input op required?
1048  bool myAllowDragSelFlag; // allow box/lasso selecting?
1049  bool myFullSelFlag; // do only full selections?
1050  bool mySaveUndosFlag; // save undo information?
1051  bool myUseAsteriskToSelectAll; // use '*' to select all?
1052  bool myUsePrimsInEdgeSelectionFlag; // use primitives when
1053  // selecting edges (e.g. 0e1)
1054  bool myPickAtObjLevelFlag; // pick geo at OBJ level
1055  bool myAllowEdgeRingSelection;
1056  int myOffsetVertexMarkersOverride;
1057  int myOffsetVertexMarkersSaved;
1058 
1059  // Flag to track whether the auto converted selections stored in the
1060  // selection info have been set.
1061  bool myAutoConvertedSelectionsFlag;
1062 
1063  // After we finish selecting we must remember our type.
1064  PI_GeometryType myFinishGeometryType;
1065  int myFinishGroupTypeMenuVal;
1066 
1067  // Component type of current selection.
1068  PI_GeometryType myCurrentComponentType;
1069 
1070  // A flag to track whether this selector is currently updating the geometry
1071  // type buttons in setGeometryType().
1072  bool myUpdatingGeometryTypeButtons;
1073 
1074  bool myHadDoubleClick;
1075 
1076  struct InitialSelection
1077  {
1079  int index;
1080  UT_StringHolder selection_string;
1081  };
1082  UT_StringMap<InitialSelection> myInitialSelections;
1083 
1084  OP3D_InputSelectorUndoWorker *myUndoWorker;
1085  bool myOwnUndoWorker;
1086  PI_GeometryTypeArray myAllowedTypes;
1087 
1088  HeldHotkeyCacheUPtr myHeldHotkeyCache;
1089 
1090  // Utility for edge loops. The loop start pick is persistent across
1091  // multiple locate events, and so myLoopStartPickPath should be used
1092  // to identify the geometry to use with myLoopStartPick instead of
1093  // myLoopStartPick.getLookId() and myLoopStartPick.getDetailIndex().
1094  // To help avoid unnecessary lookups using the path, we track when
1095  // we've already updated the myLoopStartPick record to match the path
1096  // across extended operations in myLoopStartPickRecordMatchesPath.
1097  OP3D_EdgeLoopHelper *myEdgeLoopHelper;
1098  UT_String myLoopStartPickPath;
1099  GR_PickRecord myLoopStartPick;
1100  GR_PickRecord myLoopPrevPick;
1101  bool myLoopStartPickOnlyLocated;
1102  bool myLoopStartPickRecordMatchesPath;
1103  OP3D_ValidForPickFilter myValidForPickFilter;
1104  void *myValidForPickFilterData;
1105 
1106  LocateFilter myLocateFilter = nullptr;
1107  bool myAllowMultiPickLoopStart = false;
1108 
1109  // A map from SOP node ID and detail handle index to a helper class for
1110  // pattern selections.
1111  UT_Map<std::pair<int, int>, OP3D_PatternSelectHelper*> myPatternHelpers;
1112 
1113  // Drawable selection
1114  GUI_DetailLookPtr myDrawablePicker;
1115 };
1116 
1117 #endif
type
Definition: core.h:556
GT_API const UT_StringHolder selection
const UT_String & creatorStateName()
Definition of a geometry attribute.
Definition: GA_Attribute.h:198
UT_StringHolder myOpPath
myNodes
Definition: UT_RTreeImpl.h:708
GUI_GUSelectionProxyHandle myProxy
Unsorted map container.
Definition: UT_Map.h:109
bool operator==(const InfoKey &key) const
GU_SelectionHandle selection() const
virtual void generateAllSelectionStrings(UT_String &sel_string, bool only_one_gdp, bool force_numeric, bool consume_selections)
void startSelecting() override
virtual UI_Menu * getSelectorHotkeyMenu() const
UT_SharedPtr< GUI_GUSelectionProxy > GUI_GUSelectionProxyHandle
GLboolean * data
Definition: glcorearb.h:131
std::function< bool(DM_Viewport *)> LocateFilter
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
virtual bool handleDoubleClickEvent(UI_Event *event)
OP3D_SelectionAction
bool useExistingTempSelection() const
HeldHotkeyCacheUPtr & getHeldHotkeyCache()
void setAllowEdgeRingSelection(bool allow)
GLdouble s
Definition: glad.h:3009
void setUseAsteriskToSelectAll(bool onoff)
PI_GeometryType
GLint y
Definition: glcorearb.h:103
void stopSelecting() override
bool handleTransitoryKey(const UI_Event &event, int hotkey_id) override
void setSaveUndos(bool yesno)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
void updateProxy(GU_SelectionHandle sel, bool create)
virtual int handleMouseEvent(UI_Event *event)
OutGridT const XformOp bool bool
GA_GroupType myActiveType
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
struct _cl_event * event
Definition: glcorearb.h:2961
bool inputRequired() const
unsigned char uint8
Definition: SYS_Types.h:36
void setInputRequired(bool onoff)
virtual void generateAdditionalInputNodes(SOP_Node &, SOP_Node *, const UT_String &, const UT_String &)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
virtual int handleKeyEvent(int key, UI_Event *event, DM_Viewport &viewport)=0
void nodeIdForReselecting(int node_id)
GLintptr offset
Definition: glcorearb.h:665
bool setStateParm(const char *name, const UT_StringHolder &val) override
GU_SelectionRule
Definition: GU_SelectType.h:40
void setPrimMask(GEO_PrimTypeCompat::TypeMask primmask)
void setViewer(BM_View *viewer) override
void setUseExistingTempSelection(bool use_existing)
void doRender(RE_Render *r, int x, int y, int ghost) override
GLint GLuint mask
Definition: glcorearb.h:124
UT_String & currentPrompt()
UT_String & defaultPrompt()
virtual UI_Menu * getSelectorMenu() const =0
GA_API const UT_StringHolder drag
GLuint const GLchar * name
Definition: glcorearb.h:786
int hasLocates() const override
void setStashSelectionOnFinish(bool stash)
void setPickAtObjLevel(bool flag)
GLint GLenum GLint x
Definition: glcorearb.h:409
UT_SharedPtr< GU_Selection > GU_SelectionHandle
InfoKey(int node_id, int detail_index)
GLdouble t
Definition: glad.h:2397
void setUseExistingCookSelection(bool use_existing)
void setUseExistingSelection(bool use_existing)
Contains transitional objects to provide some backward compatibility for code that references old GEO...
GUI_DetailLook * getLook() const
virtual void addToSelection(UI_Event *event, const char *path, GU_SelectionHandle sel, GU_SelectResult &added_geo)
GLenum func
Definition: glcorearb.h:783
bool pressStateButton(const char *name) override
fpreal64 fpreal
Definition: SYS_Types.h:278
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition: GA_Types.h:161
GLuint index
Definition: glcorearb.h:786
OP3D_PatternDirection
void setOffsetVertexMarkersOverride(bool offset)
virtual void commitViewportPreSelection(UI_Event *event, GU_SelectionRule sel_rule)
bool getStashSelectionOnFinish() const
const UT_String & currentPrompt() const
void setUsePrimsInEdgeSelections(bool use_prims)
GLuint GLfloat * val
Definition: glcorearb.h:1608
GA_GroupType selectionType() const
UT_UniquePtr< DM_HeldHotkeyCache > HeldHotkeyCacheUPtr
bool getPickAtObjLevel() const
virtual void appendToLastNode(SOP_Node *&, const UT_String &, bool)
#define OP3D_API
Definition: OP3D_API.h:10
OP3D_SelectionManager::ComponentScopeKey ScopeKey
UT_SharedPtr< OP3D_GUSelectionSet > OP3D_GUSelectionSetHandle
const char * className() const override
virtual void setNodeParameters(OP_Node &)
void setAllowDragSelect(bool allow_drag)
GEO_PrimTypeCompat::TypeMask primMask() const override
GLsizei GLenum GLenum * types
Definition: glcorearb.h:2542
GLboolean r
Definition: glcorearb.h:1222
const UT_String & defaultPrompt() const
GU_SelectionHandle myAutoConvertedSelection
void setLocateFilter(LocateFilter filter)
virtual void getKeyResolveInfo(UI_KeyResolveInfo &info)=0
virtual void getSelectableLooks(GUI_DetailList &look_list)
bool useExistingSelection() const
OP3D_GUSelectionSetHandle mySelectionSet
bool getSloppyPick() const
void setCreatorStateName(const char *state_name)
bool evalStateParm(const char *name, UT_StringHolder &ret) override
void setAllowMultiPickLoopStart(bool allow)
Definition: format.h:1821
GA_API const UT_StringHolder area
bool useAsteriskToSelectAll() const
bool getStateParmNames(UT_StringArray &ret, const char *prefix=nullptr) override
bool(* OP3D_ValidForPickFilter)(void *data, GUI_DetailLook *look)
bool useExistingCookSelection() const
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1297
GR_PickStyle
Definition: GR_Defines.h:254
void setSelectFullGeometry(bool select_full)