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

Class to efficiently transform multiple attributes. More...

#include <GA_AttributeTransformer.h>

Classes

class  Handle
 Handle to a transformable attribute. More...
 
class  Transform
 Class to pass transforms to GA_AttributeTransformer. More...
 

Public Member Functions

 GA_AttributeTransformer (GA_Detail &gdp, GA_AttributeOwner owner)
 
 ~GA_AttributeTransformer ()
 
void addAttributes (bool keep_lengths=false)
 
void addAttributes (const GA_AttributeFilter &filter, bool keep_lenghts=false)
 
void addAttribute (GA_Attribute *attrib, bool keep_lengths=false)
 
void clearAttributes ()
 Clear the list of transformable attributes. More...
 
exint entries () const
 Return the number of attributes which will be transformed. More...
 
const HandlegetHandle (exint i) const
 Return the handle to the individual attribute. More...
 
GA_DetailgetDetail () const
 Return the bound detail. More...
 
void transform (const GA_Range &range, Transform< fpreal32 > &m) const
 
void transform (const GA_Range &range, Transform< fpreal64 > &m) const
 
void transform (const GA_Range &range, Transform< fpreal32 > &m32, Transform< fpreal64 > &m64) const
 
void transform (GA_Offset offset, Transform< fpreal32 > &m) const
 
void transform (GA_Offset offset, Transform< fpreal64 > &m) const
 
void transform (GA_Offset offset, Transform< fpreal32 > &m32, Transform< fpreal64 > &m64) const
 
bool needInverse () const
 
bool needQuaternion () const
 
bool hasSingle () const
 
bool hasDouble () const
 

Detailed Description

Class to efficiently transform multiple attributes.

This class will transform attributes as efficiently as possible, depending on the attribute's properties. The transformer works on a single class of attributes (i.e. GA_ATTRIB_POINT).

Definition at line 41 of file GA_AttributeTransformer.h.

Constructor & Destructor Documentation

GA_AttributeTransformer::GA_AttributeTransformer ( GA_Detail gdp,
GA_AttributeOwner  owner 
)
GA_AttributeTransformer::~GA_AttributeTransformer ( )

Member Function Documentation

void GA_AttributeTransformer::addAttribute ( GA_Attribute attrib,
bool  keep_lengths = false 
)

Add a single transformable attributes to the handle list. When keep_length is set, normals and vectors will maintain their lengths under scaling.

void GA_AttributeTransformer::addAttributes ( bool  keep_lengths = false)

Add all transformable attributes to the handle list. When keep_length is set, normals and vectors will maintain their lengths under scaling.

void GA_AttributeTransformer::addAttributes ( const GA_AttributeFilter filter,
bool  keep_lenghts = false 
)

Add a filtered selection of attributes to the handle list. The filter should filter out non-transforming attributes. When keep_length is set, normals and vectors will maintain their lengths under scaling.

void GA_AttributeTransformer::clearAttributes ( )

Clear the list of transformable attributes.

exint GA_AttributeTransformer::entries ( ) const
inline

Return the number of attributes which will be transformed.

Definition at line 232 of file GA_AttributeTransformer.h.

GA_Detail& GA_AttributeTransformer::getDetail ( ) const
inline

Return the bound detail.

Definition at line 236 of file GA_AttributeTransformer.h.

const Handle& GA_AttributeTransformer::getHandle ( exint  i) const
inline

Return the handle to the individual attribute.

Definition at line 234 of file GA_AttributeTransformer.h.

bool GA_AttributeTransformer::hasDouble ( ) const
inline

Check whether any attributes are single- or double-precision

Definition at line 268 of file GA_AttributeTransformer.h.

bool GA_AttributeTransformer::hasSingle ( ) const
inline

Check whether any attributes are single- or double-precision

Definition at line 267 of file GA_AttributeTransformer.h.

bool GA_AttributeTransformer::needInverse ( ) const
inline

Check whether any attributes require the inverse/quaternion transforms

Definition at line 261 of file GA_AttributeTransformer.h.

bool GA_AttributeTransformer::needQuaternion ( ) const
inline

Check whether any attributes require the inverse/quaternion transforms

Definition at line 262 of file GA_AttributeTransformer.h.

void GA_AttributeTransformer::transform ( const GA_Range range,
Transform< fpreal32 > &  m 
) const

Perform the transformation on all attributes.

Note
The Transform reference is non-const. The methods are mostly thread safe (provided threads access unique pages of data). However, since the Transform object is non-const, the Transform should not be shared across threads.
void GA_AttributeTransformer::transform ( const GA_Range range,
Transform< fpreal64 > &  m 
) const

Perform the transformation on all attributes.

Note
The Transform reference is non-const. The methods are mostly thread safe (provided threads access unique pages of data). However, since the Transform object is non-const, the Transform should not be shared across threads.
void GA_AttributeTransformer::transform ( const GA_Range range,
Transform< fpreal32 > &  m32,
Transform< fpreal64 > &  m64 
) const

Perform the transformation on all attributes.

Note
The Transform reference is non-const. The methods are mostly thread safe (provided threads access unique pages of data). However, since the Transform object is non-const, the Transform should not be shared across threads.
void GA_AttributeTransformer::transform ( GA_Offset  offset,
Transform< fpreal32 > &  m 
) const

Perform the transformation on all attributes.

Note
The Transform reference is non-const. The methods are mostly thread safe (provided threads access unique pages of data). However, since the Transform object is non-const, the Transform should not be shared across threads.
void GA_AttributeTransformer::transform ( GA_Offset  offset,
Transform< fpreal64 > &  m 
) const

Perform the transformation on all attributes.

Note
The Transform reference is non-const. The methods are mostly thread safe (provided threads access unique pages of data). However, since the Transform object is non-const, the Transform should not be shared across threads.
void GA_AttributeTransformer::transform ( GA_Offset  offset,
Transform< fpreal32 > &  m32,
Transform< fpreal64 > &  m64 
) const

Perform the transformation on all attributes.

Note
The Transform reference is non-const. The methods are mostly thread safe (provided threads access unique pages of data). However, since the Transform object is non-const, the Transform should not be shared across threads.

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