HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GQ_Edge Class Reference

#include <GQ_Edge.h>

+ Inheritance diagram for GQ_Edge:

Classes

struct  MacroIterStruct
 

Public Member Functions

void init (int i)
 
GQ_Edgeroot ()
 
const GQ_Edgeroot () const
 
void setData (void *org, void *dest, void *left, void *right)
 
GQ_EdgerotN (int n)
 
const GQ_EdgerotN (int n) const
 
GQ_Edgerot ()
 
const GQ_Edgerot () const
 
GQ_Edgesym ()
 
const GQ_Edgesym () const
 
GQ_Edgeirot ()
 
const GQ_Edgeirot () const
 
GQ_Edge *& onext ()
 
const GQ_Edgeonext () const
 
GQ_Edgeoprev ()
 
const GQ_Edgeoprev () const
 
GQ_Edgednext ()
 
const GQ_Edgednext () const
 
GQ_Edgedprev ()
 
const GQ_Edgedprev () const
 
GQ_Edgelnext ()
 
const GQ_Edgelnext () const
 
GQ_Edgelprev ()
 
const GQ_Edgelprev () const
 
GQ_Edgernext ()
 
const GQ_Edgernext () const
 
GQ_Edge *& rprev ()
 
const GQ_Edgerprev () const
 
void *& org ()
 Get the origin of the edge. Needs to be cast to a GQ_Point. More...
 
const voidorg () const
 
GQ_PointorgPoint () const
 
void *& dest ()
 Get the destination of the edge. Needs to be cast to a GQ_Point. More...
 
const voiddest () const
 
GQ_PointdestPoint () const
 
voidsafeDest ()
 
void *& left ()
 Get the face on the left of an edge. Needs to be cast to a GQ_Face. More...
 
const voidleft () const
 
GQ_FaceleftFace () const
 
void *& right ()
 Get the face on the right of an edge. Needs to be cast to a GQ_Face. More...
 
const voidright () const
 
GQ_FacerightFace () const
 
void splice (GQ_Edge *b)
 
void connect (GQ_Edge *a, GQ_Edge *b)
 
void connect (GQ_Point *org1, GQ_Edge *b)
 
void connect (GQ_Edge *b)
 
void disconnectOrg ()
 
void disconnect ()
 Disconnect completely. More...
 
void swap ()
 
int isBridge () const
 
int isShare () const
 
int isBoundary () const
 
int intersectPlane (UT_Vector3 &nml, float d, float &t, int donml=1)
 
int intersect (GQ_Point *pt)
 
int intersect (GQ_Edge *edge)
 
int intersect (GQ_Point *org, GQ_Point *dest)
 
int intersect (GQ_Face *face, float &t)
 
void setFlags (unsigned mask)
 
unsigned getFlags (unsigned mask=~0) const
 
void addFlags (unsigned mask)
 
void clearFlags (unsigned mask=~0)
 
int index () const
 
 operator GA_Edge ()
 Cast operator into GA_Edge. More...
 
 operator GA_Edge () const
 
std::ostream & save (std::ostream &os) const
 

Friends

std::ostream & operator<< (std::ostream &os, const GQ_Edge &e)
 

Additional Inherited Members

- Static Public Member Functions inherited from UT_SmallObject< GQ_Edge >
static voidoperator new (size_t size)
 Regular new/delete operators. More...
 
static void operator delete (void *p, size_t size)
 Regular new/delete operators. More...
 
static voidoperator new (size_t, void *p)
 
static void operator delete (void *, void *)
 

Detailed Description

Definition at line 120 of file GQ_Edge.h.

Member Function Documentation

void GQ_Edge::addFlags ( unsigned  mask)
inline

Definition at line 288 of file GQ_Edge.h.

void GQ_Edge::clearFlags ( unsigned  mask = ~0)
inline

Definition at line 289 of file GQ_Edge.h.

void GQ_Edge::connect ( GQ_Edge a,
GQ_Edge b 
)
inline

Make this edge to connect between edge a and b this->left() == a->left() == b->left()

Definition at line 235 of file GQ_Edge.h.

void GQ_Edge::connect ( GQ_Point org1,
GQ_Edge b 
)
inline

Connect this edge as the next edge of b in polygon this->left() == b->left()

Definition at line 245 of file GQ_Edge.h.

void GQ_Edge::connect ( GQ_Edge b)
inline

Definition at line 252 of file GQ_Edge.h.

void*& GQ_Edge::dest ( )
inline

Get the destination of the edge. Needs to be cast to a GQ_Point.

Definition at line 181 of file GQ_Edge.h.

const void* GQ_Edge::dest ( ) const
inline

Definition at line 182 of file GQ_Edge.h.

GQ_Point* GQ_Edge::destPoint ( ) const
inline

Definition at line 184 of file GQ_Edge.h.

void GQ_Edge::disconnect ( )

Disconnect completely.

void GQ_Edge::disconnectOrg ( )
GQ_Edge* GQ_Edge::dnext ( )
inline

Definition at line 160 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::dnext ( ) const
inline

Definition at line 161 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::dprev ( )
inline

Definition at line 162 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::dprev ( ) const
inline

Definition at line 163 of file GQ_Edge.h.

unsigned GQ_Edge::getFlags ( unsigned  mask = ~0) const
inline

Definition at line 287 of file GQ_Edge.h.

int GQ_Edge::index ( void  ) const
inline

Our index into GQ_Detail::myEdges array, also used for cross references to other data structures which we don't want to duplicate

Definition at line 293 of file GQ_Edge.h.

void GQ_Edge::init ( int  i)
inline

Creates a data structure representing a subdivision of the sphere by a single edge with a single face.

Definition at line 125 of file GQ_Edge.h.

int GQ_Edge::intersect ( GQ_Point pt)
int GQ_Edge::intersect ( GQ_Edge edge)
int GQ_Edge::intersect ( GQ_Point org,
GQ_Point dest 
)
int GQ_Edge::intersect ( GQ_Face face,
float &  t 
)
int GQ_Edge::intersectPlane ( UT_Vector3 nml,
float  d,
float &  t,
int  donml = 1 
)
GQ_Edge* GQ_Edge::irot ( )
inline

Definition at line 151 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::irot ( ) const
inline

Definition at line 152 of file GQ_Edge.h.

int GQ_Edge::isBoundary ( ) const
inline

Definition at line 279 of file GQ_Edge.h.

int GQ_Edge::isBridge ( ) const
inline

Definition at line 276 of file GQ_Edge.h.

int GQ_Edge::isShare ( ) const
inline

Definition at line 277 of file GQ_Edge.h.

void*& GQ_Edge::left ( )
inline

Get the face on the left of an edge. Needs to be cast to a GQ_Face.

Definition at line 192 of file GQ_Edge.h.

const void* GQ_Edge::left ( ) const
inline

Definition at line 193 of file GQ_Edge.h.

GQ_Face* GQ_Edge::leftFace ( ) const
inline

Definition at line 195 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::lnext ( )
inline

Definition at line 164 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::lnext ( ) const
inline

Definition at line 165 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::lprev ( )
inline

Definition at line 166 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::lprev ( ) const
inline

Definition at line 167 of file GQ_Edge.h.

GQ_Edge*& GQ_Edge::onext ( )
inline

Each edge is able to get at its previous and next edges in either direction (_L_eft, _R_ight, _O_rigin and _Destination)

Definition at line 156 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::onext ( ) const
inline

Definition at line 157 of file GQ_Edge.h.

GQ_Edge::operator GA_Edge ( )
inline

Cast operator into GA_Edge.

Definition at line 296 of file GQ_Edge.h.

GQ_Edge::operator GA_Edge ( ) const
inline

Definition at line 297 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::oprev ( )
inline

Definition at line 158 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::oprev ( ) const
inline

Definition at line 159 of file GQ_Edge.h.

void*& GQ_Edge::org ( )
inline

Get the origin of the edge. Needs to be cast to a GQ_Point.

Definition at line 174 of file GQ_Edge.h.

const void* GQ_Edge::org ( ) const
inline

Definition at line 175 of file GQ_Edge.h.

GQ_Point* GQ_Edge::orgPoint ( ) const
inline

Definition at line 178 of file GQ_Edge.h.

void*& GQ_Edge::right ( )
inline

Get the face on the right of an edge. Needs to be cast to a GQ_Face.

Definition at line 198 of file GQ_Edge.h.

const void* GQ_Edge::right ( ) const
inline

Definition at line 199 of file GQ_Edge.h.

GQ_Face* GQ_Edge::rightFace ( ) const
inline

Definition at line 201 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::rnext ( )
inline

Definition at line 168 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::rnext ( ) const
inline

Definition at line 169 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::root ( void  )
inline

Definition at line 138 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::root ( void  ) const
inline

Definition at line 139 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::rot ( )
inline

Definition at line 144 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::rot ( ) const
inline

Definition at line 145 of file GQ_Edge.h.

GQ_Edge* GQ_Edge::rotN ( int  n)
inline

Definition at line 142 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::rotN ( int  n) const
inline

Definition at line 143 of file GQ_Edge.h.

GQ_Edge*& GQ_Edge::rprev ( )
inline

Definition at line 170 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::rprev ( ) const
inline

Definition at line 171 of file GQ_Edge.h.

void* GQ_Edge::safeDest ( )
inline

Definition at line 186 of file GQ_Edge.h.

std::ostream& GQ_Edge::save ( std::ostream &  os) const
void GQ_Edge::setData ( void org,
void dest,
void left,
void right 
)
void GQ_Edge::setFlags ( unsigned  mask)
inline

Definition at line 286 of file GQ_Edge.h.

void GQ_Edge::splice ( GQ_Edge b)
inline

Given the current quad edge a=this and b, splice affects the topology of the 2 quad edge rings a->org() and b->org() as follows:

  1. if 2 rings are distinct, they will be combined.
  2. if 2 rings are exactly the same, it will be broken into 2 separate pieces. The cuts will occur immediately after a and b in counterclockwise order. (Envision a wagon wheel with the spokes as the edges and the centre of the wheel as their common origin. For spokes (edges) a and b on the wheel, the divisions will occur between spoke a and the edge to its left, and spoke b and the edge to its left. Each of the two resulting pieces now forms a ring.)

Note that a->org() and b->org() should be equal for a splice to make sense. This method does not alter a->org() and b->org().

Definition at line 218 of file GQ_Edge.h.

void GQ_Edge::swap ( )

Swap the connecting edge

     ---          ---     |

From / TO \ | — — |

For example, if we have two triangles: b +---—+ +---—+ | /| b|\ | | _/ | L| _ | | e/| | n| ||aLnext | / | -> swap e| \ | | / | x| \ | |/ a | t| | +---—+ +---—+

GQ_Edge* GQ_Edge::sym ( )
inline

Get opposite orientation of this edge (symmetry). Returns an edge pointing in the opposite direction.

Definition at line 149 of file GQ_Edge.h.

const GQ_Edge* GQ_Edge::sym ( ) const
inline

Definition at line 150 of file GQ_Edge.h.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const GQ_Edge e 
)
friend

Definition at line 300 of file GQ_Edge.h.


The documentation for this class was generated from the following file: