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

#include <GD_TrimLoop.h>

Public Member Functions

 GD_TrimLoop ()
 
 GD_TrimLoop (GD_TrimPiece *curve)
 
 ~GD_TrimLoop ()
 
int64 getMemoryUsage (bool inclusive) const
 
int evaluate (float u, UT_Vector2 &pos) const
 
int evaluate (float u, UT_Vector2 &pos, UT_Vector2 &der) const
 
int evaluateHead (UT_Vector2 &pos) const
 
int evaluateTail (UT_Vector2 &pos) const
 
void evaluateNormal (UT_Vector3 &normal) const
 
void findDirection ()
 
unsigned isClosed () const
 
void close (int connect_ends=0)
 
float length () const
 
unsigned isClockwise () const
 
void appendLoop (GD_TrimLoop *loop)
 
void append (GD_TrimLoop *loop, int consolidate=0, int deleteloop=0, int join=0)
 
void appendPoint (float u, float v)
 
int appendAtIntersect (GD_TrimLoop *loop, int deleteloop, float tol=1E-4F)
 
void append (GD_TrimPiece *piece)
 
GD_TrimLoopcopy () const
 
GD_TrimLoopcopyThis () const
 
void reverse ()
 
void reverseThis ()
 
int isInsideJitter (const UT_Vector2 &pt, float tol=1e-4F, float dither=1e-5F) const
 
int isInside (const GD_TrimLoop &prim, float tol=1E-4F) const
 
int isInside (const UT_Vector2 &pt, float tol=1E-4F) const
 
int isTrimmedIn (const UT_Vector2 &pt, GD_TrimRule rule=GD_TrimWindingRule) const
 
int isTrimmedIn (float u, float v, GD_TrimRule rule=GD_TrimWindingRule) const
 
int isTrimmedIn (const UT_Vector2 &pt, UT_IntArray &validloops, GD_TrimRule rule=GD_TrimWindingRule) const
 
int isTrimmedIn (float u, float v, UT_IntArray &validloops, GD_TrimRule rule=GD_TrimWindingRule) const
 
int isTrimmedInJitter (const UT_Vector2 &pt, GD_TrimRule rule=GD_TrimWindingRule) const
 
int isTrimmedInJitter (float u, float v, GD_TrimRule rule=GD_TrimWindingRule) const
 
int isTrimmedIn (GD_TrimLoop *loop, GD_TrimRule rule=GD_TrimWindingRule) const
 
void getParameterRange (float &umin, float &umax) const
 
float parametricDist (float u1, float u2) const
 
float parametricLength (float u1, float u2) const
 
GD_TrimLoopcut (float u1, float u2) const
 
void cutAtIsoparm (GD_TrimLoop **left, GD_TrimLoop **right, GD_IsoparmDirection iso, float val, float tol=1e-4f)
 
void cutAtTrim (GD_TrimLoop **inside, GD_TrimLoop **outside, const GD_TrimLoop *cutter, GD_TrimLoop *source)
 
int intersect (const GD_TrimLoop &loop, UT_Array< GD_TrimHitInfo > &hitlist, float tol=1E-4F) const
 
int intersect (GD_TrimPiece &piece, UT_Array< GD_TrimHitInfo > &hitlist, float tol=1e-4F) const
 
int intersectAll (const GD_TrimLoop &loop, UT_Array< GD_TrimHitInfo > &hitlist, float tol=1e-4F) const
 
int intersectDomain (const UT_BoundingRect &brect, UT_Array< GD_TrimHitInfo > &hitlist, float tol=1E-4F) const
 
GD_TrimLoopdomainClip (const UT_BoundingRect &brect, float tol=1E-4F, int preservedirection=1)
 
int startWalk (float inc, float minstep, float maxstep, float &u, float &v)
 
int doWalk (float &u, float &v)
 
void endWalk ()
 
int getData (UT_IntArray &ncurves, UT_IntArray &order, UT_IntArray &ncvs, UT_FloatArray &knots, UT_FloatArray &min, UT_FloatArray &max, UT_FloatArray &u, UT_FloatArray &v, UT_FloatArray &w) const
 
int setLoopIds (int id=0)
 
int getId () const
 
GD_TrimLoopgetNext () const
 
GD_TrimLoopgetChild () const
 
GD_DetailgetDetail () const
 
void setDetail (GD_Detail *gdp)
 
GD_TrimLooppreprocessLoops (GD_TrimRule rule, int altitude=0)
 
int getMaxHeight () const
 
int getBaseDir () const
 
GD_TrimLoopflatten ()
 
void print (int i=1, int recurse=1) const
 
int isHeadNearTail (float tol=1E-4F) const
 
int hitHead (const UT_BoundingRect &brect, UT_Array< GD_TrimHitInfo > &hitlist, float tol=1E-4F) const
 
int hitTail (const UT_BoundingRect &brect, UT_Array< GD_TrimHitInfo > &hitlist, float tol=1E-4F) const
 
int getPoints (int numdivs, UT_Vector3Array &domain, int usebreak)
 
GD_TrimPiecegetPiece (GD_TrimPiece *prev_piece) const
 

Static Public Member Functions

static GD_TrimLoopdomainBridge (const UT_BoundingRect &brect, const UT_Vector2 &posa, float ua, GD_DomainBoundary a, const UT_Vector2 &posb, float ub, GD_DomainBoundary b, float tol, const UT_BoundingRect &bbox, int alwayscounter=0)
 

Public Attributes

UT_BoundingRect myBBox
 
GD_TrimPiecemyTrimPieces
 
GD_TrimPiecemyLastTrimPiece
 

Protected Member Functions

void snapPieces ()
 
GD_TrimLoopapplyWindingRule (int isfragmented=0, int altitude=0, int *maxdepth=0, int *basedir=0)
 
GD_TrimLoopfragment (const GD_TrimLoop *loop) const
 
int intersect (float val, GD_IsoparmDirection isoparm, UT_Array< GD_TrimHitInfo > &hitlist, float tol=1E-4F) const
 
int processIsoparmHits (UT_Array< GD_TrimHitInfo > &hits, int hit, float tol=1E-4F) const
 
void doIsoparm (int isoparm, float val, float tol, GD_DomainBoundary code, UT_Array< GD_TrimHitInfo > &hitlist, int &hit, int &i) const
 
GD_TrimLoopaddPossibleChild (GD_TrimLoop *loop)
 
GD_TrimLoopremoveDegenerateLoops (float tol=1E-4F)
 
GD_TrimLoopremoveRedundantLoops ()
 
void findDepths (int depth)
 
int findMaxDepth () const
 
int getBaseTrimDir () const
 
void adjustDepths (int deltadepth)
 

Detailed Description

Definition at line 58 of file GD_TrimLoop.h.

Constructor & Destructor Documentation

GD_TrimLoop::GD_TrimLoop ( )
GD_TrimLoop::GD_TrimLoop ( GD_TrimPiece curve)
GD_TrimLoop::~GD_TrimLoop ( )

Member Function Documentation

GD_TrimLoop* GD_TrimLoop::addPossibleChild ( GD_TrimLoop loop)
protected
void GD_TrimLoop::adjustDepths ( int  deltadepth)
protected
void GD_TrimLoop::append ( GD_TrimLoop loop,
int  consolidate = 0,
int  deleteloop = 0,
int  join = 0 
)
void GD_TrimLoop::append ( GD_TrimPiece piece)
int GD_TrimLoop::appendAtIntersect ( GD_TrimLoop loop,
int  deleteloop,
float  tol = 1E-4F 
)
void GD_TrimLoop::appendLoop ( GD_TrimLoop loop)
void GD_TrimLoop::appendPoint ( float  u,
float  v 
)
GD_TrimLoop* GD_TrimLoop::applyWindingRule ( int  isfragmented = 0,
int  altitude = 0,
int maxdepth = 0,
int basedir = 0 
)
protected
void GD_TrimLoop::close ( int  connect_ends = 0)
GD_TrimLoop* GD_TrimLoop::copy ( ) const
GD_TrimLoop* GD_TrimLoop::copyThis ( ) const
GD_TrimLoop* GD_TrimLoop::cut ( float  u1,
float  u2 
) const
void GD_TrimLoop::cutAtIsoparm ( GD_TrimLoop **  left,
GD_TrimLoop **  right,
GD_IsoparmDirection  iso,
float  val,
float  tol = 1e-4f 
)
void GD_TrimLoop::cutAtTrim ( GD_TrimLoop **  inside,
GD_TrimLoop **  outside,
const GD_TrimLoop cutter,
GD_TrimLoop source 
)
void GD_TrimLoop::doIsoparm ( int  isoparm,
float  val,
float  tol,
GD_DomainBoundary  code,
UT_Array< GD_TrimHitInfo > &  hitlist,
int hit,
int i 
) const
protected
static GD_TrimLoop* GD_TrimLoop::domainBridge ( const UT_BoundingRect brect,
const UT_Vector2 posa,
float  ua,
GD_DomainBoundary  a,
const UT_Vector2 posb,
float  ub,
GD_DomainBoundary  b,
float  tol,
const UT_BoundingRect bbox,
int  alwayscounter = 0 
)
static
GD_TrimLoop* GD_TrimLoop::domainClip ( const UT_BoundingRect brect,
float  tol = 1E-4F,
int  preservedirection = 1 
)
int GD_TrimLoop::doWalk ( float u,
float v 
)
void GD_TrimLoop::endWalk ( )
int GD_TrimLoop::evaluate ( float  u,
UT_Vector2 pos 
) const
int GD_TrimLoop::evaluate ( float  u,
UT_Vector2 pos,
UT_Vector2 der 
) const
int GD_TrimLoop::evaluateHead ( UT_Vector2 pos) const
void GD_TrimLoop::evaluateNormal ( UT_Vector3 normal) const
int GD_TrimLoop::evaluateTail ( UT_Vector2 pos) const
void GD_TrimLoop::findDepths ( int  depth)
protected
void GD_TrimLoop::findDirection ( )
int GD_TrimLoop::findMaxDepth ( ) const
protected
GD_TrimLoop* GD_TrimLoop::flatten ( )
GD_TrimLoop* GD_TrimLoop::fragment ( const GD_TrimLoop loop) const
protected
int GD_TrimLoop::getBaseDir ( ) const
int GD_TrimLoop::getBaseTrimDir ( ) const
protected
GD_TrimLoop* GD_TrimLoop::getChild ( ) const
inline

Definition at line 236 of file GD_TrimLoop.h.

int GD_TrimLoop::getData ( UT_IntArray ncurves,
UT_IntArray order,
UT_IntArray ncvs,
UT_FloatArray knots,
UT_FloatArray min,
UT_FloatArray max,
UT_FloatArray u,
UT_FloatArray v,
UT_FloatArray w 
) const
GD_Detail* GD_TrimLoop::getDetail ( ) const
inline

Definition at line 238 of file GD_TrimLoop.h.

int GD_TrimLoop::getId ( ) const
inline

Definition at line 233 of file GD_TrimLoop.h.

int GD_TrimLoop::getMaxHeight ( ) const
int64 GD_TrimLoop::getMemoryUsage ( bool  inclusive) const
GD_TrimLoop* GD_TrimLoop::getNext ( ) const
inline

Definition at line 235 of file GD_TrimLoop.h.

void GD_TrimLoop::getParameterRange ( float umin,
float umax 
) const
GD_TrimPiece* GD_TrimLoop::getPiece ( GD_TrimPiece prev_piece) const

Walks over all trim pieces of this loop. Pass NULL to it in the first call, and then the current piece in all subsequent calls. Once the traversal reaches the end, a NULL pointer is returned.

int GD_TrimLoop::getPoints ( int  numdivs,
UT_Vector3Array domain,
int  usebreak 
)
int GD_TrimLoop::hitHead ( const UT_BoundingRect brect,
UT_Array< GD_TrimHitInfo > &  hitlist,
float  tol = 1E-4F 
) const
int GD_TrimLoop::hitTail ( const UT_BoundingRect brect,
UT_Array< GD_TrimHitInfo > &  hitlist,
float  tol = 1E-4F 
) const
int GD_TrimLoop::intersect ( const GD_TrimLoop loop,
UT_Array< GD_TrimHitInfo > &  hitlist,
float  tol = 1E-4F 
) const
int GD_TrimLoop::intersect ( GD_TrimPiece piece,
UT_Array< GD_TrimHitInfo > &  hitlist,
float  tol = 1e-4F 
) const
int GD_TrimLoop::intersect ( float  val,
GD_IsoparmDirection  isoparm,
UT_Array< GD_TrimHitInfo > &  hitlist,
float  tol = 1E-4F 
) const
protected
int GD_TrimLoop::intersectAll ( const GD_TrimLoop loop,
UT_Array< GD_TrimHitInfo > &  hitlist,
float  tol = 1e-4F 
) const
int GD_TrimLoop::intersectDomain ( const UT_BoundingRect brect,
UT_Array< GD_TrimHitInfo > &  hitlist,
float  tol = 1E-4F 
) const
unsigned GD_TrimLoop::isClockwise ( ) const
inline

Definition at line 96 of file GD_TrimLoop.h.

unsigned GD_TrimLoop::isClosed ( ) const
inline

Definition at line 87 of file GD_TrimLoop.h.

int GD_TrimLoop::isHeadNearTail ( float  tol = 1E-4F) const
int GD_TrimLoop::isInside ( const GD_TrimLoop prim,
float  tol = 1E-4F 
) const
int GD_TrimLoop::isInside ( const UT_Vector2 pt,
float  tol = 1E-4F 
) const
int GD_TrimLoop::isInsideJitter ( const UT_Vector2 pt,
float  tol = 1e-4F,
float  dither = 1e-5F 
) const
int GD_TrimLoop::isTrimmedIn ( const UT_Vector2 pt,
GD_TrimRule  rule = GD_TrimWindingRule 
) const
int GD_TrimLoop::isTrimmedIn ( float  u,
float  v,
GD_TrimRule  rule = GD_TrimWindingRule 
) const
int GD_TrimLoop::isTrimmedIn ( const UT_Vector2 pt,
UT_IntArray validloops,
GD_TrimRule  rule = GD_TrimWindingRule 
) const
int GD_TrimLoop::isTrimmedIn ( float  u,
float  v,
UT_IntArray validloops,
GD_TrimRule  rule = GD_TrimWindingRule 
) const
int GD_TrimLoop::isTrimmedIn ( GD_TrimLoop loop,
GD_TrimRule  rule = GD_TrimWindingRule 
) const
int GD_TrimLoop::isTrimmedInJitter ( const UT_Vector2 pt,
GD_TrimRule  rule = GD_TrimWindingRule 
) const
int GD_TrimLoop::isTrimmedInJitter ( float  u,
float  v,
GD_TrimRule  rule = GD_TrimWindingRule 
) const
float GD_TrimLoop::length ( ) const
float GD_TrimLoop::parametricDist ( float  u1,
float  u2 
) const
float GD_TrimLoop::parametricLength ( float  u1,
float  u2 
) const
GD_TrimLoop* GD_TrimLoop::preprocessLoops ( GD_TrimRule  rule,
int  altitude = 0 
)
void GD_TrimLoop::print ( int  i = 1,
int  recurse = 1 
) const
int GD_TrimLoop::processIsoparmHits ( UT_Array< GD_TrimHitInfo > &  hits,
int  hit,
float  tol = 1E-4F 
) const
protected
GD_TrimLoop* GD_TrimLoop::removeDegenerateLoops ( float  tol = 1E-4F)
protected
GD_TrimLoop* GD_TrimLoop::removeRedundantLoops ( )
protected
void GD_TrimLoop::reverse ( )
void GD_TrimLoop::reverseThis ( )
void GD_TrimLoop::setDetail ( GD_Detail gdp)
inline

Definition at line 239 of file GD_TrimLoop.h.

int GD_TrimLoop::setLoopIds ( int  id = 0)
void GD_TrimLoop::snapPieces ( )
protected
int GD_TrimLoop::startWalk ( float  inc,
float  minstep,
float  maxstep,
float u,
float v 
)

Member Data Documentation

UT_BoundingRect GD_TrimLoop::myBBox

Definition at line 357 of file GD_TrimLoop.h.

GD_TrimPiece* GD_TrimLoop::myLastTrimPiece

Definition at line 361 of file GD_TrimLoop.h.

GD_TrimPiece* GD_TrimLoop::myTrimPieces

Definition at line 360 of file GD_TrimLoop.h.


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