13 #ifndef __GU_RayIntersect_h__
14 #define __GU_RayIntersect_h__
28 namespace GU {
class BVH; }
75 if (myList(idx) == mySerial)
78 myList(idx) = mySerial;
85 if (myList(idx) == mySerial)
92 myList(idx) = mySerial;
97 if (myList.entries() !=
length)
99 myList.entries(length);
106 int64 mem = inclusive ?
sizeof(*this) : 0;
107 mem += myList.getMemoryUsage(
false);
121 return (
t==x.
t && u == x.
u &&
v == x.
v &&
w == x.
w && d2 == x.
d2 && prim == x.
prim);
152 myIgnoreTrims =
true;
153 myUseAlgebraic =
false;
154 myIgnoreMeta =
false;
155 myExpandPolygon =
false;
161 myUnitTimeOffset = 0.0F;
162 myUnitTimeUpperTol = 0.0F;
171 mySerialList = seriallist;
174 {
return mySerialList->firstTime(serialidx); }
176 {
return mySerialList->firstTimeWithReset(serialidx); }
178 { mySerialList->reset(serialidx); }
181 void init(
float max = 1E18f,
float min=0.0
f,
183 float tolerance = 1e-1F,
int ignoretrims=1,
184 int usealgebraic = 0);
188 return (t >= myTmin && t <= myTmax);
191 bool insertHit(
float nt,
float nu,
float nv,
float nw,
252 accurate = naccurate;
261 mySerialList = seriallist;
264 {
return mySerialList->firstTime(serialidx); }
266 {
return mySerialList->firstTimeWithReset(serialidx); }
268 { mySerialList->reset(serialidx); }
286 void insertMin(
float nd2,
float nu1,
float nv1,
float nw1,
287 float nu2,
float nv2,
float nw2,
319 return( dmin == other.
dmin
320 && dmax == other.
dmax
329 && prim == other.
prim );
350 virtual float getMaxRadius(
int prim_num )
const = 0;
351 virtual float getRadius(
int prim_num,
352 float u_real,
float v_real )
const = 0;
378 bool picking =
false,
bool polyline =
false,
bool harden =
false,
379 bool usevisibility =
false,
380 bool solidtet =
false);
384 bool polyline =
false,
bool solidtet=
false);
400 bool picking =
false,
bool polyline =
false,
bool harden =
false,
401 bool usevisibility =
false);
407 static bool validForDeformingGeometry(
const GU_Detail *gdp0,
411 bool picking =
false,
bool polyline =
false,
bool harden =
false,
412 bool usevisibility =
false,
bool solidtet =
false);
414 bool polyline =
false,
bool solidtet =
false);
418 bool picking =
false,
bool polyline =
false,
bool harden =
false,
419 bool usevisibility =
false);
421 bool init()
const {
return myTree != 0; }
428 bool validForDetail(
const GU_Detail *gdp)
const;
452 bool normalize_weights,
454 float radius = 0.0
f )
const;
471 int isInside(
const UT_Vector3 &pt,
bool ignoretrim =
true,
472 float tol=0.1)
const;
474 int isInsideWinding(
const UT_Vector3 &pt,
bool ignoretrim =
true,
475 float tol = 0.1)
const;
478 bool isEmpty()
const;
484 int64 getMemoryUsage(
bool inclusive)
const;
491 static void fixBrokenUVs(
const GEO_Primitive *prim,
float &u,
float &
v);
493 static void fixBrokenUVs(
const GEO_Primitive *prim,
double &u,
double &
v);
500 void initDetailTracking(
const GU_Detail *gdp);
506 int n,
uint seed = 1,
bool ignoretrim =
true,
507 float tol = 0.1)
const;
508 int determineStateWinding(
const UT_Vector3 &pt,
510 int n,
uint seed = 1,
bool ignoretrim =
true,
511 float tol = 0.1)
const;
533 int myDetailUniqueId;
534 int myDetailCacheCount;
537 bool myBuiltWithGroup : 1;
GA_API const UT_StringHolder dist
void init(float max=1E18F, float min=1e-14F)
bool firstTimeWithReset(int serialidx) const
GU_RayPrimInfo * priminfo
void resetSerial(int serialidx)
GU_RaySerial * getSerialList() const
bool firstTime(int idx) const
GLuint GLsizei GLsizei * length
GEO_ConstPrimitiveP myPrim
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLfloat GLfloat GLfloat v2
void setSerialList(GU_RaySerial *seriallist)
void insertMin(float nd2, float nu1, float nv1, float nw1, float nu2, float nv2, float nw2, GEO_ConstPrimitiveP p)
A range of elements in an index-map.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
GU_IsectCurveSet * myCurveSet
GU_RayInfo(float max=1E18f, float min=0.0f, GU_RayFindType type=GU_FIND_CLOSEST, float tol=1e-1F)
int64 getMemoryUsage(bool inclusive) const
bool firstTime(int serialidx) const
GU_MinInfo(float max=1E18F, float min=1e-14F, int naccurate=1)
GU_RayFindType getFindType() const
GU_RaySerial * getSerialList() const
int operator==(const GU_RayInfoHit &x) const
virtual ~GU_ProximityHelper()
bool firstTime(int serialidx) const
void setSerialList(GU_RaySerial *seriallist)
IMATH_CONSTEXPR14 bool intersect(const Line3< T > &line, const Vec3< T > &v0, const Vec3< T > &v1, const Vec3< T > &v2, Vec3< T > &pt, Vec3< T > &barycentric, bool &front) IMATH_NOEXCEPT
void resetSerial(int serialidx)
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLubyte GLubyte GLubyte GLubyte w
int operator==(const GU_MinInfo &other) const
const GU_Detail * detail() const
bool firstTimeWithReset(int serialidx) const
UT_Array< GU_RayInfoHit > * myHitList
bool firstTimeWithReset(int idx)
void ensureListExists(int length)