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)
 
 ~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 246 of file GU_PolyBridge.h.

Definition at line 247 of file GU_PolyBridge.h.

Member Enumeration Documentation

Enumerator
DIR_SIGN_AUTO 
DIR_SIGN_POS 
DIR_SIGN_NEG 

Definition at line 301 of file GU_PolyBridge.h.

Enumerator
LINEAR 
ROTATING_FRAME 

Definition at line 308 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 
)
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 249 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 320 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumDstLoopPts ( ) const
inline

Definition at line 457 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumMeshPolys ( ) const
inline

Definition at line 284 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumMeshPolyVtxs ( ) const
inline

Definition at line 287 of file GU_PolyBridge.h.

int GU_PolyBridge::getNumSrcLoopPts ( ) const
inline

Definition at line 454 of file GU_PolyBridge.h.

UT_Vector3 GU_PolyBridge::getSrcCentroid ( )
inline

Definition at line 317 of file GU_PolyBridge.h.

void GU_PolyBridge::pairByEdgeCount ( bool  b)
inline

Definition at line 410 of file GU_PolyBridge.h.

void GU_PolyBridge::setAttachToDst ( bool  attach)
inline

Definition at line 368 of file GU_PolyBridge.h.

void GU_PolyBridge::setAttachToSrc ( bool  attach)
inline

Definition at line 365 of file GU_PolyBridge.h.

void GU_PolyBridge::setAxialRotation ( fpreal  r)
inline

Definition at line 341 of file GU_PolyBridge.h.

void GU_PolyBridge::setBinormalAttrib ( GA_Attribute attrib)
inline

Definition at line 407 of file GU_PolyBridge.h.

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

Definition at line 443 of file GU_PolyBridge.h.

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

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

void GU_PolyBridge::setDstDir ( UT_Vector3  dir)
inline

Definition at line 356 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstDirectionSign ( DirectionSign  t)
inline

Definition at line 383 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstEdgeGroup ( GA_EdgeGroup grp)
inline

Definition at line 440 of file GU_PolyBridge.h.

void GU_PolyBridge::setDstFrameUpDir ( UT_Vector3  dir)
inline

Definition at line 450 of file GU_PolyBridge.h.

void GU_PolyBridge::setExternalSpine ( const GEO_Face curve)
inline

Definition at line 344 of file GU_PolyBridge.h.

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

Definition at line 419 of file GU_PolyBridge.h.

void GU_PolyBridge::setExtSpinePositioning ( SpinePositioning  p)
inline

Definition at line 422 of file GU_PolyBridge.h.

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

Definition at line 416 of file GU_PolyBridge.h.

void GU_PolyBridge::setGenerateMesh ( bool  b)
inline

Definition at line 395 of file GU_PolyBridge.h.

void GU_PolyBridge::setGenerateSpine ( bool  b)
inline

Definition at line 389 of file GU_PolyBridge.h.

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

Definition at line 335 of file GU_PolyBridge.h.

void GU_PolyBridge::setMeshGroup ( GA_PrimitiveGroup grp)
inline

Definition at line 398 of file GU_PolyBridge.h.

void GU_PolyBridge::setMiterJoints ( bool  b)
inline

Definition at line 428 of file GU_PolyBridge.h.

void GU_PolyBridge::setMorphMethod ( MorphMethod  m)
inline

Definition at line 332 of file GU_PolyBridge.h.

void GU_PolyBridge::setNormalAttrib ( GA_Attribute attrib)
inline

Definition at line 404 of file GU_PolyBridge.h.

void GU_PolyBridge::setPairingShift ( int  s)
inline

Definition at line 413 of file GU_PolyBridge.h.

void GU_PolyBridge::setPreTwist ( fpreal  t)
inline

Definition at line 434 of file GU_PolyBridge.h.

void GU_PolyBridge::setReverseSpine ( bool  r)
inline

Definition at line 377 of file GU_PolyBridge.h.

void GU_PolyBridge::setScaleInvariant ( bool  b)
inline

Definition at line 431 of file GU_PolyBridge.h.

void GU_PolyBridge::setSpineGroup ( GA_PointGroup grp)
inline

Definition at line 392 of file GU_PolyBridge.h.

void GU_PolyBridge::setSpineSampleMethod ( SpineSampleMethod  m)
inline

Definition at line 425 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcCtr ( UT_Vector3  ctr)
inline

Definition at line 359 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcDir ( UT_Vector3  dir)
inline

Definition at line 353 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcDirectionSign ( DirectionSign  t)
inline

Definition at line 380 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcEdgeGroup ( GA_EdgeGroup grp)
inline

Definition at line 437 of file GU_PolyBridge.h.

void GU_PolyBridge::setSrcFrameUpDir ( UT_Vector3  dir)
inline

Definition at line 446 of file GU_PolyBridge.h.

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

Definition at line 338 of file GU_PolyBridge.h.

void GU_PolyBridge::setTangentAttrib ( GA_Attribute attrib)
inline

Definition at line 401 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessAttrib ( GA_Attribute attrib)
inline

Definition at line 326 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessRamp ( UT_Ramp ramp)
inline

Definition at line 347 of file GU_PolyBridge.h.

void GU_PolyBridge::setThicknessScale ( fpreal  s)
inline

Definition at line 371 of file GU_PolyBridge.h.

void GU_PolyBridge::setTwistAttrib ( GA_Attribute attrib)
inline

Definition at line 329 of file GU_PolyBridge.h.

void GU_PolyBridge::setTwistRamp ( UT_Ramp ramp)
inline

Definition at line 350 of file GU_PolyBridge.h.

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

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

void GU_PolyBridge::setWranglePoint ( bool  w)
inline

Definition at line 460 of file GU_PolyBridge.h.

void GU_PolyBridge::setWranglePrimitive ( bool  w)
inline

Definition at line 461 of file GU_PolyBridge.h.

void GU_PolyBridge::setWrangleVertex ( bool  w)
inline

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


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