Implementation to create the KfTransform variables needed by SkeletonTrack @See SkeletonAnimationDef and.
More...
#include <OgreKfTransformArrayMemoryManager.h>
Implementation to create the KfTransform variables needed by SkeletonTrack @See SkeletonAnimationDef and.
- See also
- SkeletonTrack
- Author
- Matias N. Goldberg
- Version
- 1.0
◆ PtrdiffVec
◆ MemoryTypes
Enumerator |
---|
KfTransformType | |
NumMemoryTypes | |
◆ KfTransformArrayMemoryManager()
Constructor.
@See intialize. @See destroy.
- Parameters
-
elementsMemSize | Array containing the size in bytes of each element type (i.e. NodeElementsMemSize) |
initRoutines | Array containing the cleanup function that will be called when default initializing memory. Unlike cleanupRoutines, just leave the function pointer null if all you want is just to initialize to 0. |
cleanupRoutines | Array containing the cleanup function that will be called when performing cleanups. Many pointers can use the flatCleaner and is the fastest. However Array variables (i.e. ArrayVector3) have a layout where flatCleaner won't work correctly because the data is interleaved (rather than flat). |
numElementsSize | Number of entries in elementsMemSize |
depthLevel | Value only used to pass to the listener. Identifies to which hierarchy depth level this memory manager belongs to. |
hintMaxNodes | Hint on how many SceneNodes we'll be creating. |
cleanupThreshold | The threshold at which a cleanup is triggered after too many nodes have been destroyed in a non-LIFO order or without being created again. -1 to disable cleanups. |
maxHardLimit | Maximum amount of SceneNodes. The manager is not allowed to grow and consume more memory past that limit. MAX_MEMORY_SLOTS for no limit. This is useful when target architecture has much less memory than the dev machine. |
- Note that if hintMaxNodes < maxHardLimit, the manager may be forced to do temporary allocations (to do the reallocs) thus during a brief perdiod of time it may consume more memory than the established hard limit (up to 2x).
- Parameters
-
rebaseListener | The listener to be called when cleaning up or growing the memory pool. If null, cleanupThreshold is set to -1 & maxHardLimit will be set to hintMaxNodes |
◆ ~KfTransformArrayMemoryManager()
virtual Ogre::KfTransformArrayMemoryManager::~KfTransformArrayMemoryManager |
( |
| ) |
|
|
inlinevirtual |
◆ createNewNode()
void Ogre::KfTransformArrayMemoryManager::createNewNode |
( |
KfTransform ** |
outTransform | ) |
|
Requests memory for a new KfTransofrm (for the Array vectors & matrices)
- Parameters
-
outTransform | Out: The transform with filled memory pointers |
◆ destroy()
void Ogre::ArrayMemoryManager::destroy |
( |
| ) |
|
|
inherited |
Destroys the memory ptrs.
@See initialize
◆ getAllMemory()
size_t Ogre::ArrayMemoryManager::getAllMemory |
( |
| ) |
const |
|
inherited |
Gets all memory reserved for this manager.
◆ getFreeMemory()
size_t Ogre::ArrayMemoryManager::getFreeMemory |
( |
| ) |
const |
|
inherited |
Gets available memory in bytes.
◆ getNumUsedSlotsIncludingFragmented()
size_t Ogre::ArrayMemoryManager::getNumUsedSlotsIncludingFragmented |
( |
| ) |
const |
|
inherited |
Returns mUsedMemory.
When ARRAY_PACKED_REALS = 4, and 4 objects have been created but the 2nd one has been deleted, getNumUsedSlotsIncludingFragmented will still return 4 until the 4th object is removed or a cleanup is performed
◆ getUsedMemory()
size_t Ogre::ArrayMemoryManager::getUsedMemory |
( |
| ) |
const |
|
inherited |
Gets used memory in bytes (not including waste)
◆ getWastedMemory()
size_t Ogre::ArrayMemoryManager::getWastedMemory |
( |
| ) |
const |
|
inherited |
Gets wasted memory (perform a cleanup to fix)
◆ initialize()
void Ogre::ArrayMemoryManager::initialize |
( |
| ) |
|
|
inherited |
Initializes mMemoryPools.
Once it has been called, destroy() must be called. @See destroy
◆ ElementsMemSize
◆ MAX_MEMORY_SLOTS
const size_t Ogre::ArrayMemoryManager::MAX_MEMORY_SLOTS |
|
staticinherited |
The documentation for this class was generated from the following file: