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

A utility class to amortize overhead from GA_GBElement attribute handling methods. More...

#include <GA_ElementWrangler.h>

+ Inheritance diagram for GA_ElementWrangler:

Public Member Functions

void copyAttributeValues (GA_Offset dest, GA_Offset src)
 
void copyAttributeValues (const GA_Range &dest, GA_Offset src)
 
void scaleAttributeValues (GA_Offset dest, fpreal scale)
 
void addAttributeValues (GA_Offset dest, GA_Offset src, fpreal scale=1)
 
void lerpAttributeValues (GA_Offset dest, GA_Offset src0, GA_Offset src1, fpreal bias)
 
bool isValid (GA_Detail &dest) const
 
bool isValid (GA_Detail &dest, const GA_Detail &src) const
 
int getNumAttributes () const
 
void bumpAllDestDataIds ()
 

Protected Member Functions

 GA_ElementWrangler (GA_AttributeOwner owner, GA_Detail &dest, const GA_Attribute *exclude=0)
 
 GA_ElementWrangler (GA_AttributeOwner owner, GA_Detail &dest, const GA_Detail &src, const GA_Attribute *exclude=0)
 
 GA_ElementWrangler (GA_AttributeOwner owner, GA_Detail &dest, const GA_AttributeFilter &filter)
 
 GA_ElementWrangler (GA_AttributeOwner owner, GA_Detail &dest, const GA_Detail &src, const GA_AttributeFilter &filter)
 
 ~GA_ElementWrangler ()
 Protected destructor as we don't support polymorphic destruction. More...
 
GA_AttributeRefMapgetMap ()
 

Detailed Description

A utility class to amortize overhead from GA_GBElement attribute handling methods.

The GA_ElementWrangler class provides a simplified interface for common attribute operations as elements are added or removed.

This class is not thread-safe, so each thread should have its own copy, and any attributes added after its instantiation will not be processed.

Definition at line 38 of file GA_ElementWrangler.h.

Constructor & Destructor Documentation

GA_ElementWrangler::GA_ElementWrangler ( GA_AttributeOwner  owner,
GA_Detail dest,
const GA_Attribute exclude = 0 
)
protected
GA_ElementWrangler::GA_ElementWrangler ( GA_AttributeOwner  owner,
GA_Detail dest,
const GA_Detail src,
const GA_Attribute exclude = 0 
)
protected
GA_ElementWrangler::GA_ElementWrangler ( GA_AttributeOwner  owner,
GA_Detail dest,
const GA_AttributeFilter filter 
)
protected
GA_ElementWrangler::GA_ElementWrangler ( GA_AttributeOwner  owner,
GA_Detail dest,
const GA_Detail src,
const GA_AttributeFilter filter 
)
protected
GA_ElementWrangler::~GA_ElementWrangler ( )
inlineprotected

Protected destructor as we don't support polymorphic destruction.

Definition at line 89 of file GA_ElementWrangler.h.

Member Function Documentation

void GA_ElementWrangler::addAttributeValues ( GA_Offset  dest,
GA_Offset  src,
fpreal  scale = 1 
)
inline

Definition at line 50 of file GA_ElementWrangler.h.

void GA_ElementWrangler::bumpAllDestDataIds ( )
inline

Definition at line 73 of file GA_ElementWrangler.h.

void GA_ElementWrangler::copyAttributeValues ( GA_Offset  dest,
GA_Offset  src 
)
inline
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 41 of file GA_ElementWrangler.h.

void GA_ElementWrangler::copyAttributeValues ( const GA_Range dest,
GA_Offset  src 
)
GA_AttributeRefMap& GA_ElementWrangler::getMap ( )
inlineprotected

Definition at line 91 of file GA_ElementWrangler.h.

int GA_ElementWrangler::getNumAttributes ( ) const
inline

Definition at line 71 of file GA_ElementWrangler.h.

bool GA_ElementWrangler::isValid ( GA_Detail dest) const
inline

Definition at line 61 of file GA_ElementWrangler.h.

bool GA_ElementWrangler::isValid ( GA_Detail dest,
const GA_Detail src 
) const
inline

Definition at line 66 of file GA_ElementWrangler.h.

void GA_ElementWrangler::lerpAttributeValues ( GA_Offset  dest,
GA_Offset  src0,
GA_Offset  src1,
fpreal  bias 
)
inline

Definition at line 55 of file GA_ElementWrangler.h.

void GA_ElementWrangler::scaleAttributeValues ( GA_Offset  dest,
fpreal  scale 
)
inline

Definition at line 46 of file GA_ElementWrangler.h.


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