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

#include <GT_PackedGeoCache.h>

+ Inheritance diagram for GT_PackedGeoCache:

Public Member Functions

virtual const char * utGetCacheName () const
 required - return the english name for this cache. More...
 
virtual int64 utGetCurrentSize () const
 required - return the current cache size, in bytes More...
 
virtual int64 utReduceCacheSizeBy (int64 amount)
 
virtual int64 utGetMinSize () const
 
virtual int64 utGetMaxSize () const
 
- Public Member Functions inherited from UT_Cache
 UT_Cache ()
 
virtual ~UT_Cache ()
 
void utClearCache ()
 
virtual bool utHasMaxSize () const
 optional - override if the cache has a well defined maximum size More...
 
virtual void utSetMaxSize (int64)
 
virtual bool utHasMinSize () const
 
virtual void utSetMinSize (int64)
 
virtual bool utUpdateCacheInfo ()
 

Static Public Member Functions

static bool isCachingAvailable ()
 
static GT_PrimitiveHandle findInstance (const UT_StringHolder &name, int64 version, int64 extra_flags, GEO_AnimationType *return_anim=0)
 
static void cacheInstance (const UT_StringHolder &name, const GT_PrimitiveHandle &instance, int64 version, int64 extra_flags, GEO_AnimationType type)
 
static bool recacheInstance (const UT_StringHolder &name, const GT_PrimitiveHandle &instance)
 
static bool removeInstance (const UT_StringHolder &name)
 Remove the geometry with the given name, returning true if removed. More...
 
static bool findAnimation (const UT_StringHolder &name, int64 version, GEO_AnimationType &type)
 Find the animation type of the instance without fetching the geometry. More...
 
static void buildAlembicArchiveName (UT_StringHolder &archive, const std::string &filename)
 
static void buildAlembicArchiveName (UT_StringHolder &archive, const std::vector< std::string > &paths)
 
static void buildAlembicName (UT_StringHolder &name, const char *object, const char *archive, fpreal frame)
 
static void clearAlembics (const char *filename)
 Clear a specified alembic, or all alembics. More...
 
static int64 getAlembicVersion (const char *archive)
 
static bool hasAlembicArchive (const char *archive)
 
static void buildFileRefName (UT_StringHolder &name, const char *filename, exint index)
 
static int getNumDiskFilePrims (const UT_StringHolder &name)
 
static void setNumDiskFilePrims (const UT_StringHolder &name, int count)
 
static void initialize ()
 
- Static Public Member Functions inherited from UT_Cache
static const UT_ValArray
< UT_Cache * > & 
utGetCacheList ()
 get the list of caches More...
 
static void setCacheAddRemoveCB (void(*callback)(void *), void *data)
 callback to be called when a cache is added or deleted. More...
 
static int64 utClearSpaceFromCaches (int64 amount)
 this method attempts to free up 'amount' bytes from all the caches. More...
 

Detailed Description

Definition at line 19 of file GT_PackedGeoCache.h.

Member Function Documentation

static void GT_PackedGeoCache::buildAlembicArchiveName ( UT_StringHolder archive,
const std::string filename 
)
static
static void GT_PackedGeoCache::buildAlembicArchiveName ( UT_StringHolder archive,
const std::vector< std::string > &  paths 
)
static
static void GT_PackedGeoCache::buildAlembicName ( UT_StringHolder name,
const char *  object,
const char *  archive,
fpreal  frame 
)
static
static void GT_PackedGeoCache::buildFileRefName ( UT_StringHolder name,
const char *  filename,
exint  index 
)
static
static void GT_PackedGeoCache::cacheInstance ( const UT_StringHolder name,
const GT_PrimitiveHandle instance,
int64  version,
int64  extra_flags,
GEO_AnimationType  type 
)
static

Cache the instance geometry along with its version, and animation type. 'version' and 'extra_flags' can be anything, but a mismatch during findInstance() will cause a cache miss.

static void GT_PackedGeoCache::clearAlembics ( const char *  filename)
static

Clear a specified alembic, or all alembics.

static bool GT_PackedGeoCache::findAnimation ( const UT_StringHolder name,
int64  version,
GEO_AnimationType type 
)
static

Find the animation type of the instance without fetching the geometry.

static GT_PrimitiveHandle GT_PackedGeoCache::findInstance ( const UT_StringHolder name,
int64  version,
int64  extra_flags,
GEO_AnimationType return_anim = 0 
)
static

Find a GT prim in the cache under 'name'. The version and extra_flags must match. If 'return_anim' is specified, the animation type will be assigned to that pointer. version and extra_flags can be anything that makes sense to the primitive being cached; the cache only tests them for inequality.

static int64 GT_PackedGeoCache::getAlembicVersion ( const char *  archive)
static
static int GT_PackedGeoCache::getNumDiskFilePrims ( const UT_StringHolder name)
static
static bool GT_PackedGeoCache::hasAlembicArchive ( const char *  archive)
static
static void GT_PackedGeoCache::initialize ( )
static
static bool GT_PackedGeoCache::isCachingAvailable ( )
static
static bool GT_PackedGeoCache::recacheInstance ( const UT_StringHolder name,
const GT_PrimitiveHandle instance 
)
static

Recache the geometry (possibly due to modification like convexing) The geometry should already exist in the cache, otherwise this fails.

static bool GT_PackedGeoCache::removeInstance ( const UT_StringHolder name)
static

Remove the geometry with the given name, returning true if removed.

static void GT_PackedGeoCache::setNumDiskFilePrims ( const UT_StringHolder name,
int  count 
)
static
virtual const char* GT_PackedGeoCache::utGetCacheName ( ) const
inlinevirtual

required - return the english name for this cache.

Implements UT_Cache.

Definition at line 87 of file GT_PackedGeoCache.h.

virtual int64 GT_PackedGeoCache::utGetCurrentSize ( ) const
inlinevirtual

required - return the current cache size, in bytes

Implements UT_Cache.

Definition at line 88 of file GT_PackedGeoCache.h.

virtual int64 GT_PackedGeoCache::utGetMaxSize ( ) const
virtual

Reimplemented from UT_Cache.

virtual int64 GT_PackedGeoCache::utGetMinSize ( ) const
virtual

Reimplemented from UT_Cache.

virtual int64 GT_PackedGeoCache::utReduceCacheSizeBy ( int64  amount)
virtual

required - free contents of the cache by amount bytes. Returns the amount of memory (in bytes) actually freed. This does not change the cache size

Implements UT_Cache.


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