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

#include <GQ_Detail.h>

+ Inheritance diagram for GQ_Detail:

Public Member Functions

 GQ_Detail (GU_Detail *gdp, GA_PrimitiveGroup *=0, fpreal super_point_tolerance=1E-6)
 
 ~GQ_Detail ()
 
void clearAndDestroy (void)
 
void cusp (fpreal angle, bool no_cut=false)
 Cusp polygons which have adjacent edges larger than angle (in degrees) More...
 
void cusp (const GA_EdgeGroup &edges, bool do_cut=false)
 Cusp edges in a group. More...
 
void clip (UT_Vector3 &norm, fpreal distance, int normalize)
 
int crease (UT_Vector3 &norm, fpreal distance, int normalize, int outputGroups, GA_PrimitiveGroup *primitive_above=0, GA_PrimitiveGroup *primitive_below=0)
 
void bricker (fpreal sizex=1.0, fpreal sizey=1.0, fpreal sizez=1.0, fpreal offx=0.0, fpreal offy=0.0, fpreal offz=0.0, fpreal anglex=0.0, fpreal angley=0.0, fpreal anglez=0.0, bool fixsharededges=false)
 } More...
 
void smooth (int divisions, fpreal relativeSize, fpreal weight)
 
void createEdgeWeights ()
 
void setCreaseWeight (const GEO_PrimPoly &poly, fpreal weight)
 
void setCreaseWeight (const GEO_PrimPoly &poly, GA_ROHandleF vtxattrib, GA_ROHandleF primattrib)
 
void setCreaseWeight (const GA_Edge &edge, const GU_Detail &edge_gdp, fpreal weight)
 
void setCreaseWeight (const GA_Edge &gedge, const GA_Primitive &prim, GA_ROHandleF vtxattrib, GA_ROHandleF primattrib)
 
fpreal getEdgeWeight (const GA_Edge &edge)
 
fpreal getEdgeWeight (exint edge_index) const
 
bool setEdgeWeight (exint edge_index, fpreal weight)
 
void subdivide (const GQ_SubdivideParms &parms, GA_PrimitiveGroup *nonsubdivprims)
 
void dual (const char *attribs_to_swap=NULL)
 
void stitch (const GQ_StitchParms &parms)
 
int stitchEdges (GEO_PrimPoly &polya, const UT_Array< GEO_PrimPoly * > &facea, GEO_PrimPoly &polyb, const UT_Array< GEO_PrimPoly * > &faceb, GA_PrimitiveGroup &changedpolys, fpreal tol, int clamp, int consolidate)
 
void makeWire (fpreal radius, int doSpheres, int doCaps)
 
void buildGeometry (GA_PrimitiveGroup *output=NULL)
 
void buildCreases (GA_PrimitiveGroup *group=0)
 
void copyEdgeWeightToVertex ()
 
void unHole (int maintain)
 
void boundary ()
 
void createCuspGroup (GA_Group *group, bool doMinAngle, fpreal minAngle, bool doMaxAngle, fpreal maxAngle)
 
void createBoundaryGroup (GA_Group *grp)
 
void createBoundaryGroup (GA_PointGroup &grp, UT_IntArray *arr)
 
void createBoundaryGroup (GA_Offset ppt, GA_PointGroup &pointgroup)
 
void createBoundaryGroup (const GA_Edge &edge, GA_PointGroup &grp, GEO_PrimPoly *&poly)
 
void createBoundaryList (UT_Array< UT_IntArray > &ptlist)
 
void groupEdgePoints (GA_Offset ptoff, int depth, GA_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)
 
bool removeFace (GQ_Face *f)
 
void removeFace (int i)
 
void collapseEdgeList ()
 
void collapseFaceList ()
 
UT_Array< GQ_Point * > & getPointList ()
 
const UT_Array< GQ_Point * > & getPointList () const
 
UT_ValArray< GQ_Edge * > & getEdgeList ()
 
const UT_ValArray< GQ_Edge * > & getEdgeList () const
 
UT_DoubleArraygetEdgeWeights ()
 
const UT_DoubleArraygetEdgeWeights () const
 
UT_Array< GQ_Point * > & getEdgePoints ()
 
const UT_Array< GQ_Point * > & getEdgePoints () const
 
UT_ValArray< GQ_Face * > & getFaceList ()
 
const UT_ValArray< GQ_Face * > & getFaceList () const
 
GU_DetailgetGdp ()
 
const GU_DetailgetGdp () const
 
GU_RayIntersectgetRay ()
 
void buildRay ()
 
UT_Array< GA_RWAttributeRef > & getOffsets ()
 
GQ_PointsplitEdge (GQ_Edge *edge, fpreal t)
 Split edge will return 0 if t is too close to 0 or 1. More...
 
GQ_EdgesplitEdge (GQ_Edge *, GQ_Point &pt)
 
void deleteShareEdge (GQ_Edge *edge, GA_PrimitiveGroup *deletePrimGroup=0)
 
void wireEdge (GQ_Edge *edge, fpreal radius, int doCaps)
 
void pointSphere (GQ_Point *pt, fpreal radius)
 
int nEdges (void) const
 
int nFaces (void) const
 
int nPoints (void) const
 
GU_DetailgetDetail (void) const
 
int aboveOrBelow (GQ_Face *face)
 
void simpleDecimate (int targetPolys)
 
void meshOptimize ()
 
void decCollapse (GQ_Edge *e, GA_PrimitiveGroup *)
 
void decSplit (GQ_Edge *e)
 
void decSwap (GQ_Edge *e)
 
void save (std::ostream &os) const
 
GQ_EdgefindEdge (const GA_Edge *edge, const GU_Detail *edge_gdp)
 
GQ_EdgefindEdge (const GA_Edge *edge)
 
GQ_EdgefindEdge (const GQ_Point *org, const GQ_Point *dest)
 
GA_Offset stepForwardOffset (const GA_Edge *edge)
 
GA_Offset pickArbitraryConnectedPointOffset (GA_Offset org)
 
GA_Offset rotateAboutOriginOffset (GA_Edge &edge, int dir)
 
GEO_PrimPolyadjacentFace (const GEO_Face &face, int edge)
 

Friends

std::ostream & operator<< (std::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 68 of file GQ_Detail.h.

Constructor & Destructor Documentation

GQ_Detail::GQ_Detail ( GU_Detail gdp,
GA_PrimitiveGroup = 0,
fpreal  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 ( )
inline

Definition at line 197 of file GQ_Detail.h.

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 ( fpreal  sizex = 1.0,
fpreal  sizey = 1.0,
fpreal  sizez = 1.0,
fpreal  offx = 0.0,
fpreal  offy = 0.0,
fpreal  offz = 0.0,
fpreal  anglex = 0.0,
fpreal  angley = 0.0,
fpreal  anglez = 0.0,
bool  fixsharededges = false 
)

}

void GQ_Detail::buildCreases ( GA_PrimitiveGroup group = 0)
void GQ_Detail::buildGeometry ( GA_PrimitiveGroup output = NULL)
void GQ_Detail::buildRay ( )
inline

Definition at line 233 of file GQ_Detail.h.

void GQ_Detail::clearAndDestroy ( void  )
void GQ_Detail::clip ( UT_Vector3 norm,
fpreal  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 217 of file GQ_Detail.h.

void GQ_Detail::collapseFaceList ( )
inline

Definition at line 218 of file GQ_Detail.h.

void GQ_Detail::copyEdgeWeightToVertex ( )
int GQ_Detail::crease ( UT_Vector3 norm,
fpreal  distance,
int  normalize,
int  outputGroups,
GA_PrimitiveGroup primitive_above = 0,
GA_PrimitiveGroup primitive_below = 0 
)
void GQ_Detail::createBoundaryGroup ( GA_Group grp)
void GQ_Detail::createBoundaryGroup ( GA_PointGroup grp,
UT_IntArray arr 
)
void GQ_Detail::createBoundaryGroup ( GA_Offset  ppt,
GA_PointGroup pointgroup 
)
void GQ_Detail::createBoundaryGroup ( const GA_Edge edge,
GA_PointGroup grp,
GEO_PrimPoly *&  poly 
)
void GQ_Detail::createBoundaryList ( UT_Array< 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 ( GA_Group group,
bool  doMinAngle,
fpreal  minAngle,
bool  doMaxAngle,
fpreal  maxAngle 
)
void GQ_Detail::createEdgeWeights ( )
void GQ_Detail::cusp ( fpreal  angle,
bool  no_cut = false 
)

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

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

Cusp edges in a group.

void GQ_Detail::decCollapse ( GQ_Edge e,
GA_PrimitiveGroup  
)
void GQ_Detail::decSplit ( GQ_Edge e)
void GQ_Detail::decSwap ( GQ_Edge e)
void GQ_Detail::deleteAllShareEdges ( )
void GQ_Detail::deleteShareEdge ( GQ_Edge edge,
GA_PrimitiveGroup deletePrimGroup = 0 
)
void GQ_Detail::dual ( const char *  attribs_to_swap = NULL)
GQ_Edge* GQ_Detail::findEdge ( const GA_Edge edge,
const GU_Detail edge_gdp 
)

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

GQ_Edge* GQ_Detail::findEdge ( const GA_Edge edge)
inline

Definition at line 274 of file GQ_Detail.h.

GQ_Edge* GQ_Detail::findEdge ( const GQ_Point org,
const GQ_Point dest 
)
GU_Detail* GQ_Detail::getDetail ( void  ) const
inline

Definition at line 254 of file GQ_Detail.h.

UT_ValArray<GQ_Edge *>& GQ_Detail::getEdgeList ( )
inline

Definition at line 221 of file GQ_Detail.h.

const UT_ValArray<GQ_Edge *>& GQ_Detail::getEdgeList ( ) const
inline

Definition at line 222 of file GQ_Detail.h.

UT_Array<GQ_Point *>& GQ_Detail::getEdgePoints ( )
inline

Definition at line 225 of file GQ_Detail.h.

const UT_Array<GQ_Point*>& GQ_Detail::getEdgePoints ( ) const
inline

Definition at line 226 of file GQ_Detail.h.

fpreal GQ_Detail::getEdgeWeight ( const GA_Edge edge)
fpreal GQ_Detail::getEdgeWeight ( exint  edge_index) const
UT_DoubleArray& GQ_Detail::getEdgeWeights ( )
inline

Definition at line 223 of file GQ_Detail.h.

const UT_DoubleArray& GQ_Detail::getEdgeWeights ( ) const
inline

Definition at line 224 of file GQ_Detail.h.

UT_ValArray<GQ_Face *>& GQ_Detail::getFaceList ( )
inline

Definition at line 228 of file GQ_Detail.h.

const UT_ValArray<GQ_Face *>& GQ_Detail::getFaceList ( ) const
inline

Definition at line 229 of file GQ_Detail.h.

GU_Detail* GQ_Detail::getGdp ( )
inline

Definition at line 230 of file GQ_Detail.h.

const GU_Detail* GQ_Detail::getGdp ( ) const
inline

Definition at line 231 of file GQ_Detail.h.

UT_Array<GA_RWAttributeRef>& GQ_Detail::getOffsets ( )
inline

Definition at line 238 of file GQ_Detail.h.

UT_Array<GQ_Point *>& GQ_Detail::getPointList ( )
inline

Definition at line 219 of file GQ_Detail.h.

const UT_Array<GQ_Point *>& GQ_Detail::getPointList ( ) const
inline

Definition at line 220 of file GQ_Detail.h.

GU_RayIntersect* GQ_Detail::getRay ( )
inline

Definition at line 232 of file GQ_Detail.h.

void GQ_Detail::groupEdgePoints ( GA_Offset  ptoff,
int  depth,
GA_PointGroup point_group 
)
int GQ_Detail::isClose ( )
void GQ_Detail::makeWire ( fpreal  radius,
int  doSpheres,
int  doCaps 
)
void GQ_Detail::meshOptimize ( )
int GQ_Detail::nEdges ( void  ) const
inline

Definition at line 251 of file GQ_Detail.h.

int GQ_Detail::nFaces ( void  ) const
inline

Definition at line 252 of file GQ_Detail.h.

int GQ_Detail::nPoints ( void  ) const
inline

Definition at line 253 of file GQ_Detail.h.

GA_Offset GQ_Detail::pickArbitraryConnectedPointOffset ( GA_Offset  org)
void GQ_Detail::pointSphere ( GQ_Point pt,
fpreal  radius 
)
void GQ_Detail::removeEdge ( GQ_Edge e)
void GQ_Detail::removeEdge ( int  i)
bool GQ_Detail::removeFace ( GQ_Face f)
void GQ_Detail::removeFace ( int  i)
void GQ_Detail::removePoint ( GQ_Point p)
void GQ_Detail::removePoint ( int  i)
GA_Offset GQ_Detail::rotateAboutOriginOffset ( GA_Edge edge,
int  dir 
)
void GQ_Detail::save ( std::ostream &  os) const
void GQ_Detail::setCreaseWeight ( const GEO_PrimPoly poly,
fpreal  weight 
)
void GQ_Detail::setCreaseWeight ( const GEO_PrimPoly poly,
GA_ROHandleF  vtxattrib,
GA_ROHandleF  primattrib 
)
void GQ_Detail::setCreaseWeight ( const GA_Edge edge,
const GU_Detail edge_gdp,
fpreal  weight 
)
void GQ_Detail::setCreaseWeight ( const GA_Edge gedge,
const GA_Primitive prim,
GA_ROHandleF  vtxattrib,
GA_ROHandleF  primattrib 
)
bool GQ_Detail::setEdgeWeight ( exint  edge_index,
fpreal  weight 
)
void GQ_Detail::simpleDecimate ( int  targetPolys)
void GQ_Detail::smooth ( int  divisions,
fpreal  relativeSize,
fpreal  weight 
)
GQ_Point* GQ_Detail::splitEdge ( GQ_Edge edge,
fpreal  t 
)

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

GQ_Edge* GQ_Detail::splitEdge ( GQ_Edge ,
GQ_Point pt 
)
GA_Offset GQ_Detail::stepForwardOffset ( const GA_Edge edge)
void GQ_Detail::stitch ( const GQ_StitchParms parms)
int GQ_Detail::stitchEdges ( GEO_PrimPoly polya,
const UT_Array< GEO_PrimPoly * > &  facea,
GEO_PrimPoly polyb,
const UT_Array< GEO_PrimPoly * > &  faceb,
GA_PrimitiveGroup changedpolys,
fpreal  tol,
int  clamp,
int  consolidate 
)
void GQ_Detail::subdivide ( const GQ_SubdivideParms parms,
GA_PrimitiveGroup nonsubdivprims 
)
void GQ_Detail::unHole ( int  maintain)
void GQ_Detail::wireEdge ( GQ_Edge edge,
fpreal  radius,
int  doCaps 
)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const GQ_Detail d 
)
friend

Definition at line 267 of file GQ_Detail.h.


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