HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Selection.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: GU_Selection (C++)
7  *
8  * COMMENTS:
9  * Base class of a gdp selection. This clas hides the actual type
10  * of selection (point, edge, primitive, etc)
11  *
12  */
13 
14 #ifndef __GU_Selection_h__
15 #define __GU_Selection_h__
16 
17 #include "GU_API.h"
18 #include "GU_SelectType.h"
19 #include "GU_Detail.h"
20 
21 #include <GA/GA_Breakpoint.h>
22 #include <GA/GA_Edge.h>
23 #include <GA/GA_GroupTypeTraits.h>
24 #include <GA/GA_Types.h>
25 #include <UT/UT_Map.h>
26 
27 class GA_BreakpointGroup;
28 class GEO_Primitive;
29 class GU_Detail;
30 class GU_Selection;
31 class UT_JSONWriter;
32 class UT_JSONParser;
33 
35 {
36 public:
38  : myPrimitive(0),
39  myPoint(GA_INVALID_OFFSET),
40  myVertex(GA_INVALID_OFFSET),
41  myDetail(0),
42  myGroupType(GA_GROUP_INVALID),
43  mySelectedNormal(false)
44  {}
46 
47  void setSelectedNormal(bool selected_normal)
48  { mySelectedNormal = selected_normal; }
49 
51  { return myBreakpoint; }
52  const GA_Edge &getEdge() const
53  { return myEdge; }
54  const GA_Primitive *getPrimitive() const
55  { return myPrimitive; }
56 
57  const GU_Detail *getDetail() const
58  { return myDetail; }
60  { return myPoint; }
61 
63  { return myVertex; }
64 
65  bool isSet() const
66  { return myGroupType != GA_GROUP_INVALID; }
68  { return myGroupType; }
69  bool getSelectedNormal() const
70  { return mySelectedNormal; }
71 
72  void clear()
73  {
74  myGroupType = GA_GROUP_INVALID;
75  mySelectedNormal = false;
76  }
77 
78 protected:
79  friend class GU_BreakpointSelection;
80  friend class GU_EdgeSelection;
81  friend class GU_PointSelection;
82  friend class GU_PrimSelection;
83  friend class GU_VertexSelection;
84  friend class GU_CookSelection;
85 
86  void set(const GA_Breakpoint &b, const GU_Detail *gdp)
87  {
88  myBreakpoint = b;
89  myDetail = gdp;
90  myGroupType = GA_GROUP_BREAKPOINT;
91  }
92  void set(const GA_Edge &e, const GA_Primitive *prim,
93  const GU_Detail *gdp)
94  {
95  myEdge = e;
96  myPrimitive = prim;
97  myDetail = gdp;
98  myGroupType = GA_GROUP_EDGE;
99  }
100  void set(const GA_Primitive *prim, const GU_Detail *gdp)
101  {
102  myPrimitive = prim;
103  myDetail = gdp;
104  myGroupType = GA_GROUP_PRIMITIVE;
105  }
106  void setPoint(GA_Offset ptoff, const GU_Detail *gdp)
107  {
108  myPoint = ptoff;
109  myDetail = gdp;
110  myGroupType = GA_GROUP_POINT;
111  }
112  void setVertex(GA_Offset vtxoff, const GU_Detail *gdp)
113  {
114  myVertex = vtxoff;
115  myDetail = gdp;
116  myGroupType = GA_GROUP_VERTEX;
117  }
118 
119 private:
120  GA_Breakpoint myBreakpoint;
121  GA_Edge myEdge;
122  const GA_Primitive *myPrimitive;
123  GA_Offset myPoint;
124  const GU_Detail *myDetail;
125  GA_Offset myVertex;
126  GA_GroupType myGroupType;
127  bool mySelectedNormal;
128 };
129 
131 {
132 public:
134  { }
136  { }
137 };
138 
140 {
141 public:
142  virtual ~GU_Selection();
143 
144  // Return a new selection of the specified type. The creator prefix and
145  // the suffix are used in naming the primitive and point groups of the
146  // selection.
147  // FIXME: Rename to 'create'
149  static GU_SelectionHandle newSelection(GU_SelectionType stype);
151  static GU_SelectionHandle newSelection(GA_GroupType type);
152  static GU_SelectionHandle newSelection(const GU_Detail &dst_gdp,
153  const GU_Detail &src_gdp,
154  const GU_Selection &src_sel);
155 
156  // NB: Intended for use by GU_Detail only.
157  //
158  // Return a handle to a new GU_CookSelection of the specified type in the
159  // supplied detail.
160  // NB: This selection must be orphaned if still around when this detail
161  // is deleted.
162  static GU_SelectionHandle newCookSelection(GU_Detail &gdp,
163  GA_GroupType type,
164  bool ordered);
165 
166  // NB: Intended for use by GU_Detail only.
167  //
168  // Return a handle to a new GU_CookSelection that references the supplied
169  // group instead of creating one itself. No changes will be made to this
170  // group by the selection. If any changes are necessary to the selection,
171  // it will create a copy of this group first.
172  // NB: This selection must be orphaned if still around when this detail
173  // or group is deleted, so be very careful.
174  static GU_SelectionHandle newCookSelection(GU_Detail &gdp,
175  GA_Group &group);
176 
177  // Copy the contents of one selection to another, doing any conversions
178  // that are necessary. This assumes that they are from the same gdp.
179  virtual void assign(const GU_Detail &src_gd,
180  const GU_Selection &src_sel) = 0;
181 
182  // Called by GR_PickSelection to modify this selection based on user
183  // selected components in the viewport. The first edge to be added to us
184  // (if any), is returned in 'added', and so is the pickid unless the
185  // pointer to is is zero.
186  virtual bool select(const GU_Detail &gd,
187  uint id1, uint id2, uint id3,
188  GU_SelectionRule rule,
189  GU_SelectResult &added,
190  GU_SelectFinishData *&finish_data) = 0;
191  // After one or more calls to select(), GR_PickSelection will call
192  // selectFinish to give the selection a change to apply any changes
193  // it stored in the finish_data parameter.
194  virtual bool selectFinish(const GU_Detail &gd,
195  GU_SelectionRule rule,
196  GU_SelectResult &added,
197  GU_SelectFinishData *finish_data)
198  { UT_ASSERT(!finish_data); return 0; }
199 
200  // Determines if the supplied ids represent a valid component within
201  // the existing selection, or that could be added to the selection.
202  virtual bool testSelect(const GU_Detail &gd,
203  uint id1, uint id2, uint id3,
204  bool accept_existing,
205  bool accept_new,
206  GU_SelectResult &result) const = 0;
207 
208  // Find the actual point picked in the selection: this could be a GEO
209  // point, a point on a normal, curve, edge, etc. 'added' indicates
210  // what has been picked. 'pickid' is the type of hit that generated the
211  // pick, and 'xsect' is the picked point (to be found). The methods return
212  // 1 if xsect can be determined and 0 otherwise. If the 'xsect' is not
213  // found, the 2nd method computes the bounding box of 'added' and returns
214  // that one instead.
215  virtual bool selectionPoint(const GU_SelectResult &added,
216  UT_Vector3 &xsect) const = 0;
217  virtual bool selectionPoint(const GU_SelectResult &added,
218  UT_Vector3 rayorig,
219  UT_Vector3 &raydir,
220  UT_Vector3 &xsect,
221  bool &normal,
222  UT_Vector3 &vector,
223  bool accurate,
224  float *u, float *v) const = 0;
225 
226  // Select the contents of the group even if the group type does not
227  // match our type. Return 1 if the selection has changed, 0 otherwise.
228  // Subclasses should implement overrides that intelligently handle
229  // groups that match our selection type.
230  bool modifyGroup(const GU_Detail &gd,
231  const GA_Group &group,
232  GU_SelectionRule rule);
233  // Fairly direct access to the group token list. Use with caution or
234  // you'll end up with a group token list that doesn't match your actual
235  // selection.
236  void modifyGroupToken(const char *token,
237  GU_SelectionRule rule);
238  // Initialize this selection to a combination of groups (named in the
239  // group_string) which have already been combined into a group. This
240  // is used when reselecting a SOP with a group parm containing only
241  // group names.
242  void initGroupString(const GU_Detail &gd,
243  const GA_Group &group,
244  const char *group_string);
245  // Get or control the use of group tokens in this selection.
246  bool getGroupTokenString(UT_WorkBuffer &buf) const;
247  bool getGroupTokensValid() const
248  { return myGroupTokensValid; }
249  // Force the selection to maintain its group token list and valid flag.
250  // This should always be a temporary setting for the duration of one or
251  // more selection changes that are known to preserve the group token
252  // validity.
253  void setGroupTokensLock(bool lock);
254 
255  // Modify a geometric entity on this selection. If the type being modified
256  // does not correspond to the selection type, the selection will
257  // interpret the modification to the best of its abilities (e.g. removing
258  // a point from a primitive selection will remove all primitives that share
259  // that point; adding a point to a primitive selection, will select all
260  // primitives that shared that point; and so forth).
261  virtual bool modifyPoint(const GU_Detail &gd, GA_Offset ptoff,
262  GU_ModifyType type) = 0;
263  virtual bool modifyVertex(const GU_Detail &gd, GA_Offset vtxoff,
264  GU_ModifyType type) = 0;
265  virtual bool modifyPrimitive(const GU_Detail &gd, GA_Offset primoff,
266  GU_ModifyType type) = 0;
267 
268  virtual bool modifyEdge(const GU_Detail &gd, const GA_Edge &edge,
269  const GEO_Primitive *prim,
270  GU_ModifyType type) = 0;
271  virtual bool modifyBreakpoint(const GU_Detail &gd,
272  const GA_Breakpoint &bkp,
273  GU_ModifyType type) = 0;
274 
275  /// Call this method once mass-modifications are finished with the above
276  // modify* methods, but only if any of them returned \c true.
277  void modifyDone(const GU_Detail &gd);
278 
279  // Low level function to append an element assuming you already know the
280  // selection type supports it. Currently only supported subclasses:
281  // GU_PointSelection, GU_PrimSelection, GU_EdgeSelection
282  virtual bool appendElem(GA_Index id1,
286  { return false; }
287  // Any set of appendElem() calls must be end with appendDone() call
288  // NOTE: No validation!
289  void appendDone()
290  { updateRevision(); }
291 
292  // Select all the points in the gdp. Return 1 if the selection has changed
293  // and 0 otherwise.
294  virtual bool selectAll(const GU_Detail &gd) = 0;
295 
296  // Toggle the selection. Return true if something has been toggled and 0
297  // otherwise.
298  virtual bool toggleAll(const GU_Detail &gd) = 0;
299 
300  /// This method is used to select the boundary. Not valid for all selection
301  /// types.
302  virtual bool selectBoundary(const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname = "uv"_UTsh) = 0;
303  virtual bool growSelection(const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname = "uv"_UTsh) = 0;
304  virtual bool shrinkSelection(const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname = "uv"_UTsh) = 0;
305 
306  // Filter the selection based on primitive coverage.
307  virtual bool filterByPrimitiveMask(const GU_Detail &gd,
308  const GA_PrimitiveTypeMask &mask) = 0;
309 
310  // The following methods are used for selected front/back facing faces
311  // (in the UV sense).
312  bool uvSelectAllFrontFace(const GU_Detail &gd, const UT_StringHolder &uvattribname = "uv"_UTsh)
313  { return uvSelectAllByWindingUsingClosure(gd, true, false, uvattribname); }
314  bool uvSelectAllBackFace(const GU_Detail &gd, const UT_StringHolder &uvattribname = "uv"_UTsh)
315  { return uvSelectAllByWindingUsingClosure(gd, false, true, uvattribname); }
316 
317  // Return a group for the current selection.
318  virtual const GA_PointGroup *points(const GU_Detail &gd) const = 0;
319  virtual const GA_PrimitiveGroup *primitives(const GU_Detail &gd) const = 0;
320  virtual const GA_VertexGroup *vertices(const GU_Detail &gd) const = 0;
321  virtual const GA_EdgeGroup *edges(const GU_Detail &gd) const = 0;
322  virtual const GA_BreakpointGroup *breakpoints(const GU_Detail &gd) const = 0;
323 
324  /// These functions provide a fast path to check for existence. They only
325  /// work for the selection type their name indicates they should work for.
326  /// No translation is done for other types and those will return \c false.
327  virtual bool hasPointIndex(GA_Index index) const { return false; }
328  virtual bool hasPrimitiveIndex(GA_Index index) const { return false; }
329  virtual bool hasVertexIndex(GA_Index index) const { return false; }
330  virtual bool hasEdgeIndexPair(GA_Index p0, GA_Index p1) const
331  { return false; }
332  virtual bool hasPrimEdgeIndexSet(GA_Index p0, GA_Index p1, GA_Index pr) const
333  { return false; }
334  virtual bool hasBreakpointIndexSet(GA_Index prim_index, int u_index,
335  int v_index = -1) const { return false; }
336 
337  // Returns the group containing the selection.
338  virtual const GA_Group *mainGroup(const GU_Detail &gd) const = 0;
339 
340  /// Returns a group for this selection, of the given group type. If the
341  /// selection is not of that type, then the selection will return a
342  /// best-case conversion of the selection from the original type.
343  const GA_Group *group(const GU_Detail &gd,
344  GA_GroupType type);
345 
346  // Just clear the bits of the groups, or destroy the internal groups and
347  // arrays too.
348  virtual void clear();
349  virtual void clearAndDestroy();
350 
351  // How many entries does the selection contain?
352  virtual GA_Size entries() const = 0;
353 
354  // Compute the bounding box of the selection, and return \c false if the box
355  // is empty and \c true otherwise.
356  virtual bool getBoundingBox(const GU_Detail &gd,
357  UT_BoundingBox &bbox) const = 0;
358  virtual bool getBoundingBox(const GU_Detail &gd,
359  UT_BoundingBox &bbox,
360  const UT_Matrix4R &transform) const = 0;
361 
362  // Compute the UV bounding box of the selection, and return \c false if the
363  // box is empty.
364  virtual bool getBoundingBoxUV(const GU_Detail &gd,
365  UT_BoundingBox &bbox,
366  const char *name,
367  int isvertex) const = 0;
368 
369  /// Save/load the contents of the selection
370  bool save(UT_JSONWriter &w) const;
371  bool load(UT_JSONParser &p, bool restore_id_and_rev = true);
372 
373  // Human-readable output of the selection for debugging purposes
374  void dump(std::ostream &os) const;
375 
376  // Query the type of selection:
377  virtual GA_GroupType classType() const = 0;
378 
379  // Creates a duplicate selection identical to this one in the passed in
380  // gdp.
381  virtual GU_Selection *clone() = 0;
382 
383  // Generate a string to represent the selection. This string is formatted
384  // for use in SOP Group parameters. If the selection was built using
385  // group or attribute tokens, those tokens will be returned unless the
386  // force_numeric field is set to true.
387  bool generateSelectionString(UT_String &sel_string,
388  const GU_Detail &gdp,
389  bool ordered,
390  bool collapse_where_possible,
391  bool use_ast_to_select_all,
392  bool force_numeric,
393  GA_Index prim_offset = 0,
394  GA_Index point_offset = 0) const;
395 
396  // Generate a string to represent a single member of the selection. This
397  // string is formatted for use in SOP Group parameters. This method does
398  // not care if the selection was built using group or attribute tokens.
399  // A negative element_index argument will be interpreted as specifying the
400  // last element. Returns whether or not an element string was generated.
401  bool generateElementString(UT_String &sel_string,
402  const GU_Detail &gdp,
403  exint element_index,
404  GA_Index prim_offset = 0,
405  GA_Index point_offset = 0) const;
406 
407  // Flags that control edge selections and whether or not they should include
408  // primitive ids. These are only handled by Edge selectors.
409  virtual void setUsePrimEdges(bool /*use_prim_edges*/) { }
410  virtual bool getUsePrimEdges() const { return false; }
411 
412  void setPickPath(const UT_StringHolder &p) { myPickPath = p; }
413  UT_StringHolder pickPath() const { return myPickPath; }
414 
415  void setPickOrder(int pick_order) { myPickOrder = pick_order; }
416  int pickOrder() const { return myPickOrder; }
417  void resetPickOrder() { myPickOrder = -1; }
418 
419  /// Selection id and revision
420  int getId() const { return myId; }
421  int getRevision() const { return myRevision; }
422 
423  /// Return an approximation of how much memory we use
424  virtual int64 getMemoryUsage(bool inclusive) const
425  {
426  int64 mem = inclusive ? sizeof(*this) : 0;
427  mem += myGroupTokens.getMemoryUsage(true);
428  return mem;
429  }
430 
431 protected:
432  /// Validate the current selection against the given detail. This will
433  /// prune out any selection components that are invalid against the detail
434  /// given. Call this prior to, or after, a mass modification via calls to
435  /// modify*(). Those calls do not do any verification of the current
436  /// selection, for performance reasons. Returns \c true if the selection
437  /// was already valid and no entries were eliminated.
438  virtual bool validate(const GU_Detail &gd) = 0;
439 
440  /// Convenience method to make/clear ordered status of a group
441  static inline void setOrdered(GA_ElementGroup &g, bool ordered)
442  {
443  if (ordered)
444  g.makeOrdered();
445  else
446  g.clearOrdered();
447  }
448 
449  GU_Selection(const GU_Selection &s);
450 
451  virtual bool uvSelectAllByWindingUsingClosure(
452  const GU_Detail &gd,
453  bool front_facing,
454  bool back_facing,
455  const UT_StringHolder &uvattribname);
456 
457  virtual bool modifyMatchingGroup(const GU_Detail &gd,
458  const GA_Group &group,
459  GU_SelectionRule rule) = 0;
460 
461  static const GA_PrimitiveGroup *hiddenPrimitives(const GU_Detail &gd);
462 
464  {
465  myRevision++;
466  if (!myGroupTokensLock && myGroupTokensValid)
467  {
468  myGroupTokensValid = false;
469  myGroupTokens.clear();
470  }
471  }
472 
473  // WARNING: PLEASE DO NOT CALL THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
474  void forceSpecificRevision(int revision)
475  {
476  myRevision = revision;
477  }
478 
479 
480 protected:
481  // Class constructor and destructor. The prefix is used for naming the
482  // two internal groups, myPoints, myPrims.
483  GU_Selection();
484 
485  /// @}
486  /// @{
487  /// Save/load class specific data elements.
488  virtual bool saveElements(UT_JSONWriter &w) const = 0;
489  virtual bool loadElements(UT_JSONParser &p) = 0;
490  /// @}
491 
492  template<typename T>
493  inline T &getGroup(const GU_Detail &gd, bool &needs_update) const
494  {
495  return static_cast<T &>(getGroup(gd,
497  needs_update));
498  }
499 
500  UT_Lock &updateLock() const { return myUpdateLock; }
501 
502  static GU_Selection *allocSelection(GA_GroupType type);
503 
504 private:
505  GA_Group &getGroup(const GU_Detail &gd,
506  GA_GroupType type, bool &needs_update) const;
507 
508  UT_StringArray myGroupTokens;
509  bool myGroupTokensValid;
510  bool myGroupTokensLock;
511 
512  UT_StringHolder myPickPath;
513  int myPickOrder;
514 
515  int myId;
516  int myRevision;
517 
518  struct GroupCacheEntry
519  {
520  GroupCacheEntry() : myDetailId(-1), myRevision(-1), myElementCount(-1) {}
521  exint myDetailId;
522  int myRevision;
523  GA_Size myElementCount;
524  UT_SharedPtr<GA_Group> myGroup;
525  };
526  typedef UT_Map<GA_GroupType, GroupCacheEntry> GroupCache;
527  mutable GroupCache myGroupCache;
528 
529  mutable UT_Lock myUpdateLock;
530  static SYS_AtomicInt32 theUniqueSelectionId;
531 };
532 
533 #endif
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
void setSelectedNormal(bool selected_normal)
Definition: GU_Selection.h:47
void resetPickOrder()
Definition: GU_Selection.h:417
GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glad.h:2676
void forceSpecificRevision(int revision)
Definition: GU_Selection.h:474
bool getSelectedNormal() const
Definition: GU_Selection.h:69
const GLdouble * v
Definition: glcorearb.h:837
void appendDone()
Definition: GU_Selection.h:289
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
const GU_Detail * getDetail() const
Definition: GU_Selection.h:57
GLboolean GLboolean g
Definition: glcorearb.h:1222
int64 exint
Definition: SYS_Types.h:125
GLdouble s
Definition: glad.h:3009
void clearOrdered()
Clear all order information, including any mixed entries.
JSON reader class which handles parsing of JSON or bJSON files.
Definition: UT_JSONParser.h:87
virtual bool hasBreakpointIndexSet(GA_Index prim_index, int u_index, int v_index=-1) const
Definition: GU_Selection.h:334
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:37
**But if you need a result
Definition: thread.h:613
GA_Offset getVertexOffset() const
Definition: GU_Selection.h:62
static void setOrdered(GA_ElementGroup &g, bool ordered)
Convenience method to make/clear ordered status of a group.
Definition: GU_Selection.h:441
int getRevision() const
Definition: GU_Selection.h:421
UT_Lock & updateLock() const
Definition: GU_Selection.h:500
UT_StringHolder pickPath() const
Definition: GU_Selection.h:413
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:235
#define GA_INVALID_OFFSET
Definition: GA_Types.h:678
virtual ~GU_SelectFinishData()
Definition: GU_Selection.h:135
GA_Offset getPointOffset() const
Definition: GU_Selection.h:59
virtual bool appendElem(GA_Index id1, GA_Index id2=GA_INVALID_INDEX, GA_Index id3=GA_INVALID_INDEX, GA_Index id4=GA_INVALID_INDEX)
Definition: GU_Selection.h:282
GA_Size GA_Offset
Definition: GA_Types.h:641
virtual void setUsePrimEdges(bool)
Definition: GU_Selection.h:409
virtual bool hasPointIndex(GA_Index index) const
Definition: GU_Selection.h:327
vint4 select(const vbool4 &mask, const vint4 &a, const vint4 &b)
Definition: simd.h:4816
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
GU_SelectionRule
Definition: GU_SelectType.h:40
void set(const GA_Breakpoint &b, const GU_Detail *gdp)
Definition: GU_Selection.h:86
const GA_Edge & getEdge() const
Definition: GU_Selection.h:52
GLint GLuint mask
Definition: glcorearb.h:124
Type traits base class for group type traits.
long long int64
Definition: SYS_Types.h:116
const GA_Breakpoint & getBreakpoint() const
Definition: GU_Selection.h:50
void setVertex(GA_Offset vtxoff, const GU_Detail *gdp)
Definition: GU_Selection.h:112
bool uvSelectAllFrontFace(const GU_Detail &gd, const UT_StringHolder &uvattribname="uv"_UTsh)
Definition: GU_Selection.h:312
#define GU_API
Definition: GU_API.h:14
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
Definition: GA_Types.h:635
GA_API const UT_StringHolder transform
virtual bool hasPrimitiveIndex(GA_Index index) const
Definition: GU_Selection.h:328
UT_SharedPtr< GU_Selection > GU_SelectionHandle
T & getGroup(const GU_Detail &gd, bool &needs_update) const
Definition: GU_Selection.h:493
GU_SelectionType
Definition: GU_SelectType.h:29
bool getGroupTokensValid() const
Definition: GU_Selection.h:247
const GA_Primitive * getPrimitive() const
Definition: GU_Selection.h:54
void updateRevision()
Definition: GU_Selection.h:463
void set(const GA_Edge &e, const GA_Primitive *prim, const GU_Detail *gdp)
Definition: GU_Selection.h:92
virtual int64 getMemoryUsage(bool inclusive) const
Return an approximation of how much memory we use.
Definition: GU_Selection.h:424
virtual bool hasEdgeIndexPair(GA_Index p0, GA_Index p1) const
Definition: GU_Selection.h:330
void set(const GA_Primitive *prim, const GU_Detail *gdp)
Definition: GU_Selection.h:100
virtual bool getUsePrimEdges() const
Definition: GU_Selection.h:410
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition: GA_Types.h:160
int getId() const
Selection id and revision.
Definition: GU_Selection.h:420
GLuint index
Definition: glcorearb.h:786
virtual bool hasVertexIndex(GA_Index index) const
Definition: GU_Selection.h:329
#define GA_INVALID_INDEX
Definition: GA_Types.h:677
bool isSet() const
Definition: GU_Selection.h:65
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
int pickOrder() const
Definition: GU_Selection.h:416
GU_ModifyType
Definition: GU_SelectType.h:59
GA_GroupType getSelectType() const
Definition: GU_Selection.h:67
void setPickPath(const UT_StringHolder &p)
Definition: GU_Selection.h:412
type
Definition: core.h:1059
void setPoint(GA_Offset ptoff, const GU_Detail *gdp)
Definition: GU_Selection.h:106
void setPickOrder(int pick_order)
Definition: GU_Selection.h:415
unsigned int uint
Definition: SYS_Types.h:45
virtual bool selectFinish(const GU_Detail &gd, GU_SelectionRule rule, GU_SelectResult &added, GU_SelectFinishData *finish_data)
Definition: GU_Selection.h:194
virtual bool hasPrimEdgeIndexSet(GA_Index p0, GA_Index p1, GA_Index pr) const
Definition: GU_Selection.h:332
bool uvSelectAllBackFace(const GU_Detail &gd, const UT_StringHolder &uvattribname="uv"_UTsh)
Definition: GU_Selection.h:314