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