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
 
using SpinePositioning = GU_Spine::Positioning
 
using SpineSampleMethod = GU_Spine::SampleMode
 

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, bool allow_coincident_centroids=false)
 
 ~GU_PolyBridge ()=default
 
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=nullptr, GA_OffsetArray *auto_link_grp=nullptr, GA_OffsetArray *boundary_link_grp=nullptr, GA_OffsetArray *src_chain_grp=nullptr, GA_OffsetArray *dst_chain_grp=nullptr, int num_twists=0)
 
int getNumMeshPolys () const
 
int getNumMeshPolyVtxs () const
 
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 (const 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 218 of file GU_PolyBridge.h.

Member Typedef Documentation

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

Definition at line 247 of file GU_PolyBridge.h.

Definition at line 248 of file GU_PolyBridge.h.

Member Enumeration Documentation

Enumerator
DIR_SIGN_AUTO 
DIR_SIGN_POS 
DIR_SIGN_NEG 

Definition at line 302 of file GU_PolyBridge.h.

Enumerator
LINEAR 
ROTATING_FRAME 

Definition at line 309 of file GU_PolyBridge.h.

Enumerator
INTERPOLATE 
UNIT_SQUARE 
RECTANGLE 
PROPORTIONAL 

Definition at line 222 of file GU_PolyBridge.h.

Enumerator
FIT_UNIT_SQUARE 
MATCH_3D 
MATCH_UV 

Definition at line 230 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,
bool  allow_coincident_centroids = false 
)
GU_PolyBridge::~GU_PolyBridge ( )
default

Member Function Documentation

void GU_PolyBridge::buildBridge ( const GA_Offset src_rep_vtx,
const GA_Offset dst_rep_vtx,
GA_OffsetArray user_link_grp = nullptr,
GA_OffsetArray auto_link_grp = nullptr,
GA_OffsetArray boundary_link_grp = nullptr,
GA_OffsetArray src_chain_grp = nullptr,
GA_OffsetArray dst_chain_grp = nullptr,
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 250 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 321 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumDstLoopPts ( ) const
inline

Definition at line 458 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumMeshPolys ( ) const
inline

Definition at line 285 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumMeshPolyVtxs ( ) const
inline

Definition at line 288 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumSrcLoopPts ( ) const
inline

Definition at line 455 of file GU_PolyBridge.h.

UT_Vector3 GU_PolyBridge::getSrcCentroid ( )
inline

Definition at line 318 of file GU_PolyBridge.h.

void GU_PolyBridge::pairByEdgeCount ( bool  b)
inline

Definition at line 411 of file GU_PolyBridge.h.

void GU_PolyBridge::setAttachToDst ( bool  attach)
inline

Definition at line 369 of file GU_PolyBridge.h.

void GU_PolyBridge::setAttachToSrc ( bool  attach)
inline

Definition at line 366 of file GU_PolyBridge.h.

void GU_PolyBridge::setAxialRotation ( fpreal  r)
inline

Definition at line 342 of file GU_PolyBridge.h.

void GU_PolyBridge::setBinormalAttrib ( GA_Attribute attrib)
inline

Definition at line 408 of file GU_PolyBridge.h.

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

Definition at line 444 of file GU_PolyBridge.h.

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

Definition at line 387 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 363 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstDir ( UT_Vector3  dir)
inline

Definition at line 357 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstDirectionSign ( DirectionSign  t)
inline

Definition at line 384 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstEdgeGroup ( GA_EdgeGroup grp)
inline

Definition at line 441 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstFrameUpDir ( UT_Vector3  dir)
inline

Definition at line 451 of file GU_PolyBridge.h.

void GU_PolyBridge::setExternalSpine ( const GEO_Face curve)
inline

Definition at line 345 of file GU_PolyBridge.h.

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

Definition at line 420 of file GU_PolyBridge.h.

void GU_PolyBridge::setExtSpinePositioning ( SpinePositioning  p)
inline

Definition at line 423 of file GU_PolyBridge.h.

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

Definition at line 417 of file GU_PolyBridge.h.

void GU_PolyBridge::setGenerateMesh ( bool  b)
inline

Definition at line 396 of file GU_PolyBridge.h.

void GU_PolyBridge::setGenerateSpine ( bool  b)
inline

Definition at line 390 of file GU_PolyBridge.h.

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

Definition at line 336 of file GU_PolyBridge.h.

void GU_PolyBridge::setMeshGroup ( GA_PrimitiveGroup grp)
inline

Definition at line 399 of file GU_PolyBridge.h.

void GU_PolyBridge::setMiterJoints ( bool  b)
inline

Definition at line 429 of file GU_PolyBridge.h.

void GU_PolyBridge::setMorphMethod ( MorphMethod  m)
inline

Definition at line 333 of file GU_PolyBridge.h.

void GU_PolyBridge::setNormalAttrib ( GA_Attribute attrib)
inline

Definition at line 405 of file GU_PolyBridge.h.

void GU_PolyBridge::setPairingShift ( int  s)
inline

Definition at line 414 of file GU_PolyBridge.h.

void GU_PolyBridge::setPreTwist ( fpreal  t)
inline

Definition at line 435 of file GU_PolyBridge.h.

void GU_PolyBridge::setReverseSpine ( bool  r)
inline

Definition at line 378 of file GU_PolyBridge.h.

void GU_PolyBridge::setScaleInvariant ( bool  b)
inline

Definition at line 432 of file GU_PolyBridge.h.

void GU_PolyBridge::setSpineGroup ( GA_PointGroup grp)
inline

Definition at line 393 of file GU_PolyBridge.h.

void GU_PolyBridge::setSpineSampleMethod ( SpineSampleMethod  m)
inline

Definition at line 426 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcCtr ( UT_Vector3  ctr)
inline

Definition at line 360 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcDir ( UT_Vector3  dir)
inline

Definition at line 354 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcDirectionSign ( DirectionSign  t)
inline

Definition at line 381 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcEdgeGroup ( GA_EdgeGroup grp)
inline

Definition at line 438 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcFrameUpDir ( UT_Vector3  dir)
inline

Definition at line 447 of file GU_PolyBridge.h.

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

Definition at line 339 of file GU_PolyBridge.h.

void GU_PolyBridge::setTangentAttrib ( GA_Attribute attrib)
inline

Definition at line 402 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessAttrib ( GA_Attribute attrib)
inline

Definition at line 327 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessRamp ( UT_Ramp ramp)
inline

Definition at line 348 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessScale ( fpreal  s)
inline

Definition at line 372 of file GU_PolyBridge.h.

void GU_PolyBridge::setTwistAttrib ( GA_Attribute attrib)
inline

Definition at line 330 of file GU_PolyBridge.h.

void GU_PolyBridge::setTwistRamp ( UT_Ramp ramp)
inline

Definition at line 351 of file GU_PolyBridge.h.

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

Definition at line 375 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 324 of file GU_PolyBridge.h.

void GU_PolyBridge::setWranglePoint ( bool  w)
inline

Definition at line 461 of file GU_PolyBridge.h.

void GU_PolyBridge::setWranglePrimitive ( bool  w)
inline

Definition at line 462 of file GU_PolyBridge.h.

void GU_PolyBridge::setWrangleVertex ( bool  w)
inline

Definition at line 463 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 259 of file GU_PolyBridge.h.


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