12 #ifndef __GU_RayPrimInfo_h__
13 #define __GU_RayPrimInfo_h__
42 #ifdef OPENVDB_ENABLED
72 float &
t,
float &u,
float &
v,
float &d2);
124 void bumpRefCount(
int dir);
125 static void getXYProjection(
const UT_Vector3 &nml,
int &
x,
int &
y);
141 virtual int64 getMemoryUsage(
bool inclusive)
const = 0;
187 int64 mem = inclusive ?
sizeof(*this) : 0;
226 template<
bool ISTET=false>
254 int64 mem = inclusive ?
sizeof(*this) : 0;
267 template<
bool ISTET=false>
295 int64 mem = inclusive ?
sizeof(*this) : 0;
324 float A[4]) noexcept;
331 const float A[4]) noexcept;
353 int64 mem = inclusive ?
sizeof(*this) : 0;
382 int64 mem = inclusive ?
sizeof(*this) : 0;
418 int64 mem = inclusive ?
sizeof(*this) : 0;
449 int64 mem = inclusive ?
sizeof(*this) : 0;
463 template<
bool ISHEX=false>
470 float ustart = 0.0F,
float ulength = 1.0F,
471 float vstart = 0.0F,
float vlength = 1.0F,
472 bool revml =
false,
float w=0.0
f);
494 int64 mem = inclusive ?
sizeof(*this) : 0;
510 template<
bool ISHEX=false>
517 float ustart = 0.0
f,
float ulen = 1.0
f,
518 float vstart = 0.0
f,
float vlen = 1.0
f,
519 bool revnml =
false,
float w=0.0
f);
541 int64 mem = inclusive ?
sizeof(*this) : 0;
589 int64 mem = inclusive ?
sizeof(*this) : 0;
616 template<
typename ARRAY_TYPE>
635 int64 mem = inclusive ?
sizeof(*this) : 0;
637 mem += npts *
sizeof(xval[0]);
639 mem += npts *
sizeof(yval[0]);
703 #ifdef OPENVDB_ENABLED
725 template<
bool farthest,
bool rm_backface,
bool reverse,
bool b
idirectional,
typename FUNCTOR>
736 FUNCTOR &functor)
const;
765 int polyline,
int harden,
bool solidtet);
786 const int myPolyLine;
788 const int mySolidTet;
830 int64 mem = inclusive ?
sizeof(*this) : 0;
856 , myFirstSpanFlag(is_first_span)
857 , myLastSpanFlag(is_last_span)
879 int intersectEndPointZone(
890 bool myFirstSpanFlag : 1,
912 return knots.
size() - 1;
914 template<
typename FUNCTOR>
917 const int ord = bezcurve->
getOrder();
922 for (
int j = last;
j >= 0; --
j)
924 const bool is_first = (
j == 0);
925 const bool is_last = (
j ==
last);
927 is_first, is_last,
j, s, ord));
958 int64 mem = inclusive ?
sizeof(*this) : 0;
960 mem += myCurve->getMemoryUsage(
true);
981 template<
typename FUNCTOR>
988 const bool rational = nurbcurve->
isRational();
991 for (pyramid.rewind(ub); !pyramid.atEnd(); pyramid.advance())
994 nurbcurve, (pinfonum ? *pinfonum : 0),
995 pyramid.getInterval(), pyramid.getResult(),
998 functor(nurbcurveinfo);
1029 int64 mem = inclusive ?
sizeof(*this) : 0;
1030 mem += myCurve.getMemoryUsage(
false);
1051 int u_span,
int v_span,
1052 int u_ord,
int v_ord,
1053 float u_start,
float u_length,
1054 float v_start,
float v_length,
1055 int u_beg,
int v_beg,
1056 int u_num,
int v_num,
1067 template<
typename FUNCTOR>
1078 for (
int r = vknots.
size()-2;
r >= 0;
r--)
1080 const int r1 = (vord-1)*
r;
1081 for (
int c = uknots.
size()-2;
c >= 0;
c--)
1083 const int c1 = (uord-1)*
c;
1085 bezsurf, (pinfonum ? *pinfonum : 0),
1088 uknots(
c), uknots(
c+1)-uknots(
c),
1089 vknots(
r), vknots(
r+1)-vknots(
r),
1126 int64 mem = inclusive ?
sizeof(*this) : 0;
1128 mem += mySurf->getMemoryUsage(
true);
1142 int u_ord,
int v_ord,
1148 template<
typename FUNCTOR>
1158 const bool rational = nurbsurf->
isRational();
1160 for (uPyramid.rewind(ub); !uPyramid.atEnd(); uPyramid.advance())
1163 for (vPyramid.rewind(vb); !vPyramid.atEnd(); vPyramid.advance())
1166 (pinfonum ? *pinfonum : 0),
1168 u, vPyramid.getInterval(),
1169 vPyramid.getResult(),
1200 int64 mem = inclusive ?
sizeof(*this) : 0;
1201 mem += mySurf.getMemoryUsage(
false);
1237 int64 mem = inclusive ?
sizeof(*this) : 0;
SYS_FORCE_INLINE GA_Detail & getDetail() const
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
static void build(const FUNCTOR &functor, const GEO_PrimNURBSurf *nurbsurf, int *pinfonum=nullptr)
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
UT_UniquePtr< float[]> FloatPtrArray
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
SYS_FORCE_INLINE GA_Size getVertexCount() const
Return the number of vertices used by this primitive.
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
const UT_Array< GA_Offset > pts
virtual int minimum(const GEO_Detail &geo, const UT_Vector3 &p, GU_MinInfo &mininfo)
UT_UniquePtr< GU_RayRBezCurve > myCurve
virtual void init(const GEO_Detail &geo)
UT_Vector3T< float > UT_Vector3
virtual int minimumPrim(const GEO_Detail &geo, const GEO_Detail &prim_geo, GU_RayPrimInfo *prim, GU_MinInfo &mininfo)
virtual int intersectPrim(const GEO_Detail &geo, const GEO_Detail &prim_geo, GU_RayPrimInfo *prim, GU_RayInfo &hitinfo)
GEO_PrimVolumeXform myXform
GU_RayCurveInfo(GEO_ConstPrimitiveP curve, int serialidx, bool is_first_span, bool is_last_span)
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
unsigned getVOrder() const
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
int GU_getBilinearQuadIntersection(const UT_Vector3 &org, const UT_Vector3 &dir, const UT_Vector3 &A, const UT_Vector3 &B, const UT_Vector3 &C, const UT_Vector3 &D, const UT_Vector3 &norm, float &t, float &u, float &v, float &d2)
float globalDist(float t) const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
static void build(const FUNCTOR &functor, const GEO_PrimRBezSurf *bezsurf, int *pinfonum=nullptr)
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
UT_UniquePtr< GU_RayRBezSurf > mySurf
GU_API bool GUisPointInsideTet(const UT_Vector3 &query, const UT_Vector3 *ps, UT_Vector3 n[4], bool &negated, float dots[4], float A[4]) noexcept
static int count(const GEO_PrimRBezCurve *bezcurve)
const openvdb::GridBase * myGridRawPtr
virtual UT_Vector3 getNormal(const UT_Vector3 &uvw) const
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
UT_Vector3 getNormal(const UT_Vector3 &uvw) const override
static void build(const FUNCTOR &functor, const GEO_PrimRBezCurve *bezcurve, int *pinfonum=nullptr)
SYS_FORCE_INLINE int getNumRows() const
GEO_ConstPrimitiveP myPrim2
GA_PrimitiveP_T< const GEO_Primitive, const GEO_Detail > GEO_ConstPrimitiveP
NURBS basis classes which maintain knot vectors.
float localDist(float t) const
UT_Vector3 getNormal(const UT_Vector3 &uvw) const override
const UT_VoxelArrayF * mySamples
SYS_FORCE_INLINE GEO_ConstPrimitiveP primP(const GEO_Detail &geo) const
UT_Vector3 getNormal(const UT_Vector3 &uvw) const override
UT_Vector3 getNormal(const UT_Vector3 &uvw) const override
GEO_PrimVolumeXform myXform
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
const GA_Basis * getBasis() const
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
__hostdev__ uint64_t last(uint32_t i) const
GLfloat GLfloat GLfloat GLfloat h
static void build(const FUNCTOR &functor, const GEO_PrimNURBCurve *nurbcurve, int *pinfonum=nullptr)
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
GU_API UT_Vector3 GUfindPointInsideTet(float dots[4], const float A[4]) noexcept
const GA_KnotVector & getVector() const
unsigned getOrder() const override
~GU_RayCurveInfo() override
virtual int64 getMemoryUsage(bool inclusive) const =0
Report approximate memory usage.
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
GLubyte GLubyte GLubyte GLubyte w
SYS_FORCE_INLINE int getNumCols() const
UT_ThreadSpecificValue< void * > myCache
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
static exint count(const GEO_PrimRBezSurf *bezsurf)
unsigned getUOrder() const
SYS_AtomicCounter refCount
GA_Basis * getUBasis() const
int64 getMemoryUsage(bool inclusive) const override
Report approximate memory usage.
int getOrder() const
Return the order of the basis.
virtual int intersect(const GEO_Detail &geo, const UT_Vector3 &org, const UT_Vector3 &dir, GU_RayInfo &hitinfo)
UT_Vector3 getNormal(const UT_Vector3 &uvw) const override
GA_Basis * getVBasis() const
UT_Vector3 getNormal(const UT_Vector3 &uvw) const override