########
Backbone
########

By this somewhat generic term, we group all the plumbing tools used by an application doing graphics with HOOPS Luminate and that can be freely customized:

    * Memory allocation tools
    * File system tools
    * STL like tools such as the ``RED::Vector`` and ``RED::Map``
    * Multi-threading tools: see the ``RED::Thread`` class
    * Timing tools: see the ``RED::Timer`` class


***********************
Memory Allocation Tools
***********************

HOOPS Luminate's uses the default system memory allocator. However, this allocator can be freely changed, by accessing the ``RED::MemoryAllocator`` instance of the application.

.. include:: /tasks/ta_ca/ta_ca_application/tk_accessing_and_customizing_the_memory_allocator.rst


********************************
Memory Allocation Tracking Tools
********************************

HOOPS Luminate can keep track of all allocations it makes. If memory allocation tracking is enabled, then all allocations and de-allocations made by the engine are recorded as a whole. While this can have a significative impact on performances, this allow the application to easily detect memory leaks or to look for memory management errors.

The ``RED::MemoryLeakTracker`` is accessed using ``RED::MemoryAllocator::GetMemoryLeakTracker``. Memory allocation tracking is enabled directly on the memory allocator using ``RED::MemoryAllocator::SetMemoryTracking``.


*****************
File System Tools
*****************

Similarly to the memory tools, HOOPS Luminate's file system can be customized. The ``RED::FileSystemTools`` static interface provides all the necessary methods to customize HOOPS Luminate's file management methods.


************************
HOOPS Luminate STL Tools
************************

The full HOOPS Luminate API uses a custom implementation of the well known std::vector and std::map classes. These are the ``RED::Vector`` and ``RED::Map`` classes. HOOPS Luminate uses its own classes to avoid external dependencies with the STL on some platforms and also to ease debugging. The HOOPS Luminate vectors and map can be easily parsed directly from a debugger.



*********************
Multi-Threading Tools
*********************

The ``RED::Thread`` class can be used to launch calculation threads to leverage the calculating power of multiple CPU cores. HOOPS Luminate threads run on Windows, Linux and MacOS systems.


************
Timing Tools
************

The ``RED::Timer`` is a very small class that can be used quite easily to get accurate timings. It uses operating system proprietary calls to provide an accurate estimation of the elapsed time between two measurement ticks.

