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

Class which keeps counts of each type of primitive. More...

#include <GA_PrimitiveTracker.h>

Public Member Functions

SYS_FORCE_INLINE GA_PrimitiveTracker ()
 
SYS_FORCE_INLINE ~GA_PrimitiveTracker ()
 
SYS_FORCE_INLINE void add (int id)
 
void add (const GA_PrimitiveTracker &that)
 
SYS_FORCE_INLINE void addMultiple (int id, GA_Size n)
 
void applyDiff (const GA_PrimitiveTracker &orig, const GA_PrimitiveTracker &changed)
 
SYS_FORCE_INLINE void del (int id)
 
void clear ()
 
bool contains (const GA_PrimitiveTypeId &type) const
 
bool containsOnly (const UT_Array< GA_PrimitiveTypeId > &allowed) const
 
GA_Size count (const GA_PrimitiveTypeId &type) const
 
GA_Size countFamily (GA_PrimitiveFamilyMask family) const
 
GA_PrimitiveTrackeroperator= (const GA_PrimitiveTracker &that)
 
bool hasLocalTransform (const GA_PrimitiveFactory &f) const
 Check to see if there are any primitives which have hasLocalTransform() More...
 
bool hasCECaches (const GA_PrimitiveFactory &f) const
 
GA_Size fillCounts (GA_Size *counts, GA_Size array_size) const
 
int64 getMemoryUsage (bool inclusive) const
 

Detailed Description

Class which keeps counts of each type of primitive.

Definition at line 25 of file GA_PrimitiveTracker.h.

Constructor & Destructor Documentation

SYS_FORCE_INLINE GA_PrimitiveTracker::GA_PrimitiveTracker ( )
inline

Definition at line 29 of file GA_PrimitiveTracker.h.

SYS_FORCE_INLINE GA_PrimitiveTracker::~GA_PrimitiveTracker ( )
inline

Definition at line 34 of file GA_PrimitiveTracker.h.

Member Function Documentation

SYS_FORCE_INLINE void GA_PrimitiveTracker::add ( int  id)
inline

Definition at line 40 of file GA_PrimitiveTracker.h.

void GA_PrimitiveTracker::add ( const GA_PrimitiveTracker that)
inline

Definition at line 46 of file GA_PrimitiveTracker.h.

SYS_FORCE_INLINE void GA_PrimitiveTracker::addMultiple ( int  id,
GA_Size  n 
)
inline

Definition at line 54 of file GA_PrimitiveTracker.h.

void GA_PrimitiveTracker::applyDiff ( const GA_PrimitiveTracker orig,
const GA_PrimitiveTracker changed 
)
inline

this += (changed - orig) This is so that items can be added or removed in separate trackers in parallel, and then the changes can be merged back into the original.

Definition at line 63 of file GA_PrimitiveTracker.h.

void GA_PrimitiveTracker::clear ( )
inline

Definition at line 79 of file GA_PrimitiveTracker.h.

bool GA_PrimitiveTracker::contains ( const GA_PrimitiveTypeId type) const
inline

Definition at line 84 of file GA_PrimitiveTracker.h.

bool GA_PrimitiveTracker::containsOnly ( const UT_Array< GA_PrimitiveTypeId > &  allowed) const
inline

Definition at line 89 of file GA_PrimitiveTracker.h.

GA_Size GA_PrimitiveTracker::count ( const GA_PrimitiveTypeId type) const
inline

Definition at line 111 of file GA_PrimitiveTracker.h.

GA_Size GA_PrimitiveTracker::countFamily ( GA_PrimitiveFamilyMask  family) const
inline

Definition at line 117 of file GA_PrimitiveTracker.h.

SYS_FORCE_INLINE void GA_PrimitiveTracker::del ( int  id)
inline

Definition at line 73 of file GA_PrimitiveTracker.h.

GA_Size GA_PrimitiveTracker::fillCounts ( GA_Size counts,
GA_Size  array_size 
) const

Extract the counts for each primitive type into an array. The array should be large enough to hold gdp.getPrimitiveFactory().getTypeCount(). The method returns the sum of all the primitive in the list

int64 GA_PrimitiveTracker::getMemoryUsage ( bool  inclusive) const
inline

Definition at line 194 of file GA_PrimitiveTracker.h.

bool GA_PrimitiveTracker::hasCECaches ( const GA_PrimitiveFactory f) const

Check to see if there are any primitives that may need to flush CE buffesr.

bool GA_PrimitiveTracker::hasLocalTransform ( const GA_PrimitiveFactory f) const

Check to see if there are any primitives which have hasLocalTransform()

GA_PrimitiveTracker& GA_PrimitiveTracker::operator= ( const GA_PrimitiveTracker that)
inline

Definition at line 169 of file GA_PrimitiveTracker.h.


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