All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GQ_Edge.h File Reference
#include "GQ_API.h"
#include "GQ_Point.h"
#include <UT/UT_VectorTypes.h>
#include <UT/UT_SmallObject.h>
#include <GA/GA_Edge.h>
#include <iosfwd>
+ Include dependency graph for GQ_Edge.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  GQ_Edge
struct  GQ_Edge::MacroIterStruct


#define GQ_BRIDGE   0x00010000
#define GQ_INTERSECT   0x00020000
#define GQ_INSIDE   0x00040000
#define GQ_OUTSIDE   0x00080000
#define GQ_VISIT   0x00100000
#define GQ_DELETE   0x00200000
#define GQ_NEW   0x00400000
#define GQ_GLUE   0x00800000
#define GQ_SELECTED   0x01000000
#define GQ_SPAREPTR   0x02000000
#define GQ_VTXBOUNDARY   0x04000000
#define GQ_EDGE   0x08000000
#define GQ_CORNER   0x10000000
#define FOR_QUAD_EDGES(elem, edge, nedges, dir)
#define FOR_QUAD_EDGES_STRUCT(elem, localname, dir)
#define Q_RotN(e, n)
 A single quad edge is stored as a GQ_Edge[4] block. More...
#define Q_ROT(e)   (Q_RotN(e, 1))
#define Q_SYM(e)   (Q_RotN(e, 2))
#define Q_IROT(e)   (Q_RotN(e, 3))
#define Q_ONEXT(e)   ((e)->myNext)
#define Q_OPREV(e)   (Q_ROT( Q_ONEXT( Q_ROT(e))))
#define Q_DNEXT(e)   (Q_SYM( Q_ONEXT( Q_SYM(e))))
#define Q_DPREV(e)   (Q_IROT( Q_ONEXT( Q_IROT(e))))
#define Q_LNEXT(e)   (Q_ROT( Q_ONEXT( Q_IROT(e))))
#define Q_LPREV(e)   (Q_SYM( Q_ONEXT(e)))
#define Q_RNEXT(e)   (Q_IROT( Q_ONEXT( Q_ROT(e))))
#define Q_RPREV(e)   (Q_ONEXT( Q_SYM(e)))
#define Q_ORG(e)   ((e)->myData)
#define Q_DEST(e)   (Q_ORG( Q_SYM(e)))
#define Q_LEFT(e)   (Q_ORG( Q_IROT(e)))
#define Q_RIGHT(e)   (Q_ORG( Q_ROT(e)))

Macro Definition Documentation

#define FOR_QUAD_EDGES (   elem,
for (edge=elem->getEdge(), nedges=0; \
edge && (edge != elem->getEdge() || !nedges); \
edge=edge->dir(), nedges++)

Traverse all the edges which access point 'elem'. 'edge' will be set to each edge in turn. 'nedges' will be set to the number of edges accessed. We set our current edge to one of the edges that falls off the point, then we can go from each edge to the onext edge (see notes at onext, oprev, etc in diagram above and comments below). Eventually, you will get back to the original edge. You can use the same macro for faces, but for clarity you might want to change the name of the next pointer to be lnext (next edge on left face).

Definition at line 79 of file GQ_Edge.h.

#define FOR_QUAD_EDGES_STRUCT (   elem,
for (GQ_Edge::MacroIterStruct localname(elem->getEdge(), 0); \
localname.edge && (localname.edge != elem->getEdge()||!localname.i); \
localname.edge=localname.edge->dir(), localname.i++)

Exactly like FOR_QUAD_EDGES, but using a local instance of an unnamed struct to hold the iteration variables.

NB: Because of a Visual Studio bug, we cannot use an unnamed struct as intended.

Example: FOR_QUAD_EDGES_STRUCT(face, scan, lnext) fprintf(stderr, " edge[%d] = %p\n", scan.i, scan.edge);

Definition at line 94 of file GQ_Edge.h.

#define GQ_BRIDGE   0x00010000

Definition at line 56 of file GQ_Edge.h.

#define GQ_CORNER   0x10000000

Definition at line 68 of file GQ_Edge.h.

#define GQ_DELETE   0x00200000

Definition at line 61 of file GQ_Edge.h.

#define GQ_EDGE   0x08000000

Definition at line 67 of file GQ_Edge.h.

#define GQ_GLUE   0x00800000

Definition at line 63 of file GQ_Edge.h.

#define GQ_INSIDE   0x00040000

Definition at line 58 of file GQ_Edge.h.

#define GQ_INTERSECT   0x00020000

Definition at line 57 of file GQ_Edge.h.

#define GQ_NEW   0x00400000

Definition at line 62 of file GQ_Edge.h.

#define GQ_OUTSIDE   0x00080000

Definition at line 59 of file GQ_Edge.h.

#define GQ_SELECTED   0x01000000

Definition at line 64 of file GQ_Edge.h.

#define GQ_SPAREPTR   0x02000000

Definition at line 65 of file GQ_Edge.h.

#define GQ_VISIT   0x00100000

Definition at line 60 of file GQ_Edge.h.

#define GQ_VTXBOUNDARY   0x04000000

Definition at line 66 of file GQ_Edge.h.

#define Q_DEST (   e)    (Q_ORG( Q_SYM(e)))

Definition at line 114 of file GQ_Edge.h.

#define Q_DNEXT (   e)    (Q_SYM( Q_ONEXT( Q_SYM(e))))

Definition at line 107 of file GQ_Edge.h.

#define Q_DPREV (   e)    (Q_IROT( Q_ONEXT( Q_IROT(e))))

Definition at line 108 of file GQ_Edge.h.

#define Q_IROT (   e)    (Q_RotN(e, 3))

Definition at line 104 of file GQ_Edge.h.

#define Q_LEFT (   e)    (Q_ORG( Q_IROT(e)))

Definition at line 115 of file GQ_Edge.h.

#define Q_LNEXT (   e)    (Q_ROT( Q_ONEXT( Q_IROT(e))))

Definition at line 109 of file GQ_Edge.h.

#define Q_LPREV (   e)    (Q_SYM( Q_ONEXT(e)))

Definition at line 110 of file GQ_Edge.h.

#define Q_ONEXT (   e)    ((e)->myNext)

Definition at line 105 of file GQ_Edge.h.

#define Q_OPREV (   e)    (Q_ROT( Q_ONEXT( Q_ROT(e))))

Definition at line 106 of file GQ_Edge.h.

#define Q_ORG (   e)    ((e)->myData)

Definition at line 113 of file GQ_Edge.h.

#define Q_RIGHT (   e)    (Q_ORG( Q_ROT(e)))

Definition at line 116 of file GQ_Edge.h.

#define Q_RNEXT (   e)    (Q_IROT( Q_ONEXT( Q_ROT(e))))

Definition at line 111 of file GQ_Edge.h.

#define Q_ROT (   e)    (Q_RotN(e, 1))

Definition at line 102 of file GQ_Edge.h.

#define Q_RotN (   e,
(e + (((e)->myIndex + n) & 0x03) - \
((e)->myIndex & 0x03))
GLdouble n
Definition: glcorearb.h:2008

A single quad edge is stored as a GQ_Edge[4] block.

Definition at line 100 of file GQ_Edge.h.

#define Q_RPREV (   e)    (Q_ONEXT( Q_SYM(e)))

Definition at line 112 of file GQ_Edge.h.

#define Q_SYM (   e)    (Q_RotN(e, 2))

Definition at line 103 of file GQ_Edge.h.