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

#include <GU_PolyBridge.h>

Public Types

enum  TextureMode { INTERPOLATE = -1, UNIT_SQUARE, RECTANGLE, PROPORTIONAL }
 
enum  TextureScaling { FIT_UNIT_SQUARE = 0, MATCH_3D, MATCH_UV }
 
enum  DirectionSign { DIR_SIGN_AUTO = 0, DIR_SIGN_POS, DIR_SIGN_NEG }
 
enum  MorphMethod { LINEAR = 0, ROTATING_FRAME }
 
typedef std::pair< int, intIndexPair
 
typedef UT_Array< IndexPairIndexPairArray
 
typedef GU_Spine::Positioning SpinePositioning
 
typedef GU_Spine::SampleMode SpineSampleMethod
 

Public Member Functions

 GU_PolyBridge (GU_Detail *gdp, const GA_OffsetArray &src_chain, bool src_chain_closed, const GA_OffsetArray &dst_chain, bool dst_chain_closed, bool straight_bridge=true)
 
 ~GU_PolyBridge ()
 
void buildTopology (int divisions, int src_divisions=0, int dst_divisions=0, IndexPairArray *pairings=nullptr)
 
void writeGeometry (GA_Offset ptoff0, GA_Offset primoff0, int num_twists=0, const GU_Detail *tgdp=nullptr, const GA_Offset *src_rep_vtx=nullptr, const GA_Offset *dst_rep_vtx=nullptr, GA_PointWrangler *pt_wrangler=nullptr, GA_PrimitiveWrangler *prim_wrangler=nullptr, GA_VertexWrangler *vtx_wrangler=nullptr)
 
void buildBridge (const GA_Offset *src_rep_vtx, const GA_Offset *dst_rep_vtx, GA_OffsetArray *user_link_grp=0, GA_OffsetArray *auto_link_grp=0, GA_OffsetArray *boundary_link_grp=0, GA_OffsetArray *src_chain_grp=0, GA_OffsetArray *dst_chain_grp=0, int num_twists=0)
 
int getNumMeshPolys ()
 
int getNumMeshPolyVtxs ()
 
GA_Offset setupBatchBuild (GA_Offset ptoff0, UT_IntArray &quad_pt_nums, GEO_PolyCounts &quad_size_list)
 
void fillGroups (GA_Offset ptoff0, GA_Offset primoff0, GA_OffsetArray *user_link_grp, GA_OffsetArray *auto_link_grp, GA_OffsetArray *boundary_link_grp, GA_OffsetArray *src_chain_grp, GA_OffsetArray *dst_chain_grp)
 
UT_Vector3 getSrcCentroid ()
 
UT_Vector3 getDstCentroid ()
 
void setWarningStream (UT_StringStream *w)
 
void setThicknessAttrib (GA_Attribute *attrib)
 
void setTwistAttrib (GA_Attribute *attrib)
 
void setMorphMethod (MorphMethod m)
 
void setMagnitudes (fpreal s=1.0, fpreal d=1.0)
 
void setStiffnesses (fpreal s=0.0, fpreal d=0.0)
 
void setAxialRotation (fpreal r)
 
void setExternalSpine (GEO_Face *curve)
 
void setThicknessRamp (UT_Ramp *ramp)
 
void setTwistRamp (UT_Ramp *ramp)
 
void setSrcDir (UT_Vector3 dir)
 
void setDstDir (UT_Vector3 dir)
 
void setSrcCtr (UT_Vector3 ctr)
 
void setDstCtr (UT_Vector3 ctr)
 
void setAttachToSrc (bool attach)
 
void setAttachToDst (bool attach)
 
void setThicknessScale (fpreal s)
 
void setTwistRange (fpreal min, fpreal max)
 
void setReverseSpine (bool r)
 
void setSrcDirectionSign (DirectionSign t)
 
void setDstDirectionSign (DirectionSign t)
 
void setClipRange (fpreal s, fpreal e)
 
void setGenerateSpine (bool b)
 
void setSpineGroup (GA_PointGroup *grp)
 
void setGenerateMesh (bool b)
 
void setMeshGroup (GA_PrimitiveGroup *grp)
 
void setTangentAttrib (GA_Attribute *attrib)
 
void setNormalAttrib (GA_Attribute *attrib)
 
void setBinormalAttrib (GA_Attribute *attrib)
 
void pairByEdgeCount (bool b)
 
void setPairingShift (int s)
 
void setExtSpineRange (fpreal s, fpreal e)
 
void setExtSpineBlend (fpreal s=0.0, fpreal d=0.0)
 
void setExtSpinePositioning (SpinePositioning p)
 
void setSpineSampleMethod (SpineSampleMethod m)
 
void setMiterJoints (bool b)
 
void setScaleInvariant (bool b)
 
void setPreTwist (fpreal t)
 
void setSrcEdgeGroup (GA_EdgeGroup *grp)
 
void setDstEdgeGroup (GA_EdgeGroup *grp)
 
void setChainRefs (int src_ref, int dst_ref)
 
void setSrcFrameUpDir (UT_Vector3 dir)
 
void setDstFrameUpDir (UT_Vector3 dir)
 
int getNumSrcLoopPts () const
 
int getNumDstLoopPts () const
 
void setWranglePoint (bool w)
 
void setWranglePrimitive (bool w)
 
void setWrangleVertex (bool w)
 
void setCollectedLinks (bool user_links, bool auto_links, bool boundary_links)
 
void fillWrangleDetail (GA_Offset base_offset, GA_Offset *src_vtx_rep, GA_Offset *dst_vtx_rep, const GA_Offset *supplied_src_vtx_rep, const GA_Offset *supplied_dst_vtx_rep, GA_PrimitiveWrangler *prim_wrangler, GA_VertexWrangler *vtx_wrangler, UT_Array< GA_RWHandleV3 > &uvs, TextureMode uv_style=INTERPOLATE, TextureScaling uv_scaling=FIT_UNIT_SQUARE)
 

Detailed Description

GU_PolyBridge encapsulates most of the functionality of the polybridge sop. It can generate a bridge between a source and a destination edge loop each of which can be open or closed.

Definition at line 205 of file GU_PolyBridge.h.

Member Typedef Documentation

typedef std::pair<int, int> GU_PolyBridge::IndexPair

Definition at line 233 of file GU_PolyBridge.h.

Definition at line 234 of file GU_PolyBridge.h.

Member Enumeration Documentation

Enumerator
DIR_SIGN_AUTO 
DIR_SIGN_POS 
DIR_SIGN_NEG 

Definition at line 285 of file GU_PolyBridge.h.

Enumerator
LINEAR 
ROTATING_FRAME 

Definition at line 292 of file GU_PolyBridge.h.

Enumerator
INTERPOLATE 
UNIT_SQUARE 
RECTANGLE 
PROPORTIONAL 

Definition at line 209 of file GU_PolyBridge.h.

Enumerator
FIT_UNIT_SQUARE 
MATCH_3D 
MATCH_UV 

Definition at line 217 of file GU_PolyBridge.h.

Constructor & Destructor Documentation

GU_PolyBridge::GU_PolyBridge ( GU_Detail gdp,
const GA_OffsetArray src_chain,
bool  src_chain_closed,
const GA_OffsetArray dst_chain,
bool  dst_chain_closed,
bool  straight_bridge = true 
)
GU_PolyBridge::~GU_PolyBridge ( )

Member Function Documentation

void GU_PolyBridge::buildBridge ( const GA_Offset src_rep_vtx,
const GA_Offset dst_rep_vtx,
GA_OffsetArray user_link_grp = 0,
GA_OffsetArray auto_link_grp = 0,
GA_OffsetArray boundary_link_grp = 0,
GA_OffsetArray src_chain_grp = 0,
GA_OffsetArray dst_chain_grp = 0,
int  num_twists = 0 
)
void GU_PolyBridge::buildTopology ( int  divisions,
int  src_divisions = 0,
int  dst_divisions = 0,
IndexPairArray pairings = nullptr 
)
inline

Definition at line 236 of file GU_PolyBridge.h.

void GU_PolyBridge::fillGroups ( GA_Offset  ptoff0,
GA_Offset  primoff0,
GA_OffsetArray user_link_grp,
GA_OffsetArray auto_link_grp,
GA_OffsetArray boundary_link_grp,
GA_OffsetArray src_chain_grp,
GA_OffsetArray dst_chain_grp 
)
void GU_PolyBridge::fillWrangleDetail ( GA_Offset  base_offset,
GA_Offset src_vtx_rep,
GA_Offset dst_vtx_rep,
const GA_Offset supplied_src_vtx_rep,
const GA_Offset supplied_dst_vtx_rep,
GA_PrimitiveWrangler prim_wrangler,
GA_VertexWrangler vtx_wrangler,
UT_Array< GA_RWHandleV3 > &  uvs,
TextureMode  uv_style = INTERPOLATE,
TextureScaling  uv_scaling = FIT_UNIT_SQUARE 
)
UT_Vector3 GU_PolyBridge::getDstCentroid ( )
inline

Definition at line 304 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumDstLoopPts ( ) const
inline

Definition at line 441 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumMeshPolys ( )
int GU_PolyBridge::getNumMeshPolyVtxs ( )
int GU_PolyBridge::getNumSrcLoopPts ( ) const
inline

Definition at line 438 of file GU_PolyBridge.h.

UT_Vector3 GU_PolyBridge::getSrcCentroid ( )
inline

Definition at line 301 of file GU_PolyBridge.h.

void GU_PolyBridge::pairByEdgeCount ( bool  b)
inline

Definition at line 394 of file GU_PolyBridge.h.

void GU_PolyBridge::setAttachToDst ( bool  attach)
inline

Definition at line 352 of file GU_PolyBridge.h.

void GU_PolyBridge::setAttachToSrc ( bool  attach)
inline

Definition at line 349 of file GU_PolyBridge.h.

void GU_PolyBridge::setAxialRotation ( fpreal  r)
inline

Definition at line 325 of file GU_PolyBridge.h.

void GU_PolyBridge::setBinormalAttrib ( GA_Attribute attrib)
inline

Definition at line 391 of file GU_PolyBridge.h.

void GU_PolyBridge::setChainRefs ( int  src_ref,
int  dst_ref 
)
inline

Definition at line 427 of file GU_PolyBridge.h.

void GU_PolyBridge::setClipRange ( fpreal  s,
fpreal  e 
)
inline

Definition at line 370 of file GU_PolyBridge.h.

void GU_PolyBridge::setCollectedLinks ( bool  user_links,
bool  auto_links,
bool  boundary_links 
)
void GU_PolyBridge::setDstCtr ( UT_Vector3  ctr)
inline

Definition at line 346 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstDir ( UT_Vector3  dir)
inline

Definition at line 340 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstDirectionSign ( DirectionSign  t)
inline

Definition at line 367 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstEdgeGroup ( GA_EdgeGroup grp)
inline

Definition at line 424 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstFrameUpDir ( UT_Vector3  dir)
inline

Definition at line 434 of file GU_PolyBridge.h.

void GU_PolyBridge::setExternalSpine ( GEO_Face curve)
inline

Definition at line 328 of file GU_PolyBridge.h.

void GU_PolyBridge::setExtSpineBlend ( fpreal  s = 0.0,
fpreal  d = 0.0 
)
inline

Definition at line 403 of file GU_PolyBridge.h.

void GU_PolyBridge::setExtSpinePositioning ( SpinePositioning  p)
inline

Definition at line 406 of file GU_PolyBridge.h.

void GU_PolyBridge::setExtSpineRange ( fpreal  s,
fpreal  e 
)
inline

Definition at line 400 of file GU_PolyBridge.h.

void GU_PolyBridge::setGenerateMesh ( bool  b)
inline

Definition at line 379 of file GU_PolyBridge.h.

void GU_PolyBridge::setGenerateSpine ( bool  b)
inline

Definition at line 373 of file GU_PolyBridge.h.

void GU_PolyBridge::setMagnitudes ( fpreal  s = 1.0,
fpreal  d = 1.0 
)
inline

Definition at line 319 of file GU_PolyBridge.h.

void GU_PolyBridge::setMeshGroup ( GA_PrimitiveGroup grp)
inline

Definition at line 382 of file GU_PolyBridge.h.

void GU_PolyBridge::setMiterJoints ( bool  b)
inline

Definition at line 412 of file GU_PolyBridge.h.

void GU_PolyBridge::setMorphMethod ( MorphMethod  m)
inline

Definition at line 316 of file GU_PolyBridge.h.

void GU_PolyBridge::setNormalAttrib ( GA_Attribute attrib)
inline

Definition at line 388 of file GU_PolyBridge.h.

void GU_PolyBridge::setPairingShift ( int  s)
inline

Definition at line 397 of file GU_PolyBridge.h.

void GU_PolyBridge::setPreTwist ( fpreal  t)
inline

Definition at line 418 of file GU_PolyBridge.h.

void GU_PolyBridge::setReverseSpine ( bool  r)
inline

Definition at line 361 of file GU_PolyBridge.h.

void GU_PolyBridge::setScaleInvariant ( bool  b)
inline

Definition at line 415 of file GU_PolyBridge.h.

void GU_PolyBridge::setSpineGroup ( GA_PointGroup grp)
inline

Definition at line 376 of file GU_PolyBridge.h.

void GU_PolyBridge::setSpineSampleMethod ( SpineSampleMethod  m)
inline

Definition at line 409 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcCtr ( UT_Vector3  ctr)
inline

Definition at line 343 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcDir ( UT_Vector3  dir)
inline

Definition at line 337 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcDirectionSign ( DirectionSign  t)
inline

Definition at line 364 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcEdgeGroup ( GA_EdgeGroup grp)
inline

Definition at line 421 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcFrameUpDir ( UT_Vector3  dir)
inline

Definition at line 430 of file GU_PolyBridge.h.

void GU_PolyBridge::setStiffnesses ( fpreal  s = 0.0,
fpreal  d = 0.0 
)
inline

Definition at line 322 of file GU_PolyBridge.h.

void GU_PolyBridge::setTangentAttrib ( GA_Attribute attrib)
inline

Definition at line 385 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessAttrib ( GA_Attribute attrib)
inline

Definition at line 310 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessRamp ( UT_Ramp ramp)
inline

Definition at line 331 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessScale ( fpreal  s)
inline

Definition at line 355 of file GU_PolyBridge.h.

void GU_PolyBridge::setTwistAttrib ( GA_Attribute attrib)
inline

Definition at line 313 of file GU_PolyBridge.h.

void GU_PolyBridge::setTwistRamp ( UT_Ramp ramp)
inline

Definition at line 334 of file GU_PolyBridge.h.

void GU_PolyBridge::setTwistRange ( fpreal  min,
fpreal  max 
)
inline

Definition at line 358 of file GU_PolyBridge.h.

GA_Offset GU_PolyBridge::setupBatchBuild ( GA_Offset  ptoff0,
UT_IntArray quad_pt_nums,
GEO_PolyCounts quad_size_list 
)
void GU_PolyBridge::setWarningStream ( UT_StringStream w)
inline

Definition at line 307 of file GU_PolyBridge.h.

void GU_PolyBridge::setWranglePoint ( bool  w)
inline

Definition at line 444 of file GU_PolyBridge.h.

void GU_PolyBridge::setWranglePrimitive ( bool  w)
inline

Definition at line 445 of file GU_PolyBridge.h.

void GU_PolyBridge::setWrangleVertex ( bool  w)
inline

Definition at line 446 of file GU_PolyBridge.h.

void GU_PolyBridge::writeGeometry ( GA_Offset  ptoff0,
GA_Offset  primoff0,
int  num_twists = 0,
const GU_Detail tgdp = nullptr,
const GA_Offset src_rep_vtx = nullptr,
const GA_Offset dst_rep_vtx = nullptr,
GA_PointWrangler pt_wrangler = nullptr,
GA_PrimitiveWrangler prim_wrangler = nullptr,
GA_VertexWrangler vtx_wrangler = nullptr 
)
inline

Definition at line 245 of file GU_PolyBridge.h.


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