GQ_Detail Class Reference

#include <GQ_Detail.h>

List of all members.

Public Member Functions

 GQ_Detail (GU_Detail *gdp, GB_PrimitiveGroup *=0, float super_point_tolerance=1E-6)
 ~GQ_Detail ()
void clearAndDestroy (void)
void cusp (float angle, bool no_cut=false)
 Cusp polygons which have adjacent edges larger than angle (in degrees).
void cusp (const GB_EdgeGroup &edges, bool do_cut=false)
 Cusp edges in a group.
void clip (UT_Vector3 &norm, float distance, int normalize)
int crease (UT_Vector3 &norm, float distance, int normalize, int outputGroups, GB_PrimitiveGroup *primitive_above=0, GB_PrimitiveGroup *primitive_below=0)
void bricker (float sizex=1.0, float sizey=1.0, float sizez=1.0, float offx=0.0, float offy=0.0, float offz=0.0, float anglex=0.0, float angley=0.0, float anglez=0.0, bool fixsharededges=false)
 }
void doBoolean (const GU_Detail *A, const GU_Detail *B, GQ_BooleanOpType op, const int outputGroups=0, const char *AgroupName=0, const char *BgroupName=0, int accurateAttrib=0, int trials=5)
void smooth (int divisions, float relativeSize, float weight)
void smoothPolygons (int iterations, GU_WeightingType type, float lambda, float mu, bool useptattrib, const GB_AttributeRef &attriboffset, int attribsize)
void createEdgeWeights ()
void setCreaseWeight (const GEO_PrimPoly &poly, float weight)
void setCreaseWeight (const GEO_PrimPoly &poly, const GB_AttributeRef &vtxoff, const GB_AttributeRef &primoff)
void setCreaseWeight (const GB_Edge &edge, float weight)
void setCreaseWeight (const GB_Edge &gedge, const GB_AttributeRef &vtxoff, const GB_AttributeRef &primoff)
float getEdgeWeight (const GB_Edge &edge)
void subdivide (const GQ_SubdivideParms &parms, GB_PrimitiveGroup *nonsubdivprims)
void dual ()
void stitch (const GQ_StitchParms &parms)
int stitchEdges (GU_PrimPoly &polya, const UT_PtrArray< GU_PrimPoly * > &facea, GU_PrimPoly &polyb, const UT_PtrArray< GU_PrimPoly * > &faceb, GB_PrimitiveGroup &changedpolys, float tol, int clamp, int consolidate)
void makeWire (float radius, int doSpheres, int doCaps)
void buildGeometry ()
void buildCreases (GB_PrimitiveGroup *group=0)
void copyEdgeWeightToVertex ()
void unHole (int maintain)
void boundary ()
void createCuspGroup (float, GB_PrimitiveGroup *grp)
void createBoundaryGroup (GB_PrimitiveGroup &grp)
void createBoundaryGroup (GB_PointGroup &grp, UT_IntArray *arr)
void createBoundaryGroup (const GEO_Point *ppt, GB_PointGroup &pointgroup)
void createBoundaryGroup (const GB_Edge &edge, GB_PointGroup &grp, GEO_PrimPoly *&poly)
void createBoundaryList (UT_RefArray< UT_IntArray > &ptlist)
void groupEdgePoints (const GEO_Point *ppt, int depth, GB_PointGroup &point_group)
int isClose ()
void deleteAllShareEdges ()
GQ_PointappendPoint (const GQ_Point *src=0)
GQ_EdgeappendEdge ()
GQ_FaceappendFace (GEO_PrimPoly *poly)
void removePoint (GQ_Point *p)
void removePoint (int i)
void removeEdge (GQ_Edge *e)
void removeEdge (int i)
void removeFace (GQ_Face *f)
void removeFace (int i)
void collapseEdgeList ()
void collapseFaceList ()
UT_PtrArray< GQ_Point * > & getPointList ()
const UT_PtrArray< GQ_Point * > & getPointList () const
UT_PtrArray< GQ_Edge * > & getEdgeList ()
const UT_PtrArray< GQ_Edge * > & getEdgeList () const
UT_FloatArraygetEdgeWeights ()
const UT_FloatArraygetEdgeWeights () const
UT_PtrArray< GQ_Face * > & getFaceList ()
const UT_PtrArray< GQ_Face * > & getFaceList () const
GU_DetailgetGdp ()
const GU_DetailgetGdp () const
GU_RayIntersectgetRay ()
void buildRay ()
UT_RefArray< GB_AttributeRef > & getOffsets ()
GQ_PointsplitEdge (GQ_Edge *edge, float t)
 Split edge will return 0 if t is too close to 0 or 1.
void splitEdge (GQ_Edge *edge, GQ_Detail *B)
GQ_EdgesplitEdge (GQ_Edge *, GQ_Point &pt)
void deleteShareEdge (GQ_Edge *edge, GB_PrimitiveGroup *deletePrimGroup=0)
void wireEdge (GQ_Edge *edge, float radius, int doCaps)
void pointSphere (GQ_Point *pt, float radius)
int nEdges (void) const
int nFaces (void) const
int nPoints (void) const
GU_DetailgetDetail (void) const
int aboveOrBelow (GQ_Face *face)
void markPoints (GQ_Detail *B)
void markEdges (GQ_Detail *B)
void markFaces (GQ_Detail *B)
void markFace (GQ_Face *f, GQ_Detail *B)
void markComponent (GQ_Face *f, unsigned mark)
void markComponent ()
void buildAllSplitFaces (GQ_Detail *B)
void buildSplitFaces (GQ_Face *face, GQ_Edge *edge, GQ_Detail *B)
void traceIntersectEdges ()
void traceIntersectEdges (GQ_Edge *edge)
void cleanOffsets ()
void setupOffsets ()
void deleteAllFaces (GB_PrimitiveGroup *)
void deleteAllMaskFaces (unsigned mask, GB_PrimitiveGroup *)
void correctAllFaceMarkings ()
void flipAllFaceNormals ()
void simpleDecimate (int targetPolys)
void meshOptimize (float tol=1E-5)
void decCollapse (GQ_Edge *e, GB_PrimitiveGroup *)
void decSplit (GQ_Edge *e)
void decSwap (GQ_Edge *e)
void save (ostream &os) const
GQ_EdgefindEdge (const GB_Edge *edge)
GQ_EdgefindEdge (const GQ_Point *org, const GQ_Point *dest)
GEO_PointstepForward (const GB_Edge *edge)
GEO_PointpickArbitraryConnectedPoint (const GEO_Point *org)
GEO_PointrotateAboutOrigin (GB_Edge &edge, int dir)
GQ_Detailduplicate () const
GEO_PrimPolyadjacentFace (const GEO_Face &face, int edge)

Friends

ostream & operator<< (ostream &os, const GQ_Detail &d)


Detailed Description

Quad Edge data structure for topological manipulation of polygonal data.

The Quad Edge data structure was invented by Guibas & Stolfi in their 1985 paper, "Primitives for the Manipulation of General Subdivisions and the Computation of Voronoi Diagrams", ACM Transactions on Graphics, 4(2):74-123, April 1985.

That paper has a good description of the capabilities of the data structure, and the definition of its basic operators, makeedge and splice().

Definition at line 64 of file GQ_Detail.h.


Constructor & Destructor Documentation

GQ_Detail::GQ_Detail ( GU_Detail gdp,
GB_PrimitiveGroup = 0,
float  super_point_tolerance = 1E-6 
)

The super_point_tolerance should probably be set to -1 which flags for no super points to be generated. Super points often cause confusing (for the caller) results.

GQ_Detail::~GQ_Detail (  ) 


Member Function Documentation

int GQ_Detail::aboveOrBelow ( GQ_Face face  ) 

GEO_PrimPoly* GQ_Detail::adjacentFace ( const GEO_Face face,
int  edge 
)

GQ_Edge* GQ_Detail::appendEdge (  ) 

GQ_Face* GQ_Detail::appendFace ( GEO_PrimPoly poly  ) 

GQ_Point* GQ_Detail::appendPoint ( const GQ_Point src = 0  ) 

void GQ_Detail::boundary (  ) 

void GQ_Detail::bricker ( float  sizex = 1.0,
float  sizey = 1.0,
float  sizez = 1.0,
float  offx = 0.0,
float  offy = 0.0,
float  offz = 0.0,
float  anglex = 0.0,
float  angley = 0.0,
float  anglez = 0.0,
bool  fixsharededges = false 
)

}

void GQ_Detail::buildAllSplitFaces ( GQ_Detail B  ) 

void GQ_Detail::buildCreases ( GB_PrimitiveGroup group = 0  ) 

void GQ_Detail::buildGeometry (  ) 

void GQ_Detail::buildRay (  )  [inline]

Definition at line 224 of file GQ_Detail.h.

void GQ_Detail::buildSplitFaces ( GQ_Face face,
GQ_Edge edge,
GQ_Detail B 
)

void GQ_Detail::cleanOffsets (  ) 

void GQ_Detail::clearAndDestroy ( void   ) 

void GQ_Detail::clip ( UT_Vector3 norm,
float  distance,
int  normalize 
)

Both clip() and crease() will invalidate this GQ_Detail. If you wish to do another GQ_Detail operation, create a new GQ_Detail. {

void GQ_Detail::collapseEdgeList (  )  [inline]

Definition at line 211 of file GQ_Detail.h.

void GQ_Detail::collapseFaceList (  )  [inline]

Definition at line 212 of file GQ_Detail.h.

void GQ_Detail::copyEdgeWeightToVertex (  ) 

void GQ_Detail::correctAllFaceMarkings (  ) 

int GQ_Detail::crease ( UT_Vector3 norm,
float  distance,
int  normalize,
int  outputGroups,
GB_PrimitiveGroup primitive_above = 0,
GB_PrimitiveGroup primitive_below = 0 
)

void GQ_Detail::createBoundaryGroup ( const GB_Edge edge,
GB_PointGroup grp,
GEO_PrimPoly *&  poly 
)

void GQ_Detail::createBoundaryGroup ( const GEO_Point ppt,
GB_PointGroup pointgroup 
)

void GQ_Detail::createBoundaryGroup ( GB_PointGroup grp,
UT_IntArray arr 
)

void GQ_Detail::createBoundaryGroup ( GB_PrimitiveGroup grp  ) 

void GQ_Detail::createBoundaryList ( UT_RefArray< UT_IntArray > &  ptlist  ) 

For each boundary loop a separate UT_IntArray is added to the ptlist. These intarrays will contain the point numbers, in order, of the points that belong to those boundaries. This is preferable to the group based approach becausae it can handle duplicate points that show up on the boundary of certain degenerate geometry..

void GQ_Detail::createCuspGroup ( float  ,
GB_PrimitiveGroup grp 
)

void GQ_Detail::createEdgeWeights (  ) 

void GQ_Detail::cusp ( const GB_EdgeGroup edges,
bool  do_cut = false 
)

Cusp edges in a group.

void GQ_Detail::cusp ( float  angle,
bool  no_cut = false 
)

Cusp polygons which have adjacent edges larger than angle (in degrees).

void GQ_Detail::decCollapse ( GQ_Edge e,
GB_PrimitiveGroup  
)

void GQ_Detail::decSplit ( GQ_Edge e  ) 

void GQ_Detail::decSwap ( GQ_Edge e  ) 

void GQ_Detail::deleteAllFaces ( GB_PrimitiveGroup  ) 

void GQ_Detail::deleteAllMaskFaces ( unsigned  mask,
GB_PrimitiveGroup  
)

void GQ_Detail::deleteAllShareEdges (  ) 

void GQ_Detail::deleteShareEdge ( GQ_Edge edge,
GB_PrimitiveGroup deletePrimGroup = 0 
)

void GQ_Detail::doBoolean ( const GU_Detail A,
const GU_Detail B,
GQ_BooleanOpType  op,
const int  outputGroups = 0,
const char *  AgroupName = 0,
const char *  BgroupName = 0,
int  accurateAttrib = 0,
int  trials = 5 
)

void GQ_Detail::dual (  ) 

GQ_Detail* GQ_Detail::duplicate (  )  const [inline]

Be very, very careful using this method. GQ_Detail was never designed to be duplicated, and this method doesn't make a true copy. It does do a deep copy of the edge/face/point structures, but the two GQ_Detail objects still reference the same GDP, and could hence easily cause problems.

Also, several parts of the member data are *not* currently duplicated, including

  • edge weights
  • ray info
  • attribs used during subdivide
  • spare pointers on faces/points

Finally, this method will modify this GQ_Detail by changing the faces' index member data. Be forewarned!

This method was written for GQ_PolyDelaunay, which needed a way to "backup" a GQ_Detail and revert if an error occurred. That code is very careful to avoid making any changes to the underlying gdp.

Definition at line 313 of file GQ_Detail.h.

GQ_Edge* GQ_Detail::findEdge ( const GQ_Point org,
const GQ_Point dest 
)

GQ_Edge* GQ_Detail::findEdge ( const GB_Edge edge  ) 

Given a GB_Edge, return the equivalent GQ_Edge. Relatively efficient: O(degree(org)), not O(nedges)

void GQ_Detail::flipAllFaceNormals (  ) 

GU_Detail* GQ_Detail::getDetail ( void   )  const [inline]

Definition at line 246 of file GQ_Detail.h.

const UT_PtrArray<GQ_Edge *>& GQ_Detail::getEdgeList (  )  const [inline]

Definition at line 216 of file GQ_Detail.h.

UT_PtrArray<GQ_Edge *>& GQ_Detail::getEdgeList (  )  [inline]

Definition at line 215 of file GQ_Detail.h.

float GQ_Detail::getEdgeWeight ( const GB_Edge edge  ) 

const UT_FloatArray& GQ_Detail::getEdgeWeights (  )  const [inline]

Definition at line 218 of file GQ_Detail.h.

UT_FloatArray& GQ_Detail::getEdgeWeights (  )  [inline]

Definition at line 217 of file GQ_Detail.h.

const UT_PtrArray<GQ_Face *>& GQ_Detail::getFaceList (  )  const [inline]

Definition at line 220 of file GQ_Detail.h.

UT_PtrArray<GQ_Face *>& GQ_Detail::getFaceList (  )  [inline]

Definition at line 219 of file GQ_Detail.h.

const GU_Detail* GQ_Detail::getGdp (  )  const [inline]

Definition at line 222 of file GQ_Detail.h.

GU_Detail* GQ_Detail::getGdp (  )  [inline]

Definition at line 221 of file GQ_Detail.h.

UT_RefArray<GB_AttributeRef>& GQ_Detail::getOffsets (  )  [inline]

Definition at line 229 of file GQ_Detail.h.

const UT_PtrArray<GQ_Point *>& GQ_Detail::getPointList (  )  const [inline]

Definition at line 214 of file GQ_Detail.h.

UT_PtrArray<GQ_Point *>& GQ_Detail::getPointList (  )  [inline]

Definition at line 213 of file GQ_Detail.h.

GU_RayIntersect* GQ_Detail::getRay (  )  [inline]

Definition at line 223 of file GQ_Detail.h.

void GQ_Detail::groupEdgePoints ( const GEO_Point ppt,
int  depth,
GB_PointGroup point_group 
)

int GQ_Detail::isClose (  ) 

void GQ_Detail::makeWire ( float  radius,
int  doSpheres,
int  doCaps 
)

void GQ_Detail::markComponent (  ) 

void GQ_Detail::markComponent ( GQ_Face f,
unsigned  mark 
)

void GQ_Detail::markEdges ( GQ_Detail B  ) 

void GQ_Detail::markFace ( GQ_Face f,
GQ_Detail B 
)

void GQ_Detail::markFaces ( GQ_Detail B  ) 

void GQ_Detail::markPoints ( GQ_Detail B  ) 

void GQ_Detail::meshOptimize ( float  tol = 1E-5  ) 

int GQ_Detail::nEdges ( void   )  const [inline]

Definition at line 243 of file GQ_Detail.h.

int GQ_Detail::nFaces ( void   )  const [inline]

Definition at line 244 of file GQ_Detail.h.

int GQ_Detail::nPoints ( void   )  const [inline]

Definition at line 245 of file GQ_Detail.h.

GEO_Point* GQ_Detail::pickArbitraryConnectedPoint ( const GEO_Point org  ) 

void GQ_Detail::pointSphere ( GQ_Point pt,
float  radius 
)

void GQ_Detail::removeEdge ( int  i  ) 

void GQ_Detail::removeEdge ( GQ_Edge e  ) 

void GQ_Detail::removeFace ( int  i  ) 

void GQ_Detail::removeFace ( GQ_Face f  ) 

void GQ_Detail::removePoint ( int  i  ) 

void GQ_Detail::removePoint ( GQ_Point p  ) 

GEO_Point* GQ_Detail::rotateAboutOrigin ( GB_Edge edge,
int  dir 
)

void GQ_Detail::save ( ostream &  os  )  const

void GQ_Detail::setCreaseWeight ( const GB_Edge gedge,
const GB_AttributeRef vtxoff,
const GB_AttributeRef primoff 
)

void GQ_Detail::setCreaseWeight ( const GB_Edge edge,
float  weight 
)

void GQ_Detail::setCreaseWeight ( const GEO_PrimPoly poly,
const GB_AttributeRef vtxoff,
const GB_AttributeRef primoff 
)

void GQ_Detail::setCreaseWeight ( const GEO_PrimPoly poly,
float  weight 
)

void GQ_Detail::setupOffsets (  ) 

void GQ_Detail::simpleDecimate ( int  targetPolys  ) 

void GQ_Detail::smooth ( int  divisions,
float  relativeSize,
float  weight 
)

void GQ_Detail::smoothPolygons ( int  iterations,
GU_WeightingType  type,
float  lambda,
float  mu,
bool  useptattrib,
const GB_AttributeRef attriboffset,
int  attribsize 
)

GQ_Edge* GQ_Detail::splitEdge ( GQ_Edge ,
GQ_Point pt 
)

void GQ_Detail::splitEdge ( GQ_Edge edge,
GQ_Detail B 
)

GQ_Point* GQ_Detail::splitEdge ( GQ_Edge edge,
float  t 
)

Split edge will return 0 if t is too close to 0 or 1.

GEO_Point* GQ_Detail::stepForward ( const GB_Edge edge  ) 

void GQ_Detail::stitch ( const GQ_StitchParms parms  ) 

int GQ_Detail::stitchEdges ( GU_PrimPoly polya,
const UT_PtrArray< GU_PrimPoly * > &  facea,
GU_PrimPoly polyb,
const UT_PtrArray< GU_PrimPoly * > &  faceb,
GB_PrimitiveGroup changedpolys,
float  tol,
int  clamp,
int  consolidate 
)

void GQ_Detail::subdivide ( const GQ_SubdivideParms parms,
GB_PrimitiveGroup nonsubdivprims 
)

void GQ_Detail::traceIntersectEdges ( GQ_Edge edge  ) 

void GQ_Detail::traceIntersectEdges (  ) 

void GQ_Detail::unHole ( int  maintain  ) 

void GQ_Detail::wireEdge ( GQ_Edge edge,
float  radius,
int  doCaps 
)


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const GQ_Detail d 
) [friend]

Definition at line 277 of file GQ_Detail.h.


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

Generated on Mon Jan 28 00:29:33 2013 for HDK by  doxygen 1.5.9