Atoms Crowd  4.1.0
Atoms::CacheManager Class Reference

Cache manager. More...

#include <CacheManager.h>

Classes

class  FrameData
 
class  Task
 Task class. More...
 

Public Types

typedef std::map< std::string, std::map< int, FrameData > > MapType
 

Public Member Functions

const AtomsCore::PosegetAgentPose (const std::string &cachePath, const std::string &cacheName, int frame, int agentId) const
 Gets the agent pose.
 
const AtomsCore::MapMetadatagetAgentMetadata (const std::string &cachePath, const std::string &cacheName, int frame, int agentId) const
 Gets the agent metadata.
 
void getBlendAgentPose (const std::string &cachePath, const std::string &cacheName, double frame, int agentId, const AtomsCore::Skeleton &skeleton, AtomsCore::Pose &pose) const
 Gets the blended agent pose.
 
void getBlendAgentMetadata (const std::string &cachePath, const std::string &cacheName, double frame, int agentId, AtomsCore::MapMetadata &mapMeta) const
 Gets the blended agent metadatas.
 
const AtomsCore::MapMetadatagetAgentFrame (const std::string &cachePath, const std::string &cacheName, int frame, int agentId) const
 Gets cache frame data.
 
const AtomsCore::MapMetadatagetHeaderFrame (const std::string &cachePath, const std::string &cacheName, int frame) const
 Get cache frame header data.
 
const AtomsCore::MapMetadataloadHeaderFrame (const std::string &cachePath, const std::string &cacheName, int frame)
 Load cache frame header data.
 
void requestFrameHeader (const std::string &cachePath, const std::string &cacheName, int frame, bool multithread=false)
 Requests a cache frame header.
 
void requestAgentFrame (const std::string &cachePath, const std::string &cacheName, int frame, const std::vector< int > &ids, bool multithread=false)
 Requests a cache frame.
 
void requestAgentPose (const std::string &cachePath, const std::string &cacheName, int frame, const std::vector< int > &ids, bool multithread=false)
 Requests a agent pose.
 
void requestAgentMetadata (const std::string &cachePath, const std::string &cacheName, int frame, const std::vector< int > &ids, bool multithread=false)
 Requests a agent metadatas.
 
void executeTasks (bool clearNotUsedCache=true)
 Executes all the tasks in the queue.
 
void clear ()
 Clear all the caches.
 
const MapType & agentsMetadata () const
 Gets agents metadatas.
 
const MapType & agentsPoses () const
 Gets agents poses.
 
const MapType & frameHeaders () const
 Gets frame headers.
 
const MapType & agentsFrames () const
 Get cache frames.
 
void blendMetadata (AtomsCore::MapMetadata &outMetadata, std::vector< const AtomsCore::MapMetadata * > &inMetadatas, const std::vector< double > &inputWeightVector) const
 Blends mapMetadata.
 
void blendPose (const AtomsCore::Skeleton &skeleton, std::vector< const AtomsCore::Pose * > &posePorts, std::vector< double > &weightPorts, AtomsCore::Pose &outPose) const
 Blends poses.
 
size_t memoryUsage () const
 Gets the memory used by the manager.
 
size_t maxMemory () const
 Gets the max memory the manager can use.
 
void setMaxMemory (size_t value)
 Sets the max memory the manager can use.
 
bool hasCache (const std::string &cachePath, const std::string &cacheName)
 
void removeCache (const std::string &cachePath, const std::string &cacheName)
 Removes a cache from the manager.
 
void loadFullCache (const std::string &cachePath, const std::string &cacheName)
 Loads a full cache inside the manager.
 
void loadCacheFrames (const std::string &cachePath, const std::string &cacheName, int start, int end)
 Loads frames of a cahce inside the manager.
 

Static Public Member Functions

static CacheManagerinstance ()
 Singleton access.
 

Detailed Description

Cache manager.


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