HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_Primitive.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: Geometry Library (C++)
7  *
8  * COMMENTS:
9  * The className method is used for saving/loading so there should
10  * be no spaces in the name.
11  *
12  */
13 
14 #pragma once
15 
16 #ifndef __GEO_Primitive_H__
17 #define __GEO_Primitive_H__
18 
19 #include "GEO_API.h"
20 #include <iosfwd>
21 #include <UT/UT_Matrix4.h>
22 #include <UT/UT_BoundingBox.h>
23 #include <UT/UT_BoundingSphere.h>
24 #include <GA/GA_Primitive.h>
25 #include <GA/GA_AttributeRef.h>
26 #include "GEO_PrimType.h"
27 
28 class GA_AttributeRefMap;
29 class GA_Detail;
32 class GEO_ConvertParms;
33 class GEO_Detail;
34 class GEO_MetaPrim;
35 class GEO_Vertex;
36 
37 template<typename T, bool B> class GA_EdgeT;
39 
41 
43 {
44 protected:
45  /// NOTE: The constructor should only be called from subclass
46  /// constructors.
49  : GA_Primitive(*d, offset)
50  {}
51 
52  /// NOTE: The destructor should only be called from subclass
53  /// destructors; only GEO_Detail::destroyStashed() should be
54  /// calling delete on GEO_Primitive pointers, and GEO_Detail
55  /// is a friend.
56  ~GEO_Primitive() override {}
57 
58 public:
59  GA_PrimCompat::TypeMask getPrimitiveId() const override;
60 
61  /// Copy attribute data from the source primitive. Also, copy over all the
62  /// group membership information from the source primitive.
64  bool copy_groups=true)
65  {
66  copyAttributeData(src);
67  if (copy_groups)
68  copyGroupMembership(src);
69  }
71  GA_AttributeRefMap &gah,
72  bool copy_groups=true)
73  {
74  copyAttributeData(src, gah);
75  if (copy_groups)
76  copyGroupMembership(src);
77  }
78  /// NOTE: The copying of groups only works if src is in the same detail
80  GA_PrimitiveWrangler &wrangler,
81  bool copy_groups=true)
82  {
83  copyAttributeData(src, wrangler);
84  if (copy_groups)
85  copyGroupMembership(src);
86  }
87 
88  /// Copy the attribute data over from the source primitive. Often you will
89  /// want to call copyAttributesAndGroups() instead.
90  void copyAttributeData(const GEO_Primitive &src);
91  void copyAttributeData(const GEO_Primitive &src,
92  GA_AttributeRefMap &gah);
93  void copyAttributeData(const GEO_Primitive &src,
94  GA_PrimitiveWrangler &wrangler);
95 
96  void copyAttributeValues(const GEO_Primitive &src,
97  GA_PrimitiveWrangler &wrangler);
98 
99  /// Copy the group membership from the source primitive to the current
100  /// primitive. Both primitives must be in the same detail.
101  void copyGroupMembership(const GEO_Primitive &src);
102 
103  // NOTE: The point *indices* will be the same as in src.
104  // If this and src are in the same detail, this means that
105  // the point offsets will also be the same. There must be
106  // sufficient points in this' detail.
107  // NOTE: To remap the points, you can iterate through the vertices
108  // of the primitive after copying, and call getPointOffset
109  // and setPointOffset.
110  //
111  // copyPrimitive(), unlike copy(), will not copy the primitive attributes.
112  // (see copyAttributeData() or copyAttributesAndGroups()).
113 #if GA_PRIMITIVE_VERTEXLIST
114  virtual void copyPrimitive(const GEO_Primitive *src);
115 #else
116  virtual void copyPrimitive(const GEO_Primitive *src)=0;
117 #endif
118  virtual GEO_Primitive *copy(int preserve_shared_pts = 0) const;
119 
120  // Transforms the matrix associated with this primitive. The
121  // translate component is ignored: Translate the vertices of
122  // the primitive to translate the primitive.
123  // This only works with quadrics (sphere, tube, metaballs) and volumes.
124  virtual void transform(const UT_Matrix4 &);
125 
126  // Convert the real domain values of the primitive to unit values to be
127  // used in the evaluation methods below:
128  virtual void realToUnitPair(float ureal, float vreal,
129  float &uunit, float &vunit) const;
130 
131  // Convert the unit values of the primitive to the real domain values
132  virtual void unitToRealPair(float uunit, float vunit,
133  float &ureal, float &vreal) const;
134 
135  // Map the normalized length (distance value [0,1]) parameter to the unit
136  // parameterization of the primitve
137  virtual void unitLengthToUnitPair(float ulength, float vlength,
138  float &uparm, float &vparm)const;
139  virtual void unitLengthToUnitPair(float ulength, float vlength,
140  float &uparm, float &vparm, float tolerance)const;
141 
142  virtual void unitToUnitLengthPair(float uparm, float vparm,
143  float &ulength, float &vlength)
144  const;
145 
146  // Evaluate a set of attributes at the bary center of the primitive,
147  // returning true on success, false on failure.
148  bool evaluateBaryCenter(GA_Offset result_vtx,
149  GA_AttributeRefMap &map) const
150  { return evaluateBaryCenterRefMap(result_vtx, map); }
151 
152  // Evaluate a set of attributes at a u,v position. Optionally, evaluate
153  // the derivative in the u or v direction.
154  // The method returns true if the point could be evaluated
155  bool evaluatePoint(GA_Offset result_vtx,
156  GA_AttributeRefMap &map,
157  fpreal u, fpreal v=0,
158  uint du=0, uint dv=0) const
159  { return evaluatePointRefMap(result_vtx, map, u, v, du, dv); }
160 
161  // Evaluate the position, the derivative or the normal at domain point
162  // (u,v), where u and v MUST be in [0,1]. "v" and "dv" will be ignored
163  // when dealing with one-dimensional types such as circles and polygons.
164  // Return 0 if OK and -1 otherwise. The normal is not normalized.
165  int evaluatePoint( UT_Vector4 &pos, float u, float v = 0,
166  unsigned du=0, unsigned dv=0) const
167  { return evaluatePointV4(pos, u, v, du, dv); }
168 
169  virtual int evaluateNormalVector(UT_Vector3 &nml, float u,
170  float v = 0, float w = 0) const;
171 
172  // Evaluate the position at domain point (u,v) in the interior of the
173  // geometry. This calls evaluatePoint by default, but has a different
174  // implementation for triangles and quadrilaterals, where barycentric
175  // coords or bilinear interpolants are used to get an interior point,
176  // rather than a point on the perimeter of the poly. This was added
177  // so particles can stick to triangles and quads.
179  GA_AttributeRefMap &map,
180  fpreal u, fpreal v, fpreal w = 0) const
181  { return evaluateInteriorPointRefMap(
182  result_vtx, map, u, v, w); }
184  fpreal u, fpreal v, fpreal w = 0) const
185  { return evaluateInteriorPointV4(pos, u, v, w); }
186 
187 
188  /// Finds the weightings of the vertices that will compute an interior
189  /// point given the u,v,w coordinates. The offsets are into the gdp's
190  /// vertex list, not indices into this primitive's vertex list.
191  /// Weights are normalized.
192  /// Note this cannot be used to recover the Position as it often has
193  /// special case logic (as in spheres, or rational splines), in those
194  /// cases use evaluateInteriorPoint(UT_Vector4 &pos, ...)
195  /// It has the advantage over the other evaluateInteriorPoints in that
196  /// it allows you to avoid creating any temporary vertices.
197  /// Behaviour for non-sublcassed types is to return the 0th vertex.
198  virtual void computeInteriorPointWeights(
199  UT_Array<GA_Offset> &vtxlist,
200  UT_Array<float> &weightlist,
201  fpreal u, fpreal v, fpreal w) const;
202 
204  {
205  // We cannot do a static_cast because we have only forward
206  // declared GEO_Detail and GA_Detail
207  return reinterpret_cast<GEO_Detail *>(&getDetail());
208  }
209  static GA_PrimCompat::TypeMask getPrimitiveMaskH9(const char *maskstr);
210 
211  /// Compute the bounding box of the primitive. Return 0 if unable to
212  /// compute bounds (1 on successful computation).
213  /// This function should always initialize bbox, even if returning false,
214  /// in which case, the bbox->isValid() may be false, representing an
215  /// empty bounding box.
216  /// This function should also not use any initial value of bbox,
217  /// so it does not need to be initialized beforehand.
218  virtual bool getBBox(UT_BoundingBox *bbox) const = 0;
219 
220  /// Compute the bounding box of the VISIBLE parts of the primitive.
221  /// Default implementation delegates to getBBox(). Override this in
222  /// subclasses for special handling.
223  ///
224  /// This function should always initialize bbox, even if returning false,
225  /// in which case, the bbox->isValid() may be false, representing an
226  /// empty bounding box.
227  /// This function should also not use any initial value of bbox,
228  /// so it does not need to be initialized beforehand.
229  virtual bool getVisibleBBox(UT_BoundingBox *bbox) const;
230 
231  /// @{
232  /// If the attribute is "P" the base-class will call getBBox()
233  bool enlargeBoundingBox(
235  const GA_Attribute *p) const override;
236  bool enlargeBoundingBox(
237  UT_BoundingBox &b,
238  const GA_Attribute *p) const override;
239  /// @}
240 
241  /// Enlarge a bounding box by the visible bounding box of the primitive.
242  ///
243  /// A return value of false indicates an error in the operation, most
244  /// likely an invalid P. By default, it merely calls enlargeBoundingBox()
245  bool enlargeVisibleBoundingBox(
246  UT_BoundingBox &b,
247  const GA_Attribute *P) const override;
248 
249  /// Return a normal vector for the primitive
250  virtual UT_Vector3 computeNormal() const = 0;
251  virtual UT_Vector3D computeNormalD() const = 0;
252 
253  /// Reverse the order of vertices
254  void reverse() override = 0;
255 
256  /// Return the center of the primitive. This defaults to the center of the
257  /// bounding box. A better approximation might be the average value of the
258  /// vertex positions (which could be different).
259  virtual UT_Vector3 baryCenter() const;
260  virtual UT_Vector3D baryCenterD() const;
261  template <typename T>
263  {
264  if constexpr(std::is_same<T, float>::value)
265  return baryCenter();
266  else
267  return baryCenterD();
268  }
269 
270  /// Enlarge the bounding sphere with the primitive's bounds.
271  /// By default, this will enlarge the bounding sphere by the primitive's
272  /// bounding box (i.e. getBBox()). It may be possible to have a tighter
273  /// bound (i.e. the vertex hull for many primitives is a much better
274  /// metric).
275  virtual void addToBSphere(UT_BoundingSphere *bsphere) const;
276 
277  /// Method to isolate a pasted surface
278  virtual void isolate() { /* No implementation here. */ }
279 
280  // Take the whole set of points into consideration when applying the
281  // point removal operation to this primitive. The method returns 0 if
282  // successful, -1 if it failed because it would have become degenerate,
283  // and -2 if it failed because it would have had to remove the primitive
284  // altogether.
285  virtual int detachPoints (GA_PointGroup &grp) = 0;
286 
287  bool hasEdge(const GA_Edge &edge) const override;
288 
289  /// These functions are only implemented to get guide points/edges
290  /// for spheres, tubes, and circles. The ID meaning is type-specific.
291  /// @{
292  virtual bool hasGuideEdge(int edgeid, UT_Vector3 &a,
293  UT_Vector3 &b) const;
294  virtual bool hasXsectPoint(int pointid, UT_Vector3 &p) const;
295  /// @}
296 
297  /// Apply the function to each vertex of the primitive. Break
298  /// when the function returns true. Return the value
299  /// of the last function applied (false if never called).
300 #if !GA_PRIMITIVE_VERTEXLIST
301  virtual bool vertexApply(bool (*apply)(GA_Offset vtx, void *),
302  void *data = 0) const;
303 #endif
304 
305  SYS_DEPRECATED_HDK(13.0)
306  GEO_Vertex getVertexElement(GA_Size i) const;
307 
308 //
309 // Method to get the tessera data for meta-primitives
310  virtual GEO_MetaPrim *castToMetaPrim();
311  virtual const GEO_MetaPrim *castToMetaPrim() const;
312 
313  // Return the surrounding values of the real-space u,v parameters.
314  // Returns 1 if succesful, 0 if out-of-range.
315 
316  virtual int parametricBBox(float u, float v,
317  float *u0, float *u1,
318  float *v0, float *v1);
319 
320  // Returns distance between two points in parameter space, aware
321  // of any possible wrapping.
322  virtual float uvDist(float u1, float v1, float u2, float v2) const;
323 
324  // Intersects a ray with the bounding box, iteratively growing it until
325  // an intersection is found or maxtries is reached.
326  int bboxIntersectRay(const UT_Vector3 &rayorig,
327  const UT_Vector3 &raydir,
328  int maxtries = 10,
329  float tmax = 1E17F,
330  float *distance = 0,
331  UT_Vector3 *nml=0) const;
332 
333  /// @{
334  /// If the method isn't known, or doesn't make sense, we return 0.
335  fpreal calcVolume(const UT_Vector3 &) const override
336  { return 0; }
337  fpreal calcArea() const override { return 0; }
338  fpreal calcPerimeter() const override { return 0; }
339  /// @}
340 
341  // Is this primitive a GEO_Quadric?
342  virtual bool isQuadric() const { return false; }
343 
344  // Compute normals on points using a subclass of NormalComp. This
345  // class receives the point offset and vertex normal at that point, and
346  // will either add or subtract the normal from the existing data.
347  template <typename T>
348  class NormalCompT {
349  public:
350  virtual ~NormalCompT() {}
351  virtual void add(GA_Offset offset, const UT_Vector3T<T> &nml) {}
352  virtual void sub(GA_Offset offset, const UT_Vector3T<T> &nml) {}
353  };
354 
355  // Compute point normals into an array, indexed by the point order
356  // number
357  template <typename T>
358  class NormalCompArrayT : public NormalCompT<T> {
359  public:
361  : myGdp(gdp)
362  , myOutput(output) {}
363  void add(GA_Offset offset, const UT_Vector3T<T> &nml) override
364  { myOutput(myGdp.pointIndex(offset)) += nml; }
365  void sub(GA_Offset offset, const UT_Vector3T<T> &nml) override
366  { myOutput(myGdp.pointIndex(offset)) -= nml; }
367 
368  private:
369  const GA_Detail &myGdp;
370  UT_ValArray<UT_Vector3T<T>> &myOutput;
371  };
372 
373  // Compute normals into a normal attribute
374  template <typename T>
375  class NormalCompAttrT : public NormalCompT<T> {
376  public:
378  : myHandle(attr.getAttribute()) {}
380  : myHandle(attr) {}
381  void add(GA_Offset offset, const UT_Vector3T<T> &nml) override
382  { myHandle.add(offset, nml); }
383  void sub(GA_Offset offset, const UT_Vector3T<T> &nml) override
384  { myHandle.add(offset, -nml); }
385 
386  GA_RWHandleT<UT_Vector3T<T>> &getHandle() { return myHandle; }
387 
388  protected:
390  };
391 
392  // Compute normals into a normal attribute
393  template <typename T>
395  {
396  public:
398  : myParent(parent)
399  , myLock(lock)
400  , myBufferEntries(0)
401  {}
403  {
404  flush();
405  }
406  void add(GA_Offset offset, const UT_Vector3T<T> &nml) override
407  {
408  myOffsetBuffer[myBufferEntries] = offset;
409  myDataBuffer[myBufferEntries] = nml;
410  ++myBufferEntries;
411  if (myBufferEntries == theBufferSize)
412  flush();
413  }
414 
415  void sub(GA_Offset offset, const UT_Vector3T<T> &nml) override
416  {
417  myOffsetBuffer[myBufferEntries] = offset;
418  myDataBuffer[myBufferEntries] = -nml;
419  ++myBufferEntries;
420  if (myBufferEntries == theBufferSize)
421  flush();
422  }
423 
424  void flush()
425  {
426  UT_AutoLock lock(myLock);
427  for (GA_Size i = 0; i < myBufferEntries; ++i)
428  {
429  myParent.add(myOffsetBuffer[i], myDataBuffer[i]);
430  }
431  myBufferEntries = 0;
432  }
433 
434  private:
435  static const GA_Size theBufferSize = 1024;
436 
437  NormalCompT<T> &myParent;
438  UT_Lock &myLock;
439  GA_Size myBufferEntries;
440  GA_Offset myOffsetBuffer[theBufferSize];
441  UT_Vector3T<T> myDataBuffer[theBufferSize];
442  };
443 
448 
453 
454  virtual void normal(NormalComp &output) const = 0;
455  virtual void normal(NormalCompD &output) const = 0;
456 
457  // Conversion Methods
458 
459  // This method converts the primitive to the specified toType and deletes
460  // the old primitive.
461 
463  GA_PointGroup *usedpts = 0) = 0;
464 
465  // This method creates a new primitive by converting the old primitive to
466  // the specified toType.
467 
468  virtual GEO_Primitive *convertNew(GEO_ConvertParms &parms) = 0;
469 
470  // The default implementation just checks the bounding box and
471  // deletes the primitive if the bounding box is beyond the plane.
472  // NOTE: normal should be normalized
473  virtual void clip(UT_Vector3 normal, float distance = 0,
474  GA_PrimitiveGroup *clipgrp = NULL);
475 
476  // The default implementation just intersects against the bounding box
477  virtual int intersectRay(const UT_Vector3 &o, const UT_Vector3 &d,
478  float tmax = 1E17F, float tol = 1E-12F,
479  float *distance = 0, UT_Vector3 *pos = 0,
480  UT_Vector3 *nml = 0, int accurate = 0,
481  float *u = 0, float *v = 0,
482  int ignoretrim = 1) const;
483 
484 
485  /// Convience objects to pass as arguments to saveH9()/loadH9().
487 
488 protected:
489  /// All subclasses should call this method to register the primitive
490  /// intrinsics.
491  /// @see GA_IntrinsicManager
494  { return GA_Primitive::registerIntrinsics(defn); }
495 
496  virtual bool evaluatePointRefMap(GA_Offset result_vtx,
497  GA_AttributeRefMap &map,
498  fpreal u, fpreal v=0,
499  uint du=0, uint dv=0) const = 0;
500 
501  /// Evaluate the position for the given parametric coordinates (with the
502  /// given derivatives). Return 0 if successful, or -1 if failure.
503  /// The default implementation returns {0,0,0,0};
504  virtual int evaluatePointV4( UT_Vector4 &pos, float u, float v = 0,
505  unsigned du=0, unsigned dv=0) const;
506 
507  /// By default, this will call evaluateInteriorPointRefMap with u=.5 and
508  /// v=.5. This is likely not the perfect solution. At the current time,
509  /// this is only used in POPs to birth points at primitive centers.
510  virtual bool evaluateBaryCenterRefMap(GA_Offset result_vtx,
511  GA_AttributeRefMap &map) const;
512 
513  virtual bool evaluateInteriorPointRefMap(GA_Offset result_vtx,
514  GA_AttributeRefMap &map,
515  fpreal u, fpreal v, fpreal w = 0) const;
516  virtual int evaluateInteriorPointV4(UT_Vector4 &pos,
517  fpreal u, fpreal v, fpreal w = 0) const;
518 
519 private:
520  friend class GEO_Detail; // Allow detail to get at private stuff
521 
522  // TODO: Eliminate, deprecate, or switch to saving json format.
523  friend std::ostream &operator<<(std::ostream &os, const GEO_Primitive &d)
524  {
525  d.saveH9(os, /*binary*/false,
528  return os;
529  }
530 };
531 
533 
534 #endif
fpreal calcPerimeter() const override
Definition of a geometry attribute.
Definition: GA_Attribute.h:203
UT_Vector3T< T > baryCenterT() const
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Definition: thread.h:632
const GLdouble * v
Definition: glcorearb.h:837
NormalCompAttrT(const GA_RWHandleT< UT_Vector3T< T >> &attr)
#define SYS_DEPRECATED_PUSH_DISABLE()
void copyAttributesAndGroups(const GEO_Primitive &src, GA_AttributeRefMap &gah, bool copy_groups=true)
Definition: GEO_Primitive.h:70
#define SYS_DEPRECATED_POP_DISABLE()
GLsizei const GLfloat * value
Definition: glcorearb.h:824
bool evaluateInteriorPoint(GA_Offset result_vtx, GA_AttributeRefMap &map, fpreal u, fpreal v, fpreal w=0) const
GA_RWHandleT< UT_Vector3T< T > > & getHandle()
void copyAttributesAndGroups(const GEO_Primitive &src, bool copy_groups=true)
Definition: GEO_Primitive.h:63
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
PUGI__FN void reverse(I begin, I end)
Definition: pugixml.cpp:7458
SYS_FORCE_INLINE GEO_Detail * getParent() const
~GEO_Primitive() override
Definition: GEO_Primitive.h:56
Tto convert(const Tfrom &source)
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
fpreal calcArea() const override
GLdouble u1
Definition: glad.h:2676
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:243
virtual void add(GA_Offset offset, const UT_Vector3T< T > &nml)
#define GA_INVALID_OFFSET
Definition: GA_Types.h:694
GA_Size GA_Offset
Definition: GA_Types.h:653
This class provides a way to manage a reference to an attribute permitting Read-Write access...
NormalCompBufferedT(NormalCompT< T > &parent, UT_Lock &lock)
GLintptr offset
Definition: glcorearb.h:665
GA_RWHandleT< UT_Vector3T< T > > myHandle
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
int evaluateInteriorPoint(UT_Vector4 &pos, fpreal u, fpreal v, fpreal w=0) const
#define GEO_API
Definition: GEO_API.h:14
bool evaluatePoint(GA_Offset result_vtx, GA_AttributeRefMap &map, fpreal u, fpreal v=0, uint du=0, uint dv=0) const
void sub(GA_Offset offset, const UT_Vector3T< T > &nml) override
A handle to simplify manipulation of multiple attributes.
void sub(GA_Offset offset, const UT_Vector3T< T > &nml) override
#define SYS_DEPRECATED_HDK(__V__)
GLdouble GLdouble u2
Definition: glad.h:2676
NormalCompArrayT(const GA_Detail &gdp, UT_ValArray< UT_Vector3T< T >> &output)
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GA_API const UT_StringHolder transform
virtual bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const
void add(GA_Offset offset, const UT_Vector3T< T > &nml) override
GLfloat v0
Definition: glcorearb.h:816
void sub(GA_Offset offset, const UT_Vector3T< T > &nml) override
GA_API const UT_StringHolder parms
SYS_FORCE_INLINE GEO_Primitive(GA_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
Definition: GEO_Primitive.h:48
int evaluatePoint(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const
static const UT_Array< GA_AttribSaveDataH9 > & theEmptySaveAttribs
Convience objects to pass as arguments to saveH9()/loadH9().
fpreal64 fpreal
Definition: SYS_Types.h:283
void add(GA_Offset offset, const UT_Vector3T< T > &nml) override
bool evaluateBaryCenter(GA_Offset result_vtx, GA_AttributeRefMap &map) const
GLfloat GLfloat v1
Definition: glcorearb.h:817
NormalCompAttrT(const GA_RWAttributeRef &attr)
void add(GA_Offset offset, const UT_Vector3T< T > &nml) override
Container class for all geometry.
Definition: GA_Detail.h:105
friend std::ostream & operator<<(std::ostream &os, const GEO_Primitive &d)
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
Definition of a geometric primitive.
SIM_API const UT_StringHolder distance
virtual bool isQuadric() const
void copyAttributesAndGroups(const GEO_Primitive &src, GA_PrimitiveWrangler &wrangler, bool copy_groups=true)
NOTE: The copying of groups only works if src is in the same detail.
Definition: GEO_Primitive.h:79
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
Definition: ImathBoxAlgo.h:29
unsigned int uint
Definition: SYS_Types.h:45
virtual void sub(GA_Offset offset, const UT_Vector3T< T > &nml)
virtual void isolate()
Method to isolate a pasted surface.
Definition: format.h:1821
GLenum src
Definition: glcorearb.h:1793