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

#include <POP_AttribMap.h>

+ Inheritance diagram for POP_AttribMap:

Public Member Functions

 POP_AttribMap (void)
 
virtual ~POP_AttribMap (void)
 
void build (POP_ContextData *map, const GU_Detail *source, GU_Detail *dest, const UT_String &pattern, int addLocalVar=0, bool refreshable=false)
 
void refreshSource (const GU_Detail *source)
 
void prepareForPossibleSourceDeletion ()
 
void recoverAfterSourceNotDeleted ()
 
const GA_RWAttributeRefgetEvalNormalOffset ()
 
bool hasSrcVelocity () const
 
void getSrcOrEvalNormal (UT_Vector3 &N, GEO_PointP src)
 
void setSrcNormal (const UT_Vector3 &N)
 
GEO_VertexgetEvalVertex ()
 Will allocate the eval storage (detail) if it is not already available. More...
 
GEO_PointP getEvalPoint ()
 Will allocate the eval storage (detail) if it is not already available. More...
 
bool isEvalPoint (GEO_PointP elem) const
 
const GU_DetailgetSrcDetail () const
 
const GU_DetailpeekEvalDetail () const
 
void registerExtraSrcAttributeForEval (const GA_Attribute *attrib)
 
void ensureEvalStorageIsAvailable ()
 
GA_AttributeRefMapgetEvalMap ()
 
GA_AttributeRefMapgetEvalVectorMap ()
 
int peekEvalMapMaxEntries () const
 
int peekEvalVectorMapMaxEntries () const
 

Additional Inherited Members

Detailed Description

Definition at line 75 of file POP_AttribMap.h.

Constructor & Destructor Documentation

POP_AttribMap::POP_AttribMap ( void  )
virtual POP_AttribMap::~POP_AttribMap ( void  )
virtual

Member Function Documentation

void POP_AttribMap::build ( POP_ContextData map,
const GU_Detail source,
GU_Detail dest,
const UT_String pattern,
int  addLocalVar = 0,
bool  refreshable = false 
)

Build the mapping between the source and destination details. Note that no evaluation storage is allocated here. We allocate this temp storage when needed to avoid paying the overhead when we don't need it and to give the caller an opportunity to request to specify any additional attributes that should be included (for local variable evaluation).

void POP_AttribMap::ensureEvalStorageIsAvailable ( )
inline

Definition at line 204 of file POP_AttribMap.h.

GA_AttributeRefMap& POP_AttribMap::getEvalMap ( )
inline

AttributeRefMaps mapping attributes in the evaluation detail to the corresponding attributes in the source detail. This is a subset of the source attributes consisting of those to be inherited by newly birthed particles and also those needed by the generator to evaluate attribute-based local variables.

These methods will allocate the eval storage (detail) if it is not already available.

Definition at line 118 of file POP_AttribMap.h.

const GA_RWAttributeRef& POP_AttribMap::getEvalNormalOffset ( )
inline

Definition at line 163 of file POP_AttribMap.h.

GEO_PointP POP_AttribMap::getEvalPoint ( )
inline

Will allocate the eval storage (detail) if it is not already available.

Definition at line 179 of file POP_AttribMap.h.

GA_AttributeRefMap& POP_AttribMap::getEvalVectorMap ( )
inline

AttributeRefMaps mapping attributes in the evaluation detail to the corresponding attributes in the source detail. This is a subset of the source attributes consisting of those to be inherited by newly birthed particles and also those needed by the generator to evaluate attribute-based local variables.

These methods will allocate the eval storage (detail) if it is not already available.

Definition at line 123 of file POP_AttribMap.h.

GEO_Vertex* POP_AttribMap::getEvalVertex ( )
inline

Will allocate the eval storage (detail) if it is not already available.

Definition at line 173 of file POP_AttribMap.h.

const GU_Detail* POP_AttribMap::getSrcDetail ( ) const
inline

Definition at line 193 of file POP_AttribMap.h.

void POP_AttribMap::getSrcOrEvalNormal ( UT_Vector3 N,
GEO_PointP  src 
)
bool POP_AttribMap::hasSrcVelocity ( ) const
inline

Definition at line 165 of file POP_AttribMap.h.

bool POP_AttribMap::isEvalPoint ( GEO_PointP  elem) const
inline

Definition at line 184 of file POP_AttribMap.h.

const GU_Detail* POP_AttribMap::peekEvalDetail ( ) const
inline

Definition at line 195 of file POP_AttribMap.h.

int POP_AttribMap::peekEvalMapMaxEntries ( ) const
inline

Methods to query the maximum number of entries in the various evaluation maps without forcing an allocation. Because these methods don't account for the overlap between the attributes we evaluate for inheritence and those we evaluate for local variables, the returned value may be greater than the actual entry counts of the evaluation maps would be after allocation.

Definition at line 137 of file POP_AttribMap.h.

int POP_AttribMap::peekEvalVectorMapMaxEntries ( ) const
inline

Methods to query the maximum number of entries in the various evaluation maps without forcing an allocation. Because these methods don't account for the overlap between the attributes we evaluate for inheritence and those we evaluate for local variables, the returned value may be greater than the actual entry counts of the evaluation maps would be after allocation.

Definition at line 151 of file POP_AttribMap.h.

void POP_AttribMap::prepareForPossibleSourceDeletion ( )

prepareForPossibleSourceDeletion() should be called before any action that may result in deleting our source detail. A re-build or refresh is not a replacement for this call as the original source detail will often already be deleted by that point. This method should typically be followed by a build(), refreshSource(), or recoverAfterSourceNotDeleted() call.

void POP_AttribMap::recoverAfterSourceNotDeleted ( )

This method should be called after prepareForPossibleSourceDeletion() if the source was not in fact deleted.

void POP_AttribMap::refreshSource ( const GU_Detail source)

refreshSource() should only be called if the map was built to be refreshable by build(). Any extra source attributes registered for evaluation via registerExtraSrcEvalAttributeForEval() will have to be registered again.

void POP_AttribMap::registerExtraSrcAttributeForEval ( const GA_Attribute attrib)

Any extra attributes should be registered before the first call needing evaluation storage. Any such attributes will need to be registered again after any build() or refreshSource() call.

void POP_AttribMap::setSrcNormal ( const UT_Vector3 N)
inline

Definition at line 170 of file POP_AttribMap.h.


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