|
| | NodeMemoryManager () |
| |
| virtual | ~NodeMemoryManager () |
| |
| SceneNode * | _getDummyNode (void) const |
| |
| void | _setTwin (SceneMemoryMgrTypes memoryManagerType, NodeMemoryManager *twinMemoryManager) |
| | @See mMemoryManagerType
|
| |
| virtual void | applyRebase (uint16 level, const MemoryPoolVec &newBasePtrs, const ArrayMemoryManager::PtrdiffVec &diffsList) |
| | Called when the manager already grew it's memory pool to honour more node requests.
|
| |
| virtual void | buildDiffList (uint16 level, const MemoryPoolVec &basePtrs, ArrayMemoryManager::PtrdiffVec &outDiffsList) |
| | Called when the manager needs to grow it's memory pool to honour more node requests.
|
| |
| size_t | getFirstNode (Transform &outTransform, size_t depth) |
| | Retrieves a Transform pointing to the first Node in the given depth.
|
| |
| SceneMemoryMgrTypes | getMemoryManagerType () const |
| |
| size_t | getNumDepths () const |
| | Retrieves the number of depth levels that have been created.
|
| |
| NodeMemoryManager * | getTwin () const |
| | Note the return value can be null.
|
| |
| void | migrateTo (Transform &inOutTransform, size_t depth, NodeMemoryManager *dstNodeMemoryManager) |
| | Releases memory belonging to us, not before copying it into another manager.
|
| |
| void | migrateTo (Transform &inOutTransform, size_t oldDepth, size_t newDepth, NodeMemoryManager *dstNodeMemoryManager) |
| | Releases memory belonging to us, not before copying it into another manager.
|
| |
| void | migrateToAndAttach (Transform &inOutTransform, size_t depth, NodeMemoryManager *dstNodeMemoryManager) |
| | It's the same as calling: this->nodeAttached( transform, depth ); this->migrateTo( transform, depth, dstNodeMemoryManager ); Without unnecessary transfers.
|
| |
| void | migrateToAndDetach (Transform &inOutTransform, size_t depth, NodeMemoryManager *dstNodeMemoryManager) |
| | It's almost the same as calling: this->nodeDettached( transform, depth ); this->migrateTo( transform, 0, dstNodeMemoryManager ); Without unnecessary transfers and setting the correct dstNodeMemoryManager->mDummyNode.
|
| |
| void | nodeAttached (Transform &outTransform, size_t depth) |
| | Requests memory for the given transform to be attached, transferring existing values inside to the new memory block.
|
| |
| void | nodeCreated (Transform &outTransform, size_t depth) |
| | Requests memory for the given transform for the first, initializing values.
|
| |
| void | nodeDestroyed (Transform &outTransform, size_t depth) |
| | Releases current memory.
|
| |
| void | nodeDettached (Transform &outTransform, size_t depth) |
| | Releases current memory and requests memory from the root level.
|
| |
| void | nodeMoved (Transform &inOutTransform, size_t oldDepth, size_t newDepth) |
| | Requests memory for the given Node to be moved to a different depth level, transferring existing values inside to the new memory slot.
|
| |
| virtual void | performCleanup (uint16 level, const MemoryPoolVec &basePtrs, size_t const *elementsMemSizes, size_t startInstance, size_t diffInstances) |
| | Called when too many nodes were destroyed in a non-LIFO fashion.
|
| |
Wrap-around class that contains multiple ArrayMemoryManager, one per hierarchy depth.
- Note that some SceneManager implementations (i.e. Octree like) may want to have more than one NodeMemoryManager, for example one per octant.
Called when too many nodes were destroyed in a non-LIFO fashion.
Without cleaning up, the scene manager will waste CPU & bandwidth on processing vectors & matrices that are not in use. The more fragmented/unordered those removals were, the worst it is. Try to create everything static first, then dynamic content.
In a way, it's very similar to vector::remove(), as removing an element from the middle means we need to shift everything past that point one place (or more).
- Parameters
-
| level | The hierarchy depth level |
| basePtrs | The base ptrs. |
| startInstance | The instance to which past that we need to shift |
| diffInstances | How many places we need to shift backwards. |
Implements Ogre::ArrayMemoryManager::RebaseListener.