#include <OBJ_XformCache.h>

Public Types | |
| enum | OBJ_XformType { WORLD_XFORM, LOCAL_XFORM } |
| enum | OBJ_LookupStatus { HIT, MISS_VERSION, MISS_DATA } |
| enum | { DEFAULT_CACHE_SIZE_KB = 50*1024 } |
Public Member Functions | |
| OBJ_XformCache () | |
| ~OBJ_XformCache () | |
| OBJ_LookupStatus | getXform (int id, float time, OBJ_XformType type, OP_VERSION version, UT_DMatrix4 &xform) |
| bool | setXform (int id, float time, OBJ_XformType type, OP_VERSION version, const UT_DMatrix4 &xform) |
| void | parseCommand (CMD_Args &args) |
| void | setMemoryLimit (int64 max_memory) |
| Sets the new memory limit for the cache size in bytes. | |
| void | clear () |
| Clears the cache and frees memory. | |
Static Public Member Functions | |
| static OBJ_XformCache * | getCache () |
| Obtains the transform matrix cache used by all objects. | |
Protected Types | |
| enum | OBJ_MemoryState { MEMORY_CHECK_NEVER, MEMORY_CHECK_ALWAYS } |
Protected Member Functions | |
| virtual const char * | utGetCacheName () const |
| virtual int64 | utGetCurrentSize () |
| virtual bool | utHasMaxSize () const |
| virtual int64 | utGetMaxSize () |
| virtual void | utSetMaxSize (int64 size) |
| virtual int64 | utReduceCacheSizeBy (int64 amount) |
It can also watch memory usage to see what transform matrices should be removed from the table.
Definition at line 39 of file OBJ_XformCache.h.
| anonymous enum |
enum OBJ_XformCache::OBJ_MemoryState [protected] |
| OBJ_XformCache::OBJ_XformCache | ( | ) |
| OBJ_XformCache::~OBJ_XformCache | ( | ) |
| void OBJ_XformCache::clear | ( | ) |
Clears the cache and frees memory.
| static OBJ_XformCache* OBJ_XformCache::getCache | ( | ) | [static] |
Obtains the transform matrix cache used by all objects.
| OBJ_LookupStatus OBJ_XformCache::getXform | ( | int | id, | |
| float | time, | |||
| OBJ_XformType | type, | |||
| OP_VERSION | version, | |||
| UT_DMatrix4 & | xform | |||
| ) |
querries the cache for the transform matrix INPUTS: id - the unique identification number of the operator time - the time at which the xform is applied to the object type - tranformation type version - version of parameters used to construct the xform OUTPUT: xform - on cache hit, the transform matrix, otherwise unchanged RETURNS: the status of the lookup (hit or miss)
| void OBJ_XformCache::parseCommand | ( | CMD_Args & | args | ) |
Used as the interface to objcache, which is installed in MOT_Command.C
| void OBJ_XformCache::setMemoryLimit | ( | int64 | max_memory | ) |
Sets the new memory limit for the cache size in bytes.
| bool OBJ_XformCache::setXform | ( | int | id, | |
| float | time, | |||
| OBJ_XformType | type, | |||
| OP_VERSION | version, | |||
| const UT_DMatrix4 & | xform | |||
| ) |
sets the transform matrix in the cache INPUTS: id - the unique identification number of the operator time - the time at which the xform is applied to the object type - tranformation type version - version of parameters used to construct the xform RETURNS: true: if succeeded false: if failed
| virtual const char* OBJ_XformCache::utGetCacheName | ( | ) | const [inline, protected, virtual] |
| virtual int64 OBJ_XformCache::utGetCurrentSize | ( | ) | [inline, protected, virtual] |
| virtual int64 OBJ_XformCache::utGetMaxSize | ( | ) | [inline, protected, virtual] |
| virtual bool OBJ_XformCache::utHasMaxSize | ( | ) | const [inline, protected, virtual] |
Implements UT_Cache.
| virtual void OBJ_XformCache::utSetMaxSize | ( | int64 | size | ) | [protected, virtual] |
Reimplemented from UT_Cache.
1.5.9