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

#include <GU_Brush.h>

Public Member Functions

 GU_Brush ()
 
 ~GU_Brush ()
 
void buildCaches (GU_Detail *gdp, const GU_Detail *isectgdp, const GA_PrimitiveGroup *group, const GA_PointGroup *ptgroup, bool usevisibility)
 
void buildVertexClasses ()
 
void clearCaches ()
 
bool hasValidCache ()
 
const GU_DetailgetGdp () const
 
const GU_DetailgetIsectGdp () const
 
bool overrideColour (const char *name, int create_tuple_size=-1)
 
bool overrideAlpha (const char *name, bool create=false)
 
bool overrideNml (const char *name)
 
void useCaptureRegion (int captureidx, bool normalizeweight, GEO_Detail::CaptureType capturetype=GEO_Detail::CAPTURE_BONE)
 
bool defaultColour (bool create=false)
 
bool defaultAlpha (bool create=false)
 
bool defaultNormal (bool create=false)
 
bool defaultTexture (const UT_StringHolder &uvattribname, bool create)
 
void visualizeColor (float low, float high, UT_ColorRamp mode)
 
bool doVisualize () const
 
void setVisualizeCd (GA_Offset ptoff, const UT_Vector3 &cd)
 
void clearVisualize ()
 
void applyVisualize (GU_Detail *gdp)
 
void applyVisualizeStencil (GU_Detail *gdp)
 
void getPointCd (GA_Offset ptoff, UT_Vector3 &cd) const
 
void getVertexCd (GA_Offset vtxoff, UT_Vector3 &cd) const
 
void addPrimPoints (const GEO_Detail &detail, GA_Offset primoff, UT_BitArray &ptused, UT_Vector3Array &pts, GA_IndexArray &idxlist)
 
void buildTrees (bool usevisibility)
 
void addUVPrimPoints (const GEO_Detail &detail, GA_Offset primoff, const GA_ROHandleV3 &uvattrib, UT_BitArray &ptused, UT_Vector3Array &uvpts, GA_IndexArray &idxlist)
 
void buildUVTrees (const UT_StringHolder &uvattribname, bool usevisibility)
 
void destroyTrees ()
 
GEO_PointTreegetPointTree ()
 
GEO_PointTreegetUVPointTree ()
 
void connectRingVtx (int vtxnum, GA_Offset vtx2, bool doublevalence=false)
 
void buildRingCache (bool usevisibility)
 
void clearRingCache ()
 
void setWriteAlpha (bool val)
 
bool getWriteAlpha () const
 
int hasStencil () const
 
void clearStencil (bool invalidate_vtx=true, bool invalidate_pt=true)
 
void setMergeModeCallback (GU_BrushMergeModeCallback cb, void *data)
 
void applyMergeMode (GA_Offset ptoff, GA_Offset vtxoff, UT_Vector3 &result, const UT_Vector3 &src, const UT_Vector3 &dst, GU_BrushMergeMode mergemode)
 
void setStencil (float val, bool usevisibility)
 
void colourStencil (GEO_Delta *delta, const UT_Vector3 &cd, GU_BrushMergeMode mergemode)
 
void stampColourStencil (GEO_Delta *delta, GU_BrushMergeMode mergemode)
 
void callbackStencil (fpreal t, GEO_Delta *delta, GU_BrushCallback cb, void *data)
 
void combNormals (GEO_Delta *delta, const UT_Vector3 &dir, float lift, int preservenmllen)
 
void liftNormals (GEO_Delta *delta, float lift, int preservenmllen)
 
void rotateNormals (GEO_Delta *delta, const UT_Vector3 &dir, int preservenmllen)
 
void dragTexture (GEO_Delta *delta, const UT_Vector3 &dir)
 
void scaleTexture (GEO_Delta *delta, float scale, const UT_Vector3 &orig)
 
void displaceNormals (GEO_Delta *delta, float amt)
 
void displaceVector (GEO_Delta *delta, const UT_Vector3 &dir, float amt)
 
void smoothPoints (GEO_Delta *delta)
 
void smoothAttribute (GEO_Delta *delta)
 
void smoothNormals (GEO_Delta *delta, int preservenmllen)
 
void smoothTexture (GEO_Delta *delta)
 
void eraseAttributes (GEO_Delta *old, GEO_Delta *change)
 
void erasePositions (GEO_Delta *old, GEO_Delta *change)
 
void eraseCapture (GEO_Delta *old, GEO_Delta *change)
 
GA_Index findUVSeedPtNum (const UT_Vector3 &orig, const UT_StringHolder &uvattribname)
 
void applyDab (GU_BrushNib *nib, float stencil_val, const UT_Vector3 &orig, const UT_Vector3 &dir, float rad, const GEO_Primitive *seed, GA_Offset seedptoff, bool useconnectivity, bool usenormals, bool inuv, const UT_StringHolder &uvattribname)
 
void getPtNormal (GA_Index ptidx, UT_Vector3 &nml)
 
void clearNormalCache ()
 

Protected Member Functions

bool testPoint (GA_Index ptind, const UT_Vector3 &orig, const UT_Vector3 &dir, float radius2, bool seeddir, bool usenormals)
 
bool isPointEditable (GA_Index ptnum)
 
void readColour (GA_Offset offset, UT_Vector3 &dest) const
 
void writeColour (GA_Offset offset, UT_Vector3 &src) const
 

Protected Attributes

const GA_PrimitiveGroupmyGroup
 
const GA_PointGroupmyPointGroup
 
GU_DetailmyGdp
 
const GU_DetailmyIsectGdp
 
bool myPtNmlSet
 
UT_Vector3Array myPtNmlCache
 
GEO_PointTreemyPointTree
 
GEO_PointTreemyUVPointTree
 
UT_StringHolder myUVTreeAttribName
 
UT_Vector3Array myPointPos
 
UT_Vector3Array myUVPointPos
 
UT_Array< UT_Array< GA_Index > > myFloodConnected
 
UT_Array< GA_OffsetmyIsectVtx
 
UT_Array< GA_OffsetmyGeoVtx
 
UT_Array< UT_IntArray * > myPt2Vtx
 
UT_IntArray myVtxClass
 
UT_Array< GA_OffsetArraymyRingZero
 
UT_IntArray myRingValence
 
UT_Array< UT_Array< GA_Offset > * > myVtxRingZero
 
UT_Array< UT_IntArray * > myVtxRingClass
 
GA_RWHandleF myColourAttrib
 
GA_RWHandleV3 myColourAttribV3
 
int myColourSize
 
bool myColourVertex
 
GA_RWHandleF myAlphaAttrib
 
bool myAlphaVertex
 
GA_RWHandleV3 myTextureAttrib
 
bool myTextureVertex
 
GA_RWHandleV3 myNormalAttrib
 
GA_RWHandleV3 myVisualizeAttrib
 
float myVisLow
 
float myVisHigh
 
UT_ColorRamp myVisMode
 
bool myWriteAlpha
 
bool myUseCaptureRegion
 
int myCaptureIdx
 
bool myNormalizeWeight
 
GEO_Detail::CaptureType myCaptureType
 
bool myUseVisibility
 
GU_BrushMergeModeCallback myMergeModeCallback
 
voidmyMergeModeCallbackData
 

Detailed Description

Definition at line 155 of file GU_Brush.h.

Constructor & Destructor Documentation

GU_Brush::GU_Brush ( )
GU_Brush::~GU_Brush ( )

Member Function Documentation

void GU_Brush::addPrimPoints ( const GEO_Detail detail,
GA_Offset  primoff,
UT_BitArray ptused,
UT_Vector3Array pts,
GA_IndexArray idxlist 
)
void GU_Brush::addUVPrimPoints ( const GEO_Detail detail,
GA_Offset  primoff,
const GA_ROHandleV3 uvattrib,
UT_BitArray ptused,
UT_Vector3Array uvpts,
GA_IndexArray idxlist 
)
void GU_Brush::applyDab ( GU_BrushNib nib,
float  stencil_val,
const UT_Vector3 orig,
const UT_Vector3 dir,
float  rad,
const GEO_Primitive seed,
GA_Offset  seedptoff,
bool  useconnectivity,
bool  usenormals,
bool  inuv,
const UT_StringHolder uvattribname 
)
void GU_Brush::applyMergeMode ( GA_Offset  ptoff,
GA_Offset  vtxoff,
UT_Vector3 result,
const UT_Vector3 src,
const UT_Vector3 dst,
GU_BrushMergeMode  mergemode 
)
void GU_Brush::applyVisualize ( GU_Detail gdp)
void GU_Brush::applyVisualizeStencil ( GU_Detail gdp)
void GU_Brush::buildCaches ( GU_Detail gdp,
const GU_Detail isectgdp,
const GA_PrimitiveGroup group,
const GA_PointGroup ptgroup,
bool  usevisibility 
)
void GU_Brush::buildRingCache ( bool  usevisibility)
void GU_Brush::buildTrees ( bool  usevisibility)
void GU_Brush::buildUVTrees ( const UT_StringHolder uvattribname,
bool  usevisibility 
)
void GU_Brush::buildVertexClasses ( )
void GU_Brush::callbackStencil ( fpreal  t,
GEO_Delta delta,
GU_BrushCallback  cb,
void data 
)
void GU_Brush::clearCaches ( )
void GU_Brush::clearNormalCache ( )
void GU_Brush::clearRingCache ( )
void GU_Brush::clearStencil ( bool  invalidate_vtx = true,
bool  invalidate_pt = true 
)
void GU_Brush::clearVisualize ( )
inline

Definition at line 200 of file GU_Brush.h.

void GU_Brush::colourStencil ( GEO_Delta delta,
const UT_Vector3 cd,
GU_BrushMergeMode  mergemode 
)
void GU_Brush::combNormals ( GEO_Delta delta,
const UT_Vector3 dir,
float  lift,
int  preservenmllen 
)
void GU_Brush::connectRingVtx ( int  vtxnum,
GA_Offset  vtx2,
bool  doublevalence = false 
)
bool GU_Brush::defaultAlpha ( bool  create = false)
bool GU_Brush::defaultColour ( bool  create = false)
bool GU_Brush::defaultNormal ( bool  create = false)
bool GU_Brush::defaultTexture ( const UT_StringHolder uvattribname,
bool  create 
)
void GU_Brush::destroyTrees ( )
void GU_Brush::displaceNormals ( GEO_Delta delta,
float  amt 
)
void GU_Brush::displaceVector ( GEO_Delta delta,
const UT_Vector3 dir,
float  amt 
)
bool GU_Brush::doVisualize ( ) const
inline
Examples:
SOP/SOP_BrushHairLen.C.

Definition at line 198 of file GU_Brush.h.

void GU_Brush::dragTexture ( GEO_Delta delta,
const UT_Vector3 dir 
)
void GU_Brush::eraseAttributes ( GEO_Delta old,
GEO_Delta change 
)
void GU_Brush::eraseCapture ( GEO_Delta old,
GEO_Delta change 
)
void GU_Brush::erasePositions ( GEO_Delta old,
GEO_Delta change 
)
GA_Index GU_Brush::findUVSeedPtNum ( const UT_Vector3 orig,
const UT_StringHolder uvattribname 
)
const GU_Detail* GU_Brush::getGdp ( ) const
inline

Definition at line 173 of file GU_Brush.h.

const GU_Detail* GU_Brush::getIsectGdp ( ) const
inline

Definition at line 174 of file GU_Brush.h.

void GU_Brush::getPointCd ( GA_Offset  ptoff,
UT_Vector3 cd 
) const
GEO_PointTree* GU_Brush::getPointTree ( )
inline

Definition at line 222 of file GU_Brush.h.

void GU_Brush::getPtNormal ( GA_Index  ptidx,
UT_Vector3 nml 
)
GEO_PointTree* GU_Brush::getUVPointTree ( )
inline

Definition at line 223 of file GU_Brush.h.

void GU_Brush::getVertexCd ( GA_Offset  vtxoff,
UT_Vector3 cd 
) const
bool GU_Brush::getWriteAlpha ( ) const
inline

Definition at line 236 of file GU_Brush.h.

int GU_Brush::hasStencil ( ) const
bool GU_Brush::hasValidCache ( )
inline

Definition at line 171 of file GU_Brush.h.

bool GU_Brush::isPointEditable ( GA_Index  ptnum)
protected
void GU_Brush::liftNormals ( GEO_Delta delta,
float  lift,
int  preservenmllen 
)
bool GU_Brush::overrideAlpha ( const char *  name,
bool  create = false 
)
bool GU_Brush::overrideColour ( const char *  name,
int  create_tuple_size = -1 
)
bool GU_Brush::overrideNml ( const char *  name)
void GU_Brush::readColour ( GA_Offset  offset,
UT_Vector3 dest 
) const
inlineprotected

Definition at line 338 of file GU_Brush.h.

void GU_Brush::rotateNormals ( GEO_Delta delta,
const UT_Vector3 dir,
int  preservenmllen 
)
void GU_Brush::scaleTexture ( GEO_Delta delta,
float  scale,
const UT_Vector3 orig 
)
void GU_Brush::setMergeModeCallback ( GU_BrushMergeModeCallback  cb,
void data 
)
inline

Definition at line 242 of file GU_Brush.h.

void GU_Brush::setStencil ( float  val,
bool  usevisibility 
)
void GU_Brush::setVisualizeCd ( GA_Offset  ptoff,
const UT_Vector3 cd 
)
void GU_Brush::setWriteAlpha ( bool  val)
inline

Definition at line 235 of file GU_Brush.h.

void GU_Brush::smoothAttribute ( GEO_Delta delta)
void GU_Brush::smoothNormals ( GEO_Delta delta,
int  preservenmllen 
)
void GU_Brush::smoothPoints ( GEO_Delta delta)
void GU_Brush::smoothTexture ( GEO_Delta delta)
void GU_Brush::stampColourStencil ( GEO_Delta delta,
GU_BrushMergeMode  mergemode 
)
bool GU_Brush::testPoint ( GA_Index  ptind,
const UT_Vector3 orig,
const UT_Vector3 dir,
float  radius2,
bool  seeddir,
bool  usenormals 
)
protected
void GU_Brush::useCaptureRegion ( int  captureidx,
bool  normalizeweight,
GEO_Detail::CaptureType  capturetype = GEO_Detail::CAPTURE_BONE 
)
void GU_Brush::visualizeColor ( float  low,
float  high,
UT_ColorRamp  mode 
)
void GU_Brush::writeColour ( GA_Offset  offset,
UT_Vector3 src 
) const
inlineprotected

Definition at line 348 of file GU_Brush.h.

Member Data Documentation

GA_RWHandleF GU_Brush::myAlphaAttrib
protected

Definition at line 400 of file GU_Brush.h.

bool GU_Brush::myAlphaVertex
protected

Definition at line 401 of file GU_Brush.h.

int GU_Brush::myCaptureIdx
protected

Definition at line 410 of file GU_Brush.h.

GEO_Detail::CaptureType GU_Brush::myCaptureType
protected

Definition at line 412 of file GU_Brush.h.

GA_RWHandleF GU_Brush::myColourAttrib
protected

Definition at line 396 of file GU_Brush.h.

GA_RWHandleV3 GU_Brush::myColourAttribV3
protected

Definition at line 397 of file GU_Brush.h.

int GU_Brush::myColourSize
protected

Definition at line 398 of file GU_Brush.h.

bool GU_Brush::myColourVertex
protected

Definition at line 399 of file GU_Brush.h.

UT_Array<UT_Array<GA_Index> > GU_Brush::myFloodConnected
protected

Definition at line 372 of file GU_Brush.h.

GU_Detail* GU_Brush::myGdp
protected

Definition at line 361 of file GU_Brush.h.

UT_Array<GA_Offset> GU_Brush::myGeoVtx
protected

Definition at line 377 of file GU_Brush.h.

const GA_PrimitiveGroup* GU_Brush::myGroup
protected

Definition at line 359 of file GU_Brush.h.

const GU_Detail* GU_Brush::myIsectGdp
protected

Definition at line 362 of file GU_Brush.h.

UT_Array<GA_Offset> GU_Brush::myIsectVtx
protected

Definition at line 375 of file GU_Brush.h.

GU_BrushMergeModeCallback GU_Brush::myMergeModeCallback
protected

Definition at line 415 of file GU_Brush.h.

void* GU_Brush::myMergeModeCallbackData
protected

Definition at line 416 of file GU_Brush.h.

GA_RWHandleV3 GU_Brush::myNormalAttrib
protected

Definition at line 404 of file GU_Brush.h.

bool GU_Brush::myNormalizeWeight
protected

Definition at line 411 of file GU_Brush.h.

const GA_PointGroup* GU_Brush::myPointGroup
protected

Definition at line 360 of file GU_Brush.h.

UT_Vector3Array GU_Brush::myPointPos
protected

Definition at line 370 of file GU_Brush.h.

GEO_PointTree* GU_Brush::myPointTree
protected

Definition at line 367 of file GU_Brush.h.

UT_Array<UT_IntArray *> GU_Brush::myPt2Vtx
protected

Definition at line 378 of file GU_Brush.h.

UT_Vector3Array GU_Brush::myPtNmlCache
protected

Definition at line 365 of file GU_Brush.h.

bool GU_Brush::myPtNmlSet
protected

Definition at line 364 of file GU_Brush.h.

UT_IntArray GU_Brush::myRingValence
protected

Definition at line 391 of file GU_Brush.h.

UT_Array<GA_OffsetArray> GU_Brush::myRingZero
protected

Definition at line 387 of file GU_Brush.h.

GA_RWHandleV3 GU_Brush::myTextureAttrib
protected

Definition at line 402 of file GU_Brush.h.

bool GU_Brush::myTextureVertex
protected

Definition at line 403 of file GU_Brush.h.

bool GU_Brush::myUseCaptureRegion
protected

Definition at line 409 of file GU_Brush.h.

bool GU_Brush::myUseVisibility
protected

Definition at line 413 of file GU_Brush.h.

UT_Vector3Array GU_Brush::myUVPointPos
protected

Definition at line 371 of file GU_Brush.h.

GEO_PointTree* GU_Brush::myUVPointTree
protected

Definition at line 368 of file GU_Brush.h.

UT_StringHolder GU_Brush::myUVTreeAttribName
protected

Definition at line 369 of file GU_Brush.h.

float GU_Brush::myVisHigh
protected

Definition at line 406 of file GU_Brush.h.

float GU_Brush::myVisLow
protected

Definition at line 406 of file GU_Brush.h.

UT_ColorRamp GU_Brush::myVisMode
protected

Definition at line 407 of file GU_Brush.h.

GA_RWHandleV3 GU_Brush::myVisualizeAttrib
protected

Definition at line 405 of file GU_Brush.h.

UT_IntArray GU_Brush::myVtxClass
protected

Definition at line 384 of file GU_Brush.h.

UT_Array<UT_IntArray *> GU_Brush::myVtxRingClass
protected

Definition at line 394 of file GU_Brush.h.

UT_Array<UT_Array<GA_Offset> *> GU_Brush::myVtxRingZero
protected

Definition at line 393 of file GU_Brush.h.

bool GU_Brush::myWriteAlpha
protected

Definition at line 408 of file GU_Brush.h.


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