28 #ifndef vtkOSPRayCache_h
29 #define vtkOSPRayCache_h
31 #include "vtkRenderingRayTracingModule.h"
49 void Set(
double tstep, std::shared_ptr<T> payload)
51 if (this->Contents.size() >= this->Size)
55 this->Contents[tstep] = payload;
62 std::shared_ptr<T>
Get(
double tstep)
64 auto ret = this->Contents.find(tstep);
65 if (ret != this->Contents.end())
95 bool Contains(
double tstep) {
return this->Get(tstep) !=
nullptr; }
100 bool HasRoom() {
return this->Contents.size() < this->Size; }
106 this->Contents.clear();
112 std::map<double, std::shared_ptr<T> > Contents;
129 #endif // vtkOSPRayCache_h