1#ifndef EmbreeTargetManager_h
2#define EmbreeTargetManager_h
42 void free(
const QString &shapeFile);
46 bool inCache(
const QString &shapeFile)
const;
56 static void DieAtExit();
65 struct EmbreeTargetShapeContainer {
69 EmbreeTargetShapeContainer()
72 m_referenceCount(0) { }
80 EmbreeTargetShapeContainer(
const QString &fullPath,
82 : m_fullFilePath(fullPath),
83 m_targetShape(targetShape),
84 m_referenceCount(0) { }
86 QString m_fullFilePath;
93 QString fullFilePath(
const QString &filePath)
const;
94 void removeTargetShape(
const QString &shapeFile);
97 QMap<QString, EmbreeTargetShapeContainer> m_targeCache;
Class for managing the construction and destruction of EmbreeTargetShapes.
Definition EmbreeTargetManager.h:37
int maxCacheSize() const
Return the maximum number of stored EmbreeTargetShapes.
Definition EmbreeTargetManager.cpp:243
EmbreeTargetShape * create(const QString &shapeFile)
Get a pointer to an EmbreeTargetShape containing the information from a shape file.
Definition EmbreeTargetManager.cpp:129
bool inCache(const QString &shapeFile) const
Check if there is an already created EmbreeTargetShape for a file.
Definition EmbreeTargetManager.cpp:266
void free(const QString &shapeFile)
Notify the manager that an EmbreeTargetShape is no longer in use.
Definition EmbreeTargetManager.cpp:173
void setMaxCacheSize(const int &numShapes)
Set the maximum number of stored EmbreeTargetShapes.
Definition EmbreeTargetManager.cpp:256
static EmbreeTargetManager * getInstance()
Retrieve reference to Singleton instance of this object.
Definition EmbreeTargetManager.cpp:77
int currentCacheSize() const
Return the number of currently stored EmbreeTargetShapes.
Definition EmbreeTargetManager.cpp:233
Embree Target Shape for planetary bodies.
Definition EmbreeTargetShape.h:139
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16