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  /// If true, the visibility group inside packed primitives will be used
336  /// to exclude component primitives.
337  bool use_packed_visibility = false;
338  };
339 
340  /// NOTE: If options is different from what it was before, you must set
341  /// force_rebalance to true.
342  /// NOTE: With this signature, radscale scales the pscale attribute
343  /// if it's a valid attribute, else it's the point radius.
344  void init(const GEO_Detail &detail,
345  const GA_ROHandleT<VectorType> &P,
346  const Options &options,
347  const GA_ROHandleF &pscale,
348  const float radscale = 1.0f,
349  const bool force_rebalance=false,
350  SecondaryTreeMap *secondary_trees=nullptr,
351  SecondaryDetailMap *secondary_details=nullptr,
352  UT_Lock *secondary_lock=nullptr) noexcept;
353 
354  /// NOTE: With this signature, radius is the point radius.
355  void init(const GEO_Detail &detail,
356  const GA_ROHandleT<VectorType> &P,
357  const Options &options,
358  const float radius = 0.0f,
359  const bool force_rebalance=false) noexcept
360  {
361  init(detail, P, options, GA_ROHandleF(), radius, force_rebalance);
362  }
363 
364  SYS_FORCE_INLINE bool
365  isNGon(exint index) const noexcept
366  {
367  if (index < myOtherPrimStart)
368  return false;
369  exint prim_index = index - myTriStart;
370  OtherPrimType type = myPrimData[prim_index].myOtherType;
371  return type == OTHERPRIM_NGON_TRI || type == OTHERPRIM_NGON_QUAD;
372  }
373 
374  /// The UVWs returned for n-gons are for the sub-polygons,
375  /// so we need to compute the true UVWs from the positions.
376  UT_Vector3 findNGonUVW(exint index, const UT_Vector3 &position, const GEO_Detail &detail) const noexcept;
377 
378  SYS_FORCE_INLINE bool
379  isPacked(exint index) const noexcept
380  {
381  if (index < myOtherPrimStart)
382  return false;
383  exint prim_index = index - myTriStart;
384  OtherPrimType type = myPrimData[prim_index].myOtherType;
385  return type == OTHERPRIM_BVHUNIFORM || type == OTHERPRIM_BVHXLATESCALE || type == OTHERPRIM_BVHFULLXFORM;
386  }
387 
388 protected:
389  /// These are just used in the init function to change the decision about
390  /// clearing after some things have been initialized.
391  /// @{
392  void clearPrimDataAllocations() noexcept;
393  void clearSecondary() noexcept;
394  /// @}
395 
396  template<bool farthest,bool rm_backface,bool reverse,typename FUNCTOR>
397  bool intersectPrim(
398  uint index, const VectorType &origin, const VectorType &direction,
399  const VectorType &inverse_direction,
400  int &max_dir, VectorType &N0, VectorType &N1,
401  float &outer_tmax, float &outer_tmin, FUNCTOR &hit_info) const noexcept;
402  template<bool farthest>
403  void closestPrim(
404  uint index, const VectorType &origin, float &max_dist_squared,
405  exint &hit_index, UT_Vector3 &hit_uvw, VectorType &hit_position,
406  const UT_FixedVector<v4uf,NAXES> &vorigin,
407  UT_Array<exint> *nesting_array,
408  exint nesting_array_base) const noexcept;
409  template<bool normalize>
410  VectorType primGeometricNormal(const CommonHitInfo &hit_info) const noexcept;
411  SYS_FORCE_INLINE void primDerivs(const CommonHitInfo &hit_info, VectorType &dP_du, VectorType &dP_dv) const noexcept;
412  template<GA_AttributeOwner owner,typename T,typename DEST_T>
413  SYS_FORCE_INLINE bool primAttribute(const CommonHitInfo &hit_info, const GA_ROHandleT<T> &attrib, const GEO_Detail &detail, DEST_T &value) const noexcept;
414 
415  template<bool farthest,bool rm_backface,bool reverse,bool bidirectional=false,typename FUNCTOR>
416  static SYS_FORCE_INLINE bool intersectQuad(
417  const UT_Vector3 &origin,
418  const UT_Vector3 &inverse_direction,
419  const UT_Vector3 pos[4],
420  const int max_dir,
421  const UT_Vector3 &N0,
422  const UT_Vector3 &N1,
423  const PrimData &prim_data,
424  float &outer_tmin,
425  float &outer_tmax,
426  const uint index,
427  FUNCTOR &hit_info);
428 
429  template<bool farthest,bool rm_backface,bool reverse,bool bidirectional=false,typename FUNCTOR>
430  static SYS_FORCE_INLINE bool intersectTet(
431  const UT_Vector3 &origin,
432  const UT_Vector3 &inverse_direction,
433  const UT_Vector3 pos[4],
434  const PrimData &prim_data,
435  float &outer_tmin,
436  float &outer_tmax,
437  const uint index,
438  FUNCTOR &hit_info);
439 
440  template<bool farthest,bool rm_backface,bool reverse,typename FUNCTOR>
441  static SYS_FORCE_INLINE bool intersectHex(
442  const UT_Vector3 &origin,
443  const UT_Vector3 &direction,
444  const UT_Vector3 &inverse_direction,
445  const UT_Vector3 pos[8],
446  int &max_dir,
447  UT_Vector3 &N0,
448  UT_Vector3 &N1,
449  const PrimData &prim_data,
450  float &outer_tmin,
451  float &outer_tmax,
452  const uint index,
453  FUNCTOR &hit_info);
454 
455  template<bool farthest>
456  static SYS_FORCE_INLINE bool triClosestPoint(
457  uint index,
458  const VectorType &origin,
459  const VectorType pos[3],
460  const PrimData &prim_data,
461  const UT_Vector3 &normal,
462  float &max_dist_squared,
463  exint &hit_index,
464  UT_Vector3 &hit_uvw,
465  UT_Vector3 &hit_position);
466 
467  template<bool farthest>
468  static SYS_FORCE_INLINE bool quadClosestPoint(
469  uint index,
470  const VectorType &origin,
471  const UT_FixedVector<v4uf,3> &vorigin,
472  const VectorType pos[4],
473  const PrimData &prim_data,
474  float &max_dist_squared,
475  exint &hit_index,
476  UT_Vector3 &hit_uvw,
477  UT_Vector3 &hit_position);
478 
479  static bool hexClosestPoint(
480  uint index,
481  const VectorType &origin,
482  const UT_FixedVector<v4uf,3> &vorigin,
483  const VectorType pos[8],
484  float &max_dist_squared,
485  exint &hit_index, UT_Vector3 &hit_uvw, UT_Vector3 &hit_position);
486 
487  template<typename V3_ARRAY>
488  SYS_FORCE_INLINE static void addTriangleData(
489  GA_Offset *&tri_points,
490  const V3_ARRAY &positions,
491  const GA_ROHandleT<VectorType> &posattrib,
492  PrimData *primdata,
493  SingleBoxType *prim_box_start,
494  exint &tri_primnum,
495  GA_Offset primoff,
496  int data_int = -1,
497  float data_float = 0) noexcept;
498 
499  template<typename V3_ARRAY>
500  SYS_FORCE_INLINE static void addQuadData(
501  GA_Offset *&quad_points,
502  const V3_ARRAY &positions,
503  const GA_ROHandleT<VectorType> &posattrib,
504  PrimData *primdata,
505  SingleBoxType *prim_box_start,
506  exint &quad_primnum,
507  GA_Offset primoff,
508  int data_int = -1,
509  float data_float = 0) noexcept;
510 
511  SYS_FORCE_INLINE static void addRayPrimInfo(
512  PrimData &primdata,
513  GA_Offset primoff,
514  SingleBoxType &primbox,
515  GU_RayPrimInfo *rayprim,
516  exint &other_primnum,
517  const GEO_Detail &detail,
518  float w = 0) noexcept;
519 
520 public:
521  // NOTE: These are only public to work around a compile error.
522  using BVHBase::SingleHitAndNormalFunctor;
523  using BVHBase::AllHitsAndNormalsFunctor;
524 
525  template<bool farthest,bool rm_backface,bool reverse,bool bidirectional,typename FUNCTOR>
527 protected:
528 
529  // We must specify that this is at global scope because we're inside a
530  // namepspace here.
531  friend class ::GU_RayHeightFieldInfo;
532 };
533 
534 #if 0
535 class GU_API BVH_2D : public BVHBase<2, BVH_2D>
536 {
537  using Base = BVHBase<2, BVH_2D>;
538  friend class Base;
539  static constexpr uint NAXES = 2;
540 
541  static constexpr bool theHasPrimitives = true;
542 
543  struct PrimData
544  {
545  GA_Offset myPrimOff;
546  union {
547  void *myDataPtr;
548  uint myDataInts[2];
549  };
550  VectorType myN;
551  float myF;
552  };
553 
554  /// Point offsets for segments
555  UT_UniquePtr<GA_Offset[]> mySegmentPoints;
556 
557  GA_Size myOtherPrimStart;
558 
559  /// Additional data for primitives.
560  UT_UniquePtr<PrimData[]> myPrimData;
561 
562 public:
563  SYS_FORCE_INLINE BVH_2D() noexcept
564  : Base()
565  , mySegmentPoints(nullptr)
566  {}
567 
568  SYS_FORCE_INLINE GA_Offset primitiveOffset(exint prim_index) const noexcept
569  {
570  return myPrimData[prim_index].myPrimOff;
571  }
572 
573  SYS_FORCE_INLINE void clear() noexcept
574  {
575  Base::clear();
576  mySegmentPoints.reset();
577  myPrimData.reset();
578  }
579 
580  struct Options
581  {
582  enum PointStyle
583  {
584  NO_POINTS,
585  DISCONNECTED_POINTS,
586  ALL_POINTS
587  };
588 
589  PointStyle points = NO_POINTS;
590 
591  const GA_Range *point_range = nullptr;
592  const GA_Range *prim_range = nullptr;
593  bool just_edges = false;
594  };
595 
596  void init(const GA_Detail &detail,
597  const GA_ROHandleT<VectorType> &P,
598  const Options &options,
600  const bool force_rebalance=false) noexcept;
601 
602 protected:
603  template<bool farthest,bool rm_backface,bool reverse>
604  SYS_FORCE_INLINE bool intersectPrim(
605  uint index, const VectorType &origin, const VectorType &direction,
606  const VectorType &inverse_direction,
607  int &max_dir, VectorType &N0, VectorType &N1,
608  float &outer_tmax, float &outer_tmin, exint &hit_index, UT_Vector3 &hit_uvw) const noexcept;
609  template<bool farthest>
610  SYS_FORCE_INLINE void closestPrim(
611  uint index, const VectorType &origin, float &max_dist_squared,
612  exint &hit_index, UT_Vector3 &hit_uvw, VectorType &hit_position,
613  const UT_FixedVector<v4uf,NAXES> &vorigin,
614  UT_Array<exint> *nesting_array,
615  exint nesting_array_base) const noexcept;
616  template<bool normalize>
617  SYS_FORCE_INLINE VectorType primGeometricNormal(const CommonHitInfo &hit_info) const noexcept;
618  SYS_FORCE_INLINE void primDerivs(const CommonHitInfo &hit_info, VectorType &dP_du, VectorType &dP_dv) const noexcept;
619  template<GA_AttributeOwner owner,typename T,typename DEST_T>
620  SYS_FORCE_INLINE bool primAttribute(const CommonHitInfo &hit_info, const GA_ROHandleT<T> &attrib, const GEO_Detail &detail, DEST_T &value) const noexcept;
621 };
622 #endif
623 
624 } // GU namespace
625 
626 using GU_BVH = GU::BVH;
627 
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:632
int64 GA_DataId
Definition: GA_Types.h:703
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)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
int64 exint
Definition: SYS_Types.h:125
Definition: GU_BVH.h:33
PUGI__FN void reverse(I begin, I end)
Definition: pugixml.cpp:7458
#define GA_INVALID_DATAID
Definition: GA_Types.h:704
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:243
SYS_FORCE_INLINE bool isPacked(exint index) const noexcept
Definition: GU_BVH.h:379
SYS_FORCE_INLINE bool isNGon(exint index) const noexcept
Definition: GU_BVH.h:365
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:653
GA_API const UT_StringHolder scale
GLfloat f
Definition: glcorearb.h:1926
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
GA_ROHandleT< fpreal32 > GA_ROHandleF
Definition: GA_Handle.h:1403
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
FMT_CONSTEXPR basic_fp< F > normalize(basic_fp< F > value)
Definition: format.h:1701
Container class for all geometry.
Definition: GA_Detail.h:105
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
SYS_FORCE_INLINE UT_StorageMathFloat_t< T > normalize() noexcept
Definition: UT_Vector3.h:378
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:8574
unsigned int uint
Definition: SYS_Types.h:45