Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | List of all members
castor::ResourceCacheT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits > Class Reference

AnimatedObjectGroup cache. More...

#include <AnimatedObjectGroupCache.hpp>

Inheritance diagram for castor::ResourceCacheT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits >:
Inheritance graph
[legend]
Collaboration diagram for castor::ResourceCacheT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits >:
Collaboration graph
[legend]

Classes

struct  MeshPoolsEntry
 
struct  SkeletonPoolsEntry
 

Public Types

using ElementT = castor3d::AnimatedObjectGroup
 
using ElementKeyT = String
 
using ElementCacheTraitsT = castor3d::AnimatedObjectGroupCacheTraits
 
using ElementCacheT = ResourceCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT >
 
using ElementPtrT = typename ElementCacheT::ElementPtrT
 
using ElementObsT = typename ElementCacheT::ElementObsT
 
using ElementContT = typename ElementCacheT::ElementContT
 
using ElementInitialiserT = typename ElementCacheT::ElementInitialiserT
 
using ElementCleanerT = typename ElementCacheT::ElementCleanerT
 
using ElementMergerT = typename ElementCacheT::ElementMergerT
 
- Public Types inherited from castor::ResourceCacheBaseT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits >
using ElementT
 
using ElementKeyT
 
using ElementCacheTraitsT
 
using ElementCacheBaseT
 
using ElementCacheT
 
using ElementPtrT
 
using ElementObsT
 
using ElementContT
 
using ElementInitialiserT
 
using ElementCleanerT
 
using ElementMergerT
 

Public Member Functions

C3D_API ResourceCacheT (castor3d::Scene &scene)
 Constructor.
 
C3D_API ~ResourceCacheT () noexcept override
 Destructor.
 
C3D_API void initialise (castor3d::RenderDevice const &device)
 Initialises the cache buffers.
 
C3D_API void cleanup ()
 Sets all the elements to be cleaned up.
 
C3D_API void update (castor3d::CpuUpdater &updater)
 Updates the render pass, CPU wise.
 
C3D_API void clear (castor3d::RenderDevice const &device)
 Flushes the collection.
 
C3D_API castor::Vector< castor3d::AnimatedObject * > findObject (castor::String const &name) const
 
castor3d::GpuBufferOffsetT< castor3d::MorphingWeightsConfiguration > const & getMorphingWeights () const
 
castor3d::GpuBufferOffsetT< castor3d::SkinningTransformsConfiguration > const & getSkinningTransformsBuffer () const
 
- Public Member Functions inherited from castor::OwnedBy< castor3d::Scene >
castor3d::ScenegetOwner () const
 
- Public Member Functions inherited from castor::ResourceCacheBaseT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits >
 ResourceCacheBaseT (ResourceCacheBaseT const &)=delete
 
 ResourceCacheBaseT (ResourceCacheBaseT &&) noexcept=delete
 
ResourceCacheBaseToperator= (ResourceCacheBaseT const &)=delete
 
ResourceCacheBaseToperator= (ResourceCacheBaseT &&) noexcept=delete
 
void cleanup () noexcept
 Sets all the elements to be cleaned up.
 
void clear () noexcept
 Flushes the collection.
 
ElementPtrT create (ElementKeyT const &name, ParametersT &&... parameters) const
 Creates an element.
 
ElementObsT tryAdd (ElementKeyT const &name, ElementPtrT &element, bool initialise=false)
 Adds an element.
 
ElementObsT tryAdd (ElementKeyT const &name, bool initialise, ElementObsT &created, ParametersT &&... parameters)
 Add an element, constructed in-place.
 
ElementObsT tryAddNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=false)
 Adds an element.
 
ElementObsT tryAddNoLock (ElementKeyT const &name, bool initialise, ElementObsT &created, ParametersT &&... parameters)
 Add an element, constructed in-place.
 
ElementObsT add (ElementKeyT const &name, ElementPtrT &element, bool initialise=true)
 Logging version of tryAdd.
 
ElementObsT add (ElementKeyT const &name, ParametersT &&... parameters)
 Logging version of tryAdd.
 
ElementObsT addNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=true)
 Logging version of tryAdd.
 
ElementObsT addNoLock (ElementKeyT const &name, ParametersT &&... parameters)
 Logging version of tryAdd.
 
ElementPtrT tryRemove (ElementKeyT const &name, bool cleanup=false) noexcept
 Removes an element, given a name.
 
ElementPtrT tryRemoveNoLock (ElementKeyT const &name, bool cleanup=false) noexcept
 Removes an element, given a name.
 
ElementPtrT remove (ElementKeyT const &name, bool cleanup=false) noexcept
 Logging version of tryRemove.
 
ElementPtrT removeNoLock (ElementKeyT const &name, bool cleanup=false) noexcept
 Logging version of tryRemove.
 
void rename (ElementKeyT const &oldName, ElementKeyT const &newName)
 Renames a resource.
 
ElementObsT tryFind (ElementKeyT const &name) const noexcept
 Looks for an element with given name.
 
ElementObsT tryFindNoLock (ElementKeyT const &name) const noexcept
 Looks for an element with given name.
 
ElementObsT find (ElementKeyT const &name) const
 Logging version of tryRemove.
 
ElementObsT findNoLock (ElementKeyT const &name) const
 Logging version of tryRemove.
 
void mergeInto (ElementCacheBaseT &destination)
 Merges this cache's elements to the one given.
 
void forEach (FuncType func) const
 
void forEach (FuncType func)
 
uint32_t getObjectCount () const noexcept
 
uint32_t getObjectCountNoLock () const noexcept
 
String const & getObjectTypeName () const noexcept
 
bool has (ElementKeyT const &name) const noexcept
 
bool hasNoLock (ElementKeyT const &name) const noexcept
 
bool isEmpty () const noexcept
 
bool isEmptyNoLock () const noexcept
 
void lock () const
 
void unlock () const noexcept
 
auto begin () noexcept
 
auto begin () const noexcept
 
auto end () noexcept
 
auto end () const noexcept
 
void reportCreation (String const &name) const
 
void reportAdded (String const &name) const
 
void reportDuplicate (String const &name) const
 
void reportNull () const
 
void reportUnknown (String const &name) const
 

Additional Inherited Members

- Protected Types inherited from castor::ResourceCacheBaseT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits >
using MutexT
 
- Protected Member Functions inherited from castor::OwnedBy< castor3d::Scene >
 OwnedBy (castor3d::Scene &owner)
 Constructor.
 
- Protected Member Functions inherited from castor::ResourceCacheBaseT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits >
void doCleanupNoLock () const noexcept
 
void doClearNoLock () noexcept
 
ElementPtrT doCreateT (ElementKeyT const &name, ParametersT &&... parameters) const
 
ElementObsT doTryAddNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=true)
 
ElementObsT doAddNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=true)
 
ElementObsT doTryAddNoLockT (ElementKeyT const &name, bool initialise, ElementObsT &created, ParametersT &&... parameters)
 
ElementObsT doAddNoLockT (ElementKeyT const &name, ParametersT &&... parameters)
 
ElementPtrT doTryRemoveNoLock (ElementKeyT const &name, bool cleanup=false) noexcept
 
ElementObsT doTryFindNoLock (ElementKeyT const &name) const noexcept
 
 ResourceCacheBaseT (LoggerInstance &logger, ElementInitialiserT initialise=ElementInitialiserT{}, ElementCleanerT clean=ElementCleanerT{}, ElementMergerT merge=ElementMergerT{})
 
virtual ~ResourceCacheBaseT () noexcept=default
 
- Protected Attributes inherited from castor::ResourceCacheBaseT< castor3d::AnimatedObjectGroup, String, castor3d::AnimatedObjectGroupCacheTraits >
LoggerInstancem_logger
 
CheckedMutexT< MutexTm_mutex
 
ElementContT m_resources
 
ElementInitialiserT m_initialise
 
ElementCleanerT m_clean
 
ElementMergerT m_merge
 

Detailed Description

AnimatedObjectGroup cache.

Member Typedef Documentation

◆ ElementCacheT

◆ ElementCacheTraitsT

◆ ElementCleanerT

◆ ElementContT

◆ ElementInitialiserT

◆ ElementKeyT

◆ ElementMergerT

◆ ElementObsT

◆ ElementPtrT

◆ ElementT

Constructor & Destructor Documentation

◆ ResourceCacheT()

Constructor.

Parameters
[in]sceneThe parent scene.

◆ ~ResourceCacheT()

Destructor.

Member Function Documentation

◆ cleanup()

Sets all the elements to be cleaned up.

◆ clear()

Flushes the collection.

Parameters
[in]deviceThe GPU device.

◆ findObject()

◆ getMorphingWeights()

◆ getSkinningTransformsBuffer()

◆ initialise()

Initialises the cache buffers.

◆ update()

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

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