All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Cookie Class Reference

#include <GU_Cookie.h>

Public Member Functions

 GU_Cookie ()
virtual ~GU_Cookie ()
GU_DetailgetDetail () const
void setGroups (const GA_PrimitiveGroup *agrp, const GA_PrimitiveGroup *bgrp, GA_PointGroup *aptgrp, GA_PointGroup *bptgrp)
float getTolerance ()
void setTolerance (float tol)
void setAutoJoin (int aj)
void cookie (GU_Detail &gdp, int generatecrease, GA_PrimitiveGroup &aingrp, GA_PrimitiveGroup &aoutgrp, GA_PrimitiveGroup &aoverlapgrp, int aclosed, GA_PrimitiveGroup &bingrp, GA_PrimitiveGroup &boutgrp, GA_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 (GA_Offset ptoff, GEO_PrimPoly *poly)
GA_Offset createEdgeVertex (GA_WorkVertexBuffer &vbuf, guTrimInfo *base, int edge, float t, int dir)
 The edge is poly(edge-1) to poly(edge). More...
GEO_PrimPolycreatePoly (guTrimInfo *base, const UT_Array< GA_Offset > &vtxes, bool closed, bool preserve_groups=true)
void punchHole (GEO_PrimPoly *base, GEO_PrimPoly *hole)
UT_IntArraybuildConnectivityGraph ()
void classifyPolygons (const GA_PrimitiveGroup &originalgrp, GA_PrimitiveGroup &ingrp, GA_PrimitiveGroup &outgrp, GA_PrimitiveGroup &overlapgrp, UT_IntArray *edges, const GA_PrimitiveGroup &othergrp, GU_RayIntersect *&inter, bool insidetest, bool inter_closed)

Protected Attributes

UT_Array< guTrimInfo * > myTrimInfo
GA_EdgeMap< guEdgeHashEntry * > * myEdgeTable
const GA_PrimitiveGroupmyGrpA
const GA_PrimitiveGroupmyGrpB
UT_Array< guIsectValmyIsects
int myAutoJoin
float myTol

Detailed Description

Definition at line 44 of file GU_Cookie.h.

Constructor & Destructor Documentation

GU_Cookie::GU_Cookie ( )
virtual GU_Cookie::~GU_Cookie ( )

Member Function Documentation

void GU_Cookie::addPointToGroup ( GA_Offset  ptoff,
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 GA_PrimitiveGroup originalgrp,
GA_PrimitiveGroup ingrp,
GA_PrimitiveGroup outgrp,
GA_PrimitiveGroup overlapgrp,
UT_IntArray edges,
const GA_PrimitiveGroup othergrp,
GU_RayIntersect *&  inter,
bool  insidetest,
bool  inter_closed 
void GU_Cookie::cookie ( GU_Detail gdp,
int  generatecrease,
GA_PrimitiveGroup aingrp,
GA_PrimitiveGroup aoutgrp,
GA_PrimitiveGroup aoverlapgrp,
int  aclosed,
GA_PrimitiveGroup bingrp,
GA_PrimitiveGroup boutgrp,
GA_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.

GA_Offset GU_Cookie::createEdgeVertex ( GA_WorkVertexBuffer vbuf,
guTrimInfo *  base,
int  edge,
float  t,
int  dir 

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

GEO_PrimPoly* GU_Cookie::createPoly ( guTrimInfo *  base,
const UT_Array< GA_Offset > &  vtxes,
bool  closed,
bool  preserve_groups = true 
GU_Detail* GU_Cookie::getDetail ( void  ) const

Definition at line 50 of file GU_Cookie.h.

float GU_Cookie::getTolerance ( )

Definition at line 62 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)

Definition at line 64 of file GU_Cookie.h.

void GU_Cookie::setGroups ( const GA_PrimitiveGroup agrp,
const GA_PrimitiveGroup bgrp,
GA_PointGroup aptgrp,
GA_PointGroup bptgrp 

Definition at line 52 of file GU_Cookie.h.

void GU_Cookie::setTolerance ( float  tol)

Definition at line 63 of file GU_Cookie.h.

Member Data Documentation

int GU_Cookie::myAutoJoin

Definition at line 157 of file GU_Cookie.h.

GA_EdgeMap<guEdgeHashEntry *>* GU_Cookie::myEdgeTable

Definition at line 143 of file GU_Cookie.h.

GU_Detail* GU_Cookie::myGdp

Definition at line 141 of file GU_Cookie.h.

const GA_PrimitiveGroup* GU_Cookie::myGrpA

Definition at line 151 of file GU_Cookie.h.

const GA_PrimitiveGroup * GU_Cookie::myGrpB

Definition at line 151 of file GU_Cookie.h.

UT_Array<guIsectVal> GU_Cookie::myIsects

Definition at line 156 of file GU_Cookie.h.

GA_PointGroup* GU_Cookie::myPtGrpA

Definition at line 150 of file GU_Cookie.h.

GA_PointGroup * GU_Cookie::myPtGrpB

Definition at line 150 of file GU_Cookie.h.

float GU_Cookie::myTol

Definition at line 158 of file GU_Cookie.h.

UT_Array<guTrimInfo *> GU_Cookie::myTrimInfo

Definition at line 142 of file GU_Cookie.h.

GA_ElementWranglerCache* GU_Cookie::myWranglers

Definition at line 145 of file GU_Cookie.h.

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