12 #ifndef __GU_PathHedge_h__
13 #define __GU_PathHedge_h__
70 return myV0 == other.myV0
71 && myV1 == other.myV1;
75 return !(*
this == other);
95 size_t hash_val =
GA_Size(myV0);
96 SYShashCombine(hash_val,
GA_Size(myV1));
109 bool exclude_prims =
true);
124 void iterEquivalentHedges(
128 void iterEquivalentHedges(
141 return nextEquivalentHedge(hedge);
190 return (h1_p0 == h2_p0 && h1_p1 == h2_p1) ||
191 (h1_p0 == h2_p1 && h1_p1 == h2_p0);
240 myGdp.getPrimitive(myGdp.vertexPrimitive(h.
v0())));
251 exploreVtxPrim(h.
v0());
274 if (!isValidHedge(hedge))
277 return sym(hedge) == hedge;
287 return isQuadVtx(hedge.
v0());
299 exint nvtx = myGdp.getNumVertexOffsets();
301 myVtxNextArr.clear();
302 myVtxPrevArr.clear();
303 myVtxNextArr.setSize(nvtx);
304 myVtxPrevArr.setSize(nvtx);
307 myQuadVtx.setAllBits(
false);
308 myPolyVtx.setAllBits(
false);
309 myPolySymCache.clear();
310 myPolyPrimaryCache.clear();
311 myPolySymCache.setSize(nvtx);
312 myPolyPrimaryCache.setSize(nvtx);
315 myPrimaryCache.clear();
329 bool myExcludePrims =
true;
372 : myHedge{hedge}, mySign{
sign} {}
375 {
return myHedge.isValid(); }
389 {
return mySign >= 0; }
392 {
return !isPositive(); }
396 return myHedge == other.myHedge &&
397 (!has_sign || mySign == other.mySign);
401 {
return isEqual(other); }
404 {
return !(*
this == other); }
SYS_FORCE_INLINE GEO_Hedge hedge() const
SYS_FORCE_INLINE GA_Offset srcPoint(const GA_Detail *gdp, GEO_Hedge h)
SYS_FORCE_INLINE bool isPositive() const
GU_PathHedge firstIncidentEdge(GA_Offset pt)
SYS_FORCE_INLINE GA_Edge hedgeToEdge(const GU_PathHedge &hedge) const
T distance3d(const UT_Vector3T< T > &p1, const UT_Vector3T< T > &p2)
Compute the distance between two points.
SYS_FORCE_INLINE fpreal length(const GU_PathHedge &h) const
SYS_FORCE_INLINE GEO_SHedge shedge() const
SYS_FORCE_INLINE GU_PathHedge & set(GA_Offset new_v0, GA_Offset new_v1)
GU_PathHedge(GA_Offset v0, GA_Offset v1)
size_t operator()(const GU_PathHedge &hedge) const
GA_Offset srcVertex(GEO_Hedge)
SYS_FORCE_INLINE bool isNegative() const
SYS_FORCE_INLINE bool areEquivalent(const GU_PathHedge &h1, const GU_PathHedge &h2)
SYS_FORCE_INLINE const GU_PathHedge & hedge() const
bool isHedgeBoundary(const GU_PathHedge &hedge)
SYS_FORCE_INLINE bool operator!=(const GU_PathSHedge &other) const
GA_EdgeT< GA_Offset, false > GA_Edge
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
SYS_FORCE_INLINE bool isEqual(const GU_PathSHedge &other, bool has_sign=true) const
exint GA_Size
Defines the bit width for index and offset types in GA.
#define GA_INVALID_OFFSET
SYS_FORCE_INLINE GA_Offset v1() const
SYS_FORCE_INLINE bool isValid() const
SYS_FORCE_INLINE bool operator==(const GU_PathHedge &other) const
SYS_FORCE_INLINE GA_Offset hedgePrimitiveOffset(const GU_PathHedge &h) const
bool isQuadHedge(const GU_PathHedge &hedge)
GEO_Hedge encapsulates a half-edge (hedge) which is the restriction of.
SYS_FORCE_INLINE GA_Offset dstVertex(const GU_PathHedge &h) const
GU_PathSHedge(const GU_PathHedge &hedge, int sign=1)
SYS_FORCE_INLINE GA_Offset srcVertex(const GU_PathHedge &h) const
SYS_FORCE_INLINE const GEO_Primitive * hedgePrimitive(const GU_PathHedge &h) const
GEO_Hedge firstIncomingHedge(T &iface, GA_Offset pt)
IMATH_HOSTDEVICE constexpr int sign(T a) IMATH_NOEXCEPT
SYS_FORCE_INLINE GU_PathSHedge operator-() const
std::function< T > UT_Function
SYS_FORCE_INLINE GA_Offset dstVertex(T &iface, GEO_Hedge h)
SYS_FORCE_INLINE bool operator==(const GU_PathSHedge &other) const
SYS_FORCE_INLINE size_t hash() const
SYS_FORCE_INLINE bool operator!=(const GU_PathHedge &other) const
GLfloat GLfloat GLfloat GLfloat h
SYS_FORCE_INLINE int sign() const
SYS_FORCE_INLINE bool isValid() const
SYS_FORCE_INLINE size_t hash_value(const GU_PathHedge &hedge)
GEO_Hedge findHedgeWithEndpoints(T &iface, GA_Offset p0, GA_Offset p1)
SYS_FORCE_INLINE GU_PathHedge & reset()
SYS_FORCE_INLINE const GU_Detail * getDetail() const
SYS_FORCE_INLINE bool areEquivalent(T &iface, GEO_Hedge h1, GEO_Hedge h2)
SYS_FORCE_INLINE GA_Offset dstPoint(const GU_PathHedge &h) const
GU_PathHedge sym(const GU_PathHedge &hedge)
SYS_FORCE_INLINE GA_Offset srcPoint(const GU_PathHedge &h) const
GEO_Hedge firstIncidentHedge(T &iface, GA_Offset pt)
SYS_FORCE_INLINE bool isHedgeValidPolygon(const GU_PathHedge &h)
SYS_FORCE_INLINE bool isValidHedge(const GU_PathHedge &hedge) const
SYS_FORCE_INLINE GA_Offset v0() const
SYS_FORCE_INLINE GA_Offset dstPoint(T &iface, GEO_Hedge h)