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

#include <GU_SubDivPacking.h>

Public Member Functions

 GU_SubDivPacking ()
 Default constructor. More...
 
 GU_SubDivPacking (const GA_AttributeDict &dict)
 Constructor which builds all float attributes for a dictionary. More...
 
 GU_SubDivPacking (const GU_SubDivPacking &src)
 Copy constructor. More...
 
 ~GU_SubDivPacking ()
 Destructor. More...
 
GU_SubDivPackingoperator= (const GU_SubDivPacking &src)
 Assignment operator. More...
 
void clear ()
 Clear the packing tables. More...
 
void addFloatAttributes (const GA_AttributeDict &dict)
 Add all float attributes from the given dictionary. More...
 
void addAttribute (GA_Attribute *atr, bool check_dups, int tuple_size=-1)
 
template<typename T >
void packFloats (T *data, GA_Offset off) const
 Pack floats from an object's attributes into a packed buffer. More...
 
template<typename T >
void unpackFloats (GA_Offset off, const T *data) const
 Unpack data in the buffer into the object's attributes. More...
 
int entries () const
 Number of attributes. More...
 
int getCount () const
 Number of floats required for the packed array. More...
 
const UT_StringArraygetNames () const
 
const UT_IntArraygetOffsets () const
 
const UT_IntArraygetSizes () const
 Number of floats for each attribute (in floats, not bytes) More...
 
int getPackedOffset (const GA_Attribute *atr) const
 Get the attribute offset (i.e. offset into the packed data) More...
 

Detailed Description

Definition at line 27 of file GU_SubDivPacking.h.

Constructor & Destructor Documentation

GU_SubDivPacking::GU_SubDivPacking ( )

Default constructor.

GU_SubDivPacking::GU_SubDivPacking ( const GA_AttributeDict dict)

Constructor which builds all float attributes for a dictionary.

GU_SubDivPacking::GU_SubDivPacking ( const GU_SubDivPacking src)

Copy constructor.

GU_SubDivPacking::~GU_SubDivPacking ( )

Destructor.

Member Function Documentation

void GU_SubDivPacking::addAttribute ( GA_Attribute atr,
bool  check_dups,
int  tuple_size = -1 
)

Add a single attribute. If a tuple size is specified, it will override the tuple size fo the attribute. Tuple sizes must be <= the actual attribute tuple size.

void GU_SubDivPacking::addFloatAttributes ( const GA_AttributeDict dict)

Add all float attributes from the given dictionary.

void GU_SubDivPacking::clear ( )

Clear the packing tables.

int GU_SubDivPacking::entries ( ) const
inline

Number of attributes.

Definition at line 62 of file GU_SubDivPacking.h.

int GU_SubDivPacking::getCount ( ) const
inline

Number of floats required for the packed array.

Definition at line 65 of file GU_SubDivPacking.h.

const UT_StringArray& GU_SubDivPacking::getNames ( ) const
inline

Offset array into the packed array. This is the offset (not the byte-count)

Definition at line 69 of file GU_SubDivPacking.h.

const UT_IntArray& GU_SubDivPacking::getOffsets ( ) const
inline

Offset array into the packed array. This is the offset (not the byte-count)

Definition at line 73 of file GU_SubDivPacking.h.

int GU_SubDivPacking::getPackedOffset ( const GA_Attribute atr) const

Get the attribute offset (i.e. offset into the packed data)

const UT_IntArray& GU_SubDivPacking::getSizes ( ) const
inline

Number of floats for each attribute (in floats, not bytes)

Definition at line 76 of file GU_SubDivPacking.h.

GU_SubDivPacking& GU_SubDivPacking::operator= ( const GU_SubDivPacking src)

Assignment operator.

template<typename T >
void GU_SubDivPacking::packFloats ( T data,
GA_Offset  off 
) const

Pack floats from an object's attributes into a packed buffer.

template<typename T >
void GU_SubDivPacking::unpackFloats ( GA_Offset  off,
const T data 
) const

Unpack data in the buffer into the object's attributes.


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