10 #ifndef __GU_QuadLayout_h__
11 #define __GU_QuadLayout_h__
73 {
return int(myArcStart.size() / 4); }
82 {
return myPolyBlock.get(poly); }
89 {
return polyBlock(hedgePoly(h)); }
95 {
return getFlags(vtx, SINGULAR_VTX) != 0; }
101 {
return getFlags(vtx, NODE_VTX) != 0; }
112 {
return a >= 0 && isValid(arcStart(a)); }
120 bool isValidBlock(
int b)
const;
125 bool isFreeBlock(
int b)
const;
139 int arcSym(
int a)
const {
return myArcSym(a); }
144 {
return (a % 4 == 3) ? a - 3 : a + 1; }
149 {
return (a % 4 == 0) ? a + 3 : a - 1; }
162 {
return quadSucc(h, ARC_HDG); }
180 {
return myArcOrientation(a); }
190 {
return myNumBlockComponents; }
193 template <
typename T>
194 int foreachBlockPoly(
int b,
const T&
func)
const;
212 INTERIOR_VTX = 1 << 2,
213 SINGULAR_VTX = 1 << 3,
215 BOUNDARY_HDG = 1 << 5,
228 {
return myHip->srcVertex(h); }
232 {
return myHip->srcPoint(h); }
236 {
return myHip->dstPoint(h); }
240 {
return myHip->lnext(h); }
244 {
return myHip->lprev(h); }
248 {
return myGdp->vertexPrimitive(vtx); }
256 {
return myPolyIsland.isValid()
257 ? myPolyIsland.get(poly) : 0; }
261 {
return polyIsland(hedgePoly(h)); }
274 if (h_sym == h || myHip->sym(h_sym) !=
h)
283 if (hedgeIsland(h) != hedgeIsland(h_sym))
296 && myGdp->getPrimitiveVertexCount(poly) == 4
297 && myGdp->getPrimitiveClosedFlag(poly);
305 {
return uint32(myVertexFlags.get(vtx)); }
309 {
return (
uint32(myVertexFlags.get(vtx)) & mask); }
317 { myVertexFlags.set(vtx,
getFlags(vtx) | mask); }
325 { myVertexFlags.set(vtx,
getFlags(vtx) & (!mask)); }
337 HedgeInterfaceUptr myOwnHip;
339 int myNumBlockComponents = 0;
340 ArcOrientationArray myArcOrientation;
350 if (getFlags(h, stop_mask) || getFlags(h, SINGULAR_VTX))
373 for (
int i = 0; i < 4; i++)
376 for (
int j = 0;
j < 4;
j++)
384 template <
typename T>
404 trace(h0, &row_hedges);
405 for (
auto h : row_hedges)
410 h0 = sym(lnext(lnext(h0)));
SYS_FORCE_INLINE int blockComponent(int b) const
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
SYS_FORCE_INLINE GA_Offset srcPoint(const GA_Detail *gdp, GEO_Hedge h)
Definition of a geometry attribute.
SYS_FORCE_INLINE ArcOrientation arcOrientation(int a) const
SYS_FORCE_INLINE GEO_Hedge arcStart(int a) const
__hostdev__ bool isValid(GridType gridType, GridClass gridClass)
return true if the combination of GridType and GridClass is valid.
SYS_FORCE_INLINE bool isValidBlock(int b) const
GA_Offset srcVertex(GEO_Hedge)
GLboolean GLboolean GLboolean GLboolean a
SYS_FORCE_INLINE bool isValidArc(int a) const
SYS_FORCE_INLINE int arcLprev(int a) const
#define GEO_INVALID_HEDGE
An invalid hedge is sometimes returned if an operation is unsuccessful.
int getFlags(int version)
SYS_FORCE_INLINE int arcSym(int a) const
SYS_FORCE_INLINE int polyBlock(GA_Offset poly) const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
SYS_FORCE_INLINE bool isOnArc(GEO_Hedge h) const
SYS_FORCE_INLINE int numBlockComponents() const
SYS_FORCE_INLINE int arcLnext(int a) const
GEO_Hedge encapsulates a half-edge (hedge) which is the restriction of.
SYS_FORCE_INLINE bool isSingular(GA_Offset vtx) const
SYS_FORCE_INLINE bool isFreeBlock(int b) const
int foreachBlockPoly(int b, const T &func) const
GLboolean GLboolean GLboolean b
UT_UniquePtr< GA_Attribute > GA_AttributeUPtr
SYS_FORCE_INLINE GEO_Hedge hedgeSucc(GEO_Hedge h) const
GLfloat GLfloat GLfloat GLfloat h
SYS_FORCE_INLINE int arcBlock(int a) const
SYS_FORCE_INLINE bool isNode(GA_Offset vtx) const
UT_Array< GEO_Hedge > HedgeArray
GEO_Hedge trace(GEO_Hedge h, HedgeArray *hedges=nullptr) const
SYS_FORCE_INLINE int blockArc(int b, int a=0) const
SYS_FORCE_INLINE int hedgeBlock(GEO_Hedge h) const
const GEO_DetachedHedgeInterface HedgeInterface
void clear()
Resets list to an empty list.
UT_StringArray JOINTS hip
SYS_FORCE_INLINE GA_Offset dstPoint(T &iface, GEO_Hedge h)