13 #ifndef __GU_SplitLoc_h__
14 #define __GU_SplitLoc_h__
23 namespace GU_EdgeSplitUtils
25 template <
typename Prec>
29 if constexpr (std::is_same_v<Prec, fpreal32>)
52 && myCV1 == src.
myCV1;
59 else if (myCV0 != src.
myCV0)
60 return myCV0 < src.
myCV0;
62 return myCV1 < src.
myCV1;
79 (
exint)myCurve->getPrimitiveVertexCount(myCPrim);
80 next.
myCV0 = (myCV0 + 1) % nv;
81 next.
myCV1 = (myCV1 + 1) % nv;
94 const unsigned int size_t_bits =
95 std::numeric_limits<size_t>::digits;
96 const int length = (std::numeric_limits<fpreal>::digits - 1)
97 / static_cast<int>(size_t_bits);
103 for(
unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
105 seed ^= (size_t) (positive >> i) + (seed<<6) + (seed>>2);
107 seed ^= (size_t) val + (seed<<6) + (seed>>2);
117 const size_t m = UINT64_C(0xc6a4a7935bd1e995);
135 return parent.
hash();
140 template<
typename Prec>
159 , myInsidePrim(false)
163 , myCurveSegment(curve.
get(),
v0,
v1, cp)
183 , myInsidePrim(false)
184 , myIsFirst(is_first)
187 , myCurveSegment(curve.
get(),
v0,
v1, cp)
206 , myGdp(&poly->getDetail())
207 , myCurveSegment(curve.
get(),
v0,
v1, cp)
225 , myIsFirst(is_first)
228 , myGdp(&poly->getDetail())
229 , myCurveSegment(curve.
get(),
v0,
v1, cp)
UT_SharedPtr< GU_SplitLocT< fpreal > > GU_SplitLocTPtr
UT_Array< GU_SplitLocTPtr > GU_SplitLocTArray
GLsizei const GLfloat * value
GLuint GLsizei GLsizei * length
GU_SplitLocParent myCurveSegment
exint GA_Size
Defines the bit width for index and offset types in GA.
#define GA_INVALID_OFFSET
SYS_FORCE_INLINE size_t hash_value(const GU_SplitLocParent &parent)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
SYS_FORCE_INLINE const Prec getTol()
GU_SplitLocT(Prec u, Prec v, GEO_PrimPoly *poly, bool is_first, bool is_last, const UT_SharedPtr< GU_Detail > curve=nullptr, exint v0=-1, exint v1=-1, GA_Offset cp=GA_INVALID_OFFSET)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
const GU_Detail * myCurve
UT_Array< GU_SplitLoc * > GU_SplitLocArray
GU_SplitLocT(const GA_Detail *gdp, GA_Offset p0off, GA_Offset p1off, Prec t, GEO_PrimPoly *poly, bool is_first, bool is_last, const UT_SharedPtr< GU_Detail > curve=nullptr, exint v0=-1, exint v1=-1, GA_Offset cp=GA_INVALID_OFFSET)
GU_EXTERN_TEMPLATE(GU_SplitLocT< fpreal32 >)
GU_SplitLocT(Prec u, Prec v, GEO_PrimPoly *poly, const UT_SharedPtr< GU_Detail > curve=nullptr, exint v0=-1, exint v1=-1, GA_Offset cp=GA_INVALID_OFFSET)
void hashCombine(size_t &seed, const T &value)
Combine the hash of a value with an existing seed.
auto get(const UT_ARTIterator< T > &it) -> decltype(it.key())
GU_SplitLocT< fpreal32 > GU_SplitLoc
UT_Array< GU_SplitLocParent > GU_SplitLocParentArray
void setParentCurve(const GU_SplitLocT &src)
GU_SplitLocParent next() const
bool operator<(const GU_SplitLocParent &src) const
Container class for all geometry.
bool operator!=(const GU_SplitLocT &src) const
GU_SplitLocT(const GA_Detail *gdp=nullptr, GA_Offset p0off=GA_INVALID_OFFSET, GA_Offset p1off=GA_INVALID_OFFSET, Prec t=0, GEO_PrimPoly *poly=nullptr, const UT_SharedPtr< GU_Detail > curve=nullptr, exint v0=-1, exint v1=-1, GA_Offset cp=GA_INVALID_OFFSET)
bool operator==(const GU_SplitLocParent &src) const
FMT_INLINE void print(format_string< T...> fmt, T &&...args)
GU_SplitLocParent(const GU_Detail *curve=nullptr, exint v0=-1, exint v1=-1, GA_Offset cp=GA_INVALID_OFFSET)