12 #ifndef __GU_PathHedge_h__
13 #define __GU_PathHedge_h__
62 return myV0 == other.myV0
63 && myV1 == other.myV1;
67 return !(*
this == other);
87 size_t hash_val =
GA_Size(myV0);
88 SYShashCombine(hash_val,
GA_Size(myV1));
101 bool exclude_prims =
true);
116 void iterEquivalentHedges(
120 void iterEquivalentHedges(
133 return nextEquivalentHedge(hedge);
182 return (h1_p0 == h2_p0 && h1_p1 == h2_p1) ||
183 (h1_p0 == h2_p1 && h1_p1 == h2_p0);
232 myGdp.getPrimitive(myGdp.vertexPrimitive(h.
v0())));
243 exploreVtxPrim(h.
v0());
266 if (!isValidHedge(hedge))
269 return sym(hedge) == hedge;
279 return isQuadVtx(hedge.
v0());
291 exint nvtx = myGdp.getNumVertexOffsets();
293 myVtxNextArr.clear();
294 myVtxPrevArr.clear();
295 myVtxNextArr.setSize(nvtx);
296 myVtxPrevArr.setSize(nvtx);
299 myQuadVtx.setAllBits(
false);
300 myPolyVtx.setAllBits(
false);
301 myPolySymCache.clear();
302 myPolyPrimaryCache.clear();
303 myPolySymCache.setSize(nvtx);
304 myPolyPrimaryCache.setSize(nvtx);
307 myPrimaryCache.clear();
321 bool myExcludePrims =
true;
364 : myHedge{hedge}, mySign{
sign} {}
367 {
return myHedge.isValid(); }
381 {
return mySign >= 0; }
384 {
return !isPositive(); }
388 return myHedge == other.myHedge &&
389 (!has_sign || mySign == other.mySign);
393 {
return isEqual(other); }
396 {
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
bool GAisValid(GA_Size v)
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 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
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)