HDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_BVH.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_BVH.h (GU Library, C++)
7  *
8  * COMMENTS: Bounding Volume Hierarchy (BVH) implementation for GEO_Detail.
9  */
10 
11 #pragma once
12 
13 #include "GU_API.h"
14 #include <GEO/GEO_BVH.h>
15 #include <GA/GA_Handle.h>
16 #include <GA/GA_Types.h>
17 #include <UT/UT_ArrayMap.h>
18 #include <UT/UT_UniquePtr.h>
19 #include <UT/UT_Vector3.h>
20 #include <VM/VM_SIMD.h>
21 #include <limits>
22 
23 class UT_Lock;
24 class GU_PackedImpl;
25 class GU_RayPrimInfo;
27 
28 namespace GU {
29 
30 template<uint NAXES,typename SUBCLASS>
32 
33 class GU_API BVH : public BVHBase<3, BVH>
34 {
35  using Base = BVHBase<3, BVH>;
36  friend Base;
37  static constexpr uint NAXES = 3;
38 
39  static constexpr bool theHasPrimitives = true;
40  static constexpr bool theReordersPositions = false;
41 
42  enum OtherPrimType : uint
43  {
44  OTHERPRIM_BVHXLATESCALE,
45  OTHERPRIM_BVHUNIFORM,
46  OTHERPRIM_BVHFULLXFORM,
47  OTHERPRIM_RAYPRIMINFO,
48  OTHERPRIM_HEIGHTFIELD,
49  OTHERPRIM_SEGMENT,
50  OTHERPRIM_NGON_TRI,
51  OTHERPRIM_NGON_QUAD
52  };
53 
54  struct TranslateScale
55  {
57  double inverse_scale;
58 
59  SYS_FORCE_INLINE void transformPosition(UT_Vector3D &position) const
60  {
61  position = position/inverse_scale + translate;
62  }
63  SYS_FORCE_INLINE void inverseTransformPosition(UT_Vector3D &position) const
64  {
65  position = (position - translate)*inverse_scale;
66  }
67  SYS_FORCE_INLINE void transformDirection(UT_Vector3D &vector) const
68  {
69  // Nothing to do, since we'd just normalize out the scale anyway
70  }
71  SYS_FORCE_INLINE void inverseTransformDirection(UT_Vector3D &vector) const
72  {
73  // Nothing to do, since we'd just normalize out the scale anyway
74  }
75  SYS_FORCE_INLINE void transformVector(UT_Vector3D &vector) const
76  {
77  vector /= inverse_scale;
78  }
79  SYS_FORCE_INLINE float scaleT(float t) const
80  {
81  return t/inverse_scale;
82  }
83  SYS_FORCE_INLINE float inverseScaleT(float t) const
84  {
85  return t*inverse_scale;
86  }
87  };
88  struct UniformTransform
89  {
90  /// This is scaled by sqrt(inverse_scale), so that if we do
91  /// rotation.conjugate()*P*rotation, without normalizing,
92  /// it'll automatically apply the inverse scale.
95  double scale;
96 
97  SYS_FORCE_INLINE void transformPosition(UT_Vector3D &position) const
98  {
99  // NOTE: UT_QuaternionT::rotate assumes that rotation is normalized.
100  // We're using the fact that it's not, to our advantage,
101  // to automatically apply the scale.
102  position = (rotation*scale).rotate(position) + translate;
103  }
104  SYS_FORCE_INLINE void inverseTransformPosition(UT_Vector3D &position) const
105  {
106  // NOTE: UT_QuaternionT::rotateInverse assumes that rotation is normalized.
107  // We're using the fact that it's not, to our advantage,
108  // to automatically apply the inverse scale.
109  position = rotation.rotateInverse(position - translate);
110  }
111  SYS_FORCE_INLINE void transformDirection(UT_Vector3D &vector) const
112  {
113  vector = rotation.rotate(vector);
114  // NOTE: UT_QuaternionT::rotate assumes that rotation is normalized,
115  // but it's not, so we need to normalize vector.
116  vector.normalize();
117  }
118  SYS_FORCE_INLINE void inverseTransformDirection(UT_Vector3D &vector) const
119  {
120  vector = rotation.rotateInverse(vector);
121  // NOTE: UT_QuaternionT::rotateInverse assumes that rotation is normalized,
122  // but it's not, so we need to normalize vector.
123  vector.normalize();
124  }
125  SYS_FORCE_INLINE void transformVector(UT_Vector3D &vector) const
126  {
127  vector = rotation.rotate(vector);
128  }
129  SYS_FORCE_INLINE float scaleT(float t) const
130  {
131  return t*scale;
132  }
133  SYS_FORCE_INLINE float inverseScaleT(float t) const
134  {
135  return t/scale;
136  }
137  };
138 
139  struct PrimData
140  {
141  GA_Offset myPrimOff;
142  union {
143  const BVH *myBVHPtr;
144  /// NOTE: This might be nullptr if the GU_RayPrimInfo was degenerate,
145  /// even if myOtherType is OTHERPRIM_RAYPRIMINFO.
146  GU_RayPrimInfo *myRayPrimPtr;
147  void *myDataPtr;
148  uint myDataInts[2];
149  /// NOTE: This can't be GA_Offset, since on strict types builds,
150  /// GA_Offset has a non-trivial default constructor.
151  GA_Size myPt0Off;
152  };
153  union {
154  struct {
155  /// Used for triangles
156  float myN[NAXES];
157  /// Used for w component of polygons in polygon soups
158  float myF;
159  };
160  struct {
161  union {
162  /// Used if myOtherType is not OTHERPRIM_RAYPRIMITIVE
163  void *myOtherTransform;
164 
165  /// Used if myOtherType is OTHERPRIM_RAYPRIMITIVE
166  const GEO_Detail *myDetail;
167 
168  /// Used if myOtherType is OTHERPRIM_SEGMENT
169  /// NOTE: This can't be GA_Offset, since on strict types builds,
170  /// GA_Offset has a non-trivial default constructor.
171  GA_Size myPt1Off;
172  };
173  /// Used if in the "other" primitive range
174  OtherPrimType myOtherType;
175 
176  /// Used if myOtherType is OTHERPRIM_SEGMENT
177  uint mySegment;
178  };
179  struct {
180  /// Used for mesh primitives
181  uint myCols;
182  uint myRows;
183  };
184  };
185  };
186 
187  struct NGonTri
188  {
189  UT_Vector3 myN;
190  char myNGonXAxis;
191  char myNGonYAxis;
192  GA_Offset myPtOffs[3];
193  float myNGonCentreX;
194  float myNGonCentreY;
195  };
196  struct NGonQuad
197  {
198  GA_Offset myPtOffs[4];
199  float myNGonCentreX;
200  float myNGonCentreY;
201  char myNGonXAxis;
202  char myNGonYAxis;
203  };
204 
205  /// Point offsets for triangles
206  /// This array actually contains myQuadPoints and myTetPoints, too.
207  UT_UniquePtr<GA_Offset[]> myTriPoints;
208  /// Point offsets for quads
209  /// This is actually a pointer into myTriPoints.
210  GA_Offset *myQuadPoints;
211  /// Point offsets for tets
212  /// This is actually a pointer into myTriPoints.
213  GA_Offset *myTetPoints;
214  /// Point offsets for hexes
215  /// This is actually a pointer into myTriPoints.
216  GA_Offset *myHexPoints;
217 
218  GA_Size myTriStart;
219  GA_Size myQuadStart;
220  GA_Size myTetStart;
221  GA_Size myHexStart;
222  GA_Size myOtherPrimStart;
223  GA_Size myNItems;
224 
225  GA_DataId myTopologyDataId;
226  GA_DataId myPrimitiveListDataId;
227 
228 public:
229  /// Combination of data ids that together can be used to detect when
230  /// an entity built from sources with those data ids has changed.
231  /// GA_INVALID_DATAID entries are interpreted as an optional source
232  /// being absent and should not be used for sources without a valid
233  /// data id. Instead, use any empty array when any source does not
234  /// have a valid data id.
236 private:
237  // When built with no primitive range, this will contain a single entry set
238  // to GA_INVALID_DATAID. This should not match any combo used with a range
239  // which should either be empty or contain at least one valid id.
240  DataIdCombo myPrimitiveRangeDataIds;
241 
242  /// Additional data for primitives, especially primitives that are not
243  /// triangles, quads, or tets.
244  UT_UniquePtr<PrimData[]> myPrimData;
245 
246  /// These are for managing packed primitives.
247  /// We share trees for common details, and we share details for common
248  /// packed primitive implementations that don't directly provide a detail.
249  /// @{
252  SecondaryTreeMap mySecondaryTrees;
253  SecondaryDetailMap mySecondaryDetails;
254  /// @}
255 
256  bool myHasSecondary;
257 
258 public:
260  : Base()
261  , myTriPoints(nullptr)
262  , myQuadPoints(nullptr)
263  , myTetPoints(nullptr)
264  , myHexPoints(nullptr)
265  , myTriStart(0)
266  , myQuadStart(0)
267  , myTetStart(0)
268  , myHexStart(0)
269  , myOtherPrimStart(0)
270  , myNItems(0)
271  , myTopologyDataId(GA_INVALID_DATAID)
272  , myPrimitiveListDataId(GA_INVALID_DATAID)
273  , myPrimData(nullptr)
274  , myHasSecondary(false)
275  {}
277  {
278  clear();
279  }
280 
281  SYS_FORCE_INLINE GA_Offset primitiveOffset(exint prim_index) const noexcept
282  {
283  return myPrimData[prim_index].myPrimOff;
284  }
285 
286  void clear() noexcept;
287 
288  SYS_FORCE_INLINE GA_Size numItems() const noexcept
289  {
290  return myNItems;
291  }
292 
293  GA_DataId topologyId() const { return myTopologyDataId; }
294  GA_DataId primlistId() const { return myPrimitiveListDataId; }
295  // When built with no primitive range, this will contain a single entry set
296  // to GA_INVALID_DATAID. This should not match any combo used with a range
297  // which should either be empty or contain at least one valid id.
298  const DataIdCombo &primRangeIds() const { return myPrimitiveRangeDataIds; }
299 
300  struct Options
301  {
303  {
306  ALL_POINTS
307  };
308 
309  PointStyle points = NO_POINTS;
310 
311  const GA_Range *point_range = nullptr;
312  const GA_Range *prim_range = nullptr;
313 
314  // Use when prim_range is set to allow determining whether an in place
315  // update is possible. This combo is associated with the data offsets
316  // in the range and will be used in conjunction with data ids on the
317  // primitive list and topology to check if the set of range primitives
318  // has changed. Must be empty or contain at least one entry not equal
319  // to GA_INVALID_DATAID. See declaration of DataIdCombo for more info.
321 
322  bool just_edges = false;
323 
324  /// If true, only triangles on the unshared surface of tetrahedra will
325  /// be added, not the solid tetrahedra themselves. findClosest will
326  /// find the closest surface point, and sendRay will only intersect the
327  /// surface.
328  ///
329  /// If false, only the solid tetrahedra will be added. findClosest will
330  /// find the current point if it's inside a tetrahedron, else the
331  /// closest surface point, and sendRay will intersect the current point
332  /// if it's inside a tetrahedron, else the first surface intersected.
333  bool tet_surface = false;
334  };
335 
336  /// NOTE: If options is different from what it was before, you must set
337  /// force_rebalance to true.
338  /// NOTE: With this signature, radscale scales the pscale attribute
339  /// if it's a valid attribute, else it's the point radius.
340  void init(const GEO_Detail &detail,
341  const GA_ROHandleT<VectorType> &P,
342  const Options &options,
343  const GA_ROHandleF &pscale,
344  const float radscale = 1.0f,
345  const bool force_rebalance=false,
346  SecondaryTreeMap *secondary_trees=nullptr,
347  SecondaryDetailMap *secondary_details=nullptr,
348  UT_Lock *secondary_lock=nullptr) noexcept;
349 
350  /// NOTE: With this signature, radius is the point radius.
351  void init(const GEO_Detail &detail,
352  const GA_ROHandleT<VectorType> &P,
353  const Options &options,
354  const float radius = 0.0f,
355  const bool force_rebalance=false) noexcept
356  {
357  init(detail, P, options, GA_ROHandleF(), radius, force_rebalance);
358  }
359 
360  SYS_FORCE_INLINE bool
361  isNGon(exint index) const noexcept
362  {
363  if (index < myOtherPrimStart)
364  return false;
365  exint prim_index = index - myTriStart;
366  OtherPrimType type = myPrimData[prim_index].myOtherType;
367  return type == OTHERPRIM_NGON_TRI || type == OTHERPRIM_NGON_QUAD;
368  }
369 
370  /// The UVWs returned for n-gons are for the sub-polygons,
371  /// so we need to compute the true UVWs from the positions.
372  UT_Vector3 findNGonUVW(exint index, const UT_Vector3 &position, const GEO_Detail &detail) const noexcept;
373 
374  SYS_FORCE_INLINE bool
375  isPacked(exint index) const noexcept
376  {
377  if (index < myOtherPrimStart)
378  return false;
379  exint prim_index = index - myTriStart;
380  OtherPrimType type = myPrimData[prim_index].myOtherType;
381  return type == OTHERPRIM_BVHUNIFORM || type == OTHERPRIM_BVHXLATESCALE || type == OTHERPRIM_BVHFULLXFORM;
382  }
383 
384 protected:
385  /// These are just used in the init function to change the decision about
386  /// clearing after some things have been initialized.
387  /// @{
388  void clearPrimDataAllocations() noexcept;
389  void clearSecondary() noexcept;
390  /// @}
391 
392  template<bool farthest,bool rm_backface,bool reverse,typename FUNCTOR>
393  bool intersectPrim(
394  uint index, const VectorType &origin, const VectorType &direction,
395  const VectorType &inverse_direction,
396  int &max_dir, VectorType &N0, VectorType &N1,
397  float &outer_tmax, float &outer_tmin, FUNCTOR &hit_info) const noexcept;
398  template<bool farthest>
399  void closestPrim(
400  uint index, const VectorType &origin, float &max_dist_squared,
401  exint &hit_index, UT_Vector3 &hit_uvw, VectorType &hit_position,
402  const UT_FixedVector<v4uf,NAXES> &vorigin,
403  UT_Array<exint> *nesting_array,
404  exint nesting_array_base) const noexcept;
405  template<bool normalize>
406  VectorType primGeometricNormal(const CommonHitInfo &hit_info) const noexcept;
407  SYS_FORCE_INLINE void primDerivs(const CommonHitInfo &hit_info, VectorType &dP_du, VectorType &dP_dv) const noexcept;
408  template<GA_AttributeOwner owner,typename T,typename DEST_T>
409  SYS_FORCE_INLINE bool primAttribute(const CommonHitInfo &hit_info, const GA_ROHandleT<T> &attrib, const GEO_Detail &detail, DEST_T &value) const noexcept;
410 
411  template<bool farthest,bool rm_backface,bool reverse,bool bidirectional=false,typename FUNCTOR>
412  static SYS_FORCE_INLINE bool intersectQuad(
413  const UT_Vector3 &origin,
414  const UT_Vector3 &inverse_direction,
415  const UT_Vector3 pos[4],
416  const int max_dir,
417  const UT_Vector3 &N0,
418  const UT_Vector3 &N1,
419  const PrimData &prim_data,
420  float &outer_tmin,
421  float &outer_tmax,
422  const uint index,
423  FUNCTOR &hit_info);
424 
425  template<bool farthest,bool rm_backface,bool reverse,bool bidirectional=false,typename FUNCTOR>
426  static SYS_FORCE_INLINE bool intersectTet(
427  const UT_Vector3 &origin,
428  const UT_Vector3 &inverse_direction,
429  const UT_Vector3 pos[4],
430  const PrimData &prim_data,
431  float &outer_tmin,
432  float &outer_tmax,
433  const uint index,
434  FUNCTOR &hit_info);
435 
436  template<bool farthest,bool rm_backface,bool reverse,typename FUNCTOR>
437  static SYS_FORCE_INLINE bool intersectHex(
438  const UT_Vector3 &origin,
439  const UT_Vector3 &direction,
440  const UT_Vector3 &inverse_direction,
441  const UT_Vector3 pos[8],
442  int &max_dir,
443  UT_Vector3 &N0,
444  UT_Vector3 &N1,
445  const PrimData &prim_data,
446  float &outer_tmin,
447  float &outer_tmax,
448  const uint index,
449  FUNCTOR &hit_info);
450 
451  template<bool farthest>
452  static SYS_FORCE_INLINE bool triClosestPoint(
453  uint index,
454  const VectorType &origin,
455  const VectorType pos[3],
456  const PrimData &prim_data,
457  const UT_Vector3 &normal,
458  float &max_dist_squared,
459  exint &hit_index,
460  UT_Vector3 &hit_uvw,
461  UT_Vector3 &hit_position);
462 
463  template<bool farthest>
464  static SYS_FORCE_INLINE bool quadClosestPoint(
465  uint index,
466  const VectorType &origin,
467  const UT_FixedVector<v4uf,3> &vorigin,
468  const VectorType pos[4],
469  const PrimData &prim_data,
470  float &max_dist_squared,
471  exint &hit_index,
472  UT_Vector3 &hit_uvw,
473  UT_Vector3 &hit_position);
474 
475  static bool hexClosestPoint(
476  uint index,
477  const VectorType &origin,
478  const UT_FixedVector<v4uf,3> &vorigin,
479  const VectorType pos[8],
480  float &max_dist_squared,
481  exint &hit_index, UT_Vector3 &hit_uvw, UT_Vector3 &hit_position);
482 
483  template<typename V3_ARRAY>
484  SYS_FORCE_INLINE static void addTriangleData(
485  GA_Offset *&tri_points,
486  const V3_ARRAY &positions,
487  const GA_ROHandleT<VectorType> &posattrib,
488  PrimData *primdata,
489  SingleBoxType *prim_box_start,
490  exint &tri_primnum,
491  GA_Offset primoff,
492  int data_int = -1,
493  float data_float = 0) noexcept;
494 
495  template<typename V3_ARRAY>
496  SYS_FORCE_INLINE static void addQuadData(
497  GA_Offset *&quad_points,
498  const V3_ARRAY &positions,
499  const GA_ROHandleT<VectorType> &posattrib,
500  PrimData *primdata,
501  SingleBoxType *prim_box_start,
502  exint &quad_primnum,
503  GA_Offset primoff,
504  int data_int = -1,
505  float data_float = 0) noexcept;
506 
507  SYS_FORCE_INLINE static void addRayPrimInfo(
508  PrimData &primdata,
509  GA_Offset primoff,
510  SingleBoxType &primbox,
511  GU_RayPrimInfo *rayprim,
512  exint &other_primnum,
513  const GEO_Detail &detail,
514  float w = 0) noexcept;
515 
516 public:
517  // NOTE: These are only public to work around a compile error.
518  using BVHBase::SingleHitAndNormalFunctor;
519  using BVHBase::AllHitsAndNormalsFunctor;
520 
521  template<bool farthest,bool rm_backface,bool reverse,bool bidirectional,typename FUNCTOR>
523 protected:
524 
525  // We must specify that this is at global scope because we're inside a
526  // namepspace here.
527  friend class ::GU_RayHeightFieldInfo;
528 };
529 
530 #if 0
531 class GU_API BVH_2D : public BVHBase<2, BVH_2D>
532 {
533  using Base = BVHBase<2, BVH_2D>;
534  friend class Base;
535  static constexpr uint NAXES = 2;
536 
537  static constexpr bool theHasPrimitives = true;
538 
539  struct PrimData
540  {
541  GA_Offset myPrimOff;
542  union {
543  void *myDataPtr;
544  uint myDataInts[2];
545  };
546  VectorType myN;
547  float myF;
548  };
549 
550  /// Point offsets for segments
551  UT_UniquePtr<GA_Offset[]> mySegmentPoints;
552 
553  GA_Size myOtherPrimStart;
554 
555  /// Additional data for primitives.
556  UT_UniquePtr<PrimData[]> myPrimData;
557 
558 public:
559  SYS_FORCE_INLINE BVH_2D() noexcept
560  : Base()
561  , mySegmentPoints(nullptr)
562  {}
563 
564  SYS_FORCE_INLINE GA_Offset primitiveOffset(exint prim_index) const noexcept
565  {
566  return myPrimData[prim_index].myPrimOff;
567  }
568 
569  SYS_FORCE_INLINE void clear() noexcept
570  {
571  Base::clear();
572  mySegmentPoints.reset();
573  myPrimData.reset();
574  }
575 
576  struct Options
577  {
578  enum PointStyle
579  {
580  NO_POINTS,
581  DISCONNECTED_POINTS,
582  ALL_POINTS
583  };
584 
585  PointStyle points = NO_POINTS;
586 
587  const GA_Range *point_range = nullptr;
588  const GA_Range *prim_range = nullptr;
589  bool just_edges = false;
590  };
591 
592  void init(const GA_Detail &detail,
593  const GA_ROHandleT<VectorType> &P,
594  const Options &options,
596  const bool force_rebalance=false) noexcept;
597 
598 protected:
599  template<bool farthest,bool rm_backface,bool reverse>
600  SYS_FORCE_INLINE bool intersectPrim(
601  uint index, const VectorType &origin, const VectorType &direction,
602  const VectorType &inverse_direction,
603  int &max_dir, VectorType &N0, VectorType &N1,
604  float &outer_tmax, float &outer_tmin, exint &hit_index, UT_Vector3 &hit_uvw) const noexcept;
605  template<bool farthest>
606  SYS_FORCE_INLINE void closestPrim(
607  uint index, const VectorType &origin, float &max_dist_squared,
608  exint &hit_index, UT_Vector3 &hit_uvw, VectorType &hit_position,
609  const UT_FixedVector<v4uf,NAXES> &vorigin,
610  UT_Array<exint> *nesting_array,
611  exint nesting_array_base) const noexcept;
612  template<bool normalize>
613  SYS_FORCE_INLINE VectorType primGeometricNormal(const CommonHitInfo &hit_info) const noexcept;
614  SYS_FORCE_INLINE void primDerivs(const CommonHitInfo &hit_info, VectorType &dP_du, VectorType &dP_dv) const noexcept;
615  template<GA_AttributeOwner owner,typename T,typename DEST_T>
616  SYS_FORCE_INLINE bool primAttribute(const CommonHitInfo &hit_info, const GA_ROHandleT<T> &attrib, const GEO_Detail &detail, DEST_T &value) const noexcept;
617 };
618 #endif
619 
620 } // GU namespace
621 
622 using GU_BVH = GU::BVH;
623 
GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glad.h:2676
*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
int64 GA_DataId
Definition: GA_Types.h:696
GA_DataId topologyId() const
Definition: GU_BVH.h:293
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
int64 exint
Definition: SYS_Types.h:125
Definition: GU_BVH.h:33
void reverse(I begin, I end)
Definition: pugixml.cpp:7190
#define GA_INVALID_DATAID
Definition: GA_Types.h:697
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
SYS_FORCE_INLINE bool isPacked(exint index) const noexcept
Definition: GU_BVH.h:375
SYS_FORCE_INLINE bool isNGon(exint index) const noexcept
Definition: GU_BVH.h:361
A range of elements in an index-map.
Definition: GA_Range.h:42
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
GA_Size GA_Offset
Definition: GA_Types.h:646
GA_API const UT_StringHolder scale
GLfloat f
Definition: glcorearb.h:1926
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
GA_ROHandleT< fpreal32 > GA_ROHandleF
Definition: GA_Handle.h:1354
Definition: VM_SIMD.h:188
SYS_FORCE_INLINE GA_Offset primitiveOffset(exint prim_index) const noexcept
Definition: GU_BVH.h:281
DataIdCombo prim_range_data_ids
Definition: GU_BVH.h:320
SIM_API const UT_StringHolder rotation
#define GU_API
Definition: GU_API.h:14
ImageBuf OIIO_API rotate(const ImageBuf &src, float angle, string_view filtername=string_view(), float filterwidth=0.0f, bool recompute_roi=false, ROI roi={}, int nthreads=0)
GLdouble t
Definition: glad.h:2397
SYS_FORCE_INLINE ~BVH() noexcept
Definition: GU_BVH.h:276
GA_AttributeOwner
Definition: GA_Types.h:35
typename SYS_SelectType< UT_Vector2, UT_Vector3, NAXES==3 >::type VectorType
Definition: GEO_BVH.h:39
GLuint index
Definition: glcorearb.h:786
SIM_API const UT_StringHolder position
SYS_FORCE_INLINE BVH() noexcept
Definition: GU_BVH.h:259
GA_API const UT_StringHolder pscale
Container class for all geometry.
Definition: GA_Detail.h:96
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
Definition: core.h:1131
SYS_FORCE_INLINE UT_StorageMathFloat_t< T > normalize() noexcept
Definition: UT_Vector3.h:376
GA_DataId primlistId() const
Definition: GU_BVH.h:294
const DataIdCombo & primRangeIds() const
Definition: GU_BVH.h:298
PUGI__FN char_t * translate(char_t *buffer, const char_t *from, const char_t *to, size_t to_length)
Definition: pugixml.cpp:8352
type
Definition: core.h:1059
unsigned int uint
Definition: SYS_Types.h:45
constexpr T normalize(UT_FixedVector< T, D > &a) noexcept