GU_Cookie Class Reference

#include <GU_Cookie.h>

List of all members.

Public Member Functions

 GU_Cookie ()
virtual ~GU_Cookie ()
GU_DetailgetDetail () const
void setGroups (const GB_PrimitiveGroup *agrp, const GB_PrimitiveGroup *bgrp, GB_PointGroup *aptgrp, GB_PointGroup *bptgrp)
float getTolerance ()
void setTolerance (float tol)
void setAutoJoin (int aj)
void cookie (GU_Detail &gdp, int generatecrease, GB_PrimitiveGroup &aingrp, GB_PrimitiveGroup &aoutgrp, GB_PrimitiveGroup &aoverlapgrp, int aclosed, GB_PrimitiveGroup &bingrp, GB_PrimitiveGroup &boutgrp, GB_PrimitiveGroup &boverlapgrp, int bclosed, int insidetest)
void performIsect (int primIdA, int primIdB)
void buildTrimSegments (GEO_PrimPoly *dst, GEO_PrimPoly *src)
void buildTrimSegmentsCoplanar (GEO_PrimPoly *dst, GEO_PrimPoly *src, bool reverse)
void addPointToGroup (GEO_Point *pt, GEO_PrimPoly *poly)
GEO_VertexcreateEdgeVertex (guTrimInfo *base, int edge, float t, int dir)
 The edge is poly(edge-1) to poly(edge).
GEO_VertexcreateInteriorVertex (guTrimInfo *base, const UT_Vector3 &pt)
GEO_PrimPolycreatePoly (guTrimInfo *base, const UT_PtrArray< GEO_Vertex * > &vtxes, bool closed, bool preserve_groups=true)
void punchHole (GEO_PrimPoly *base, GEO_PrimPoly *hole)
UT_IntArraybuildConnectivityGraph ()
void classifyPolygons (const GB_PrimitiveGroup &originalgrp, GB_PrimitiveGroup &ingrp, GB_PrimitiveGroup &outgrp, GB_PrimitiveGroup &overlapgrp, UT_IntArray *edges, const GB_PrimitiveGroup &othergrp, GU_RayIntersect *&inter, bool insidetest, bool inter_closed)

Protected Attributes

GU_DetailmyGdp
UT_PtrArray< guTrimInfo * > myTrimInfo
UT_HashTablemyEdgeTable
GB_PointGroupmyPtGrpA
GB_PointGroupmyPtGrpB
const GB_PrimitiveGroupmyGrpA
const GB_PrimitiveGroupmyGrpB
UT_RefArray< guIsectValmyIsects
int myAutoJoin
float myTol


Detailed Description

Definition at line 50 of file GU_Cookie.h.


Constructor & Destructor Documentation

GU_Cookie::GU_Cookie (  ) 

virtual GU_Cookie::~GU_Cookie (  )  [virtual]


Member Function Documentation

void GU_Cookie::addPointToGroup ( GEO_Point pt,
GEO_PrimPoly poly 
)

UT_IntArray* GU_Cookie::buildConnectivityGraph (  ) 

void GU_Cookie::buildTrimSegments ( GEO_PrimPoly dst,
GEO_PrimPoly src 
)

This adds all the isects of the second polygon into the trim list of the first:

void GU_Cookie::buildTrimSegmentsCoplanar ( GEO_PrimPoly dst,
GEO_PrimPoly src,
bool  reverse 
)

void GU_Cookie::classifyPolygons ( const GB_PrimitiveGroup originalgrp,
GB_PrimitiveGroup ingrp,
GB_PrimitiveGroup outgrp,
GB_PrimitiveGroup overlapgrp,
UT_IntArray edges,
const GB_PrimitiveGroup othergrp,
GU_RayIntersect *&  inter,
bool  insidetest,
bool  inter_closed 
)

void GU_Cookie::cookie ( GU_Detail gdp,
int  generatecrease,
GB_PrimitiveGroup aingrp,
GB_PrimitiveGroup aoutgrp,
GB_PrimitiveGroup aoverlapgrp,
int  aclosed,
GB_PrimitiveGroup bingrp,
GB_PrimitiveGroup boutgrp,
GB_PrimitiveGroup boverlapgrp,
int  bclosed,
int  insidetest 
)

Invoke the cookie operation.

The group of polygons to cookie must be setup with the setGroups function.

The [a|b][in|out|overlap]grps are the primitive groups to classify each clipped polygon piece into.

If a set of connected polygons doesn't intersect, and the insidetest is enabled, the insidedness of the polygons will be determined by sending a ray with the winding rule.

If generatecrease is set, instead of clipping the polygons, the line segments generated by poly-poly intersection will be generated.

GEO_Vertex* GU_Cookie::createEdgeVertex ( guTrimInfo *  base,
int  edge,
float  t,
int  dir 
)

The edge is poly(edge-1) to poly(edge).

GEO_Vertex* GU_Cookie::createInteriorVertex ( guTrimInfo *  base,
const UT_Vector3 pt 
)

GEO_PrimPoly* GU_Cookie::createPoly ( guTrimInfo *  base,
const UT_PtrArray< GEO_Vertex * > &  vtxes,
bool  closed,
bool  preserve_groups = true 
)

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

Definition at line 56 of file GU_Cookie.h.

float GU_Cookie::getTolerance (  )  [inline]

Definition at line 68 of file GU_Cookie.h.

void GU_Cookie::performIsect ( int  primIdA,
int  primIdB 
)

The call back from intersection tests: The two indices are the primitive numbers to intersect.

void GU_Cookie::punchHole ( GEO_PrimPoly base,
GEO_PrimPoly hole 
)

Punches a hole in the polygon base with the polygon hole. The appropriate bridges are formed.

void GU_Cookie::setAutoJoin ( int  aj  )  [inline]

Definition at line 70 of file GU_Cookie.h.

void GU_Cookie::setGroups ( const GB_PrimitiveGroup agrp,
const GB_PrimitiveGroup bgrp,
GB_PointGroup aptgrp,
GB_PointGroup bptgrp 
) [inline]

Definition at line 58 of file GU_Cookie.h.

void GU_Cookie::setTolerance ( float  tol  )  [inline]

Definition at line 69 of file GU_Cookie.h.


Member Data Documentation

int GU_Cookie::myAutoJoin [protected]

Definition at line 162 of file GU_Cookie.h.

Definition at line 148 of file GU_Cookie.h.

Definition at line 145 of file GU_Cookie.h.

Definition at line 155 of file GU_Cookie.h.

const GB_PrimitiveGroup * GU_Cookie::myGrpB [protected]

Definition at line 155 of file GU_Cookie.h.

Definition at line 160 of file GU_Cookie.h.

Definition at line 153 of file GU_Cookie.h.

Definition at line 153 of file GU_Cookie.h.

float GU_Cookie::myTol [protected]

Definition at line 164 of file GU_Cookie.h.

UT_PtrArray<guTrimInfo *> GU_Cookie::myTrimInfo [protected]

Definition at line 146 of file GU_Cookie.h.


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

Generated on Fri May 25 00:10:28 2012 for HDK by  doxygen 1.5.9