VTK
vtkOSPRayVolumeCache.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOSPRayVolumeCache.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkOSPRayVolumeCache_h
27 #define vtkOSPRayVolumeCache_h
28 
29 #include "vtkRenderingOSPRayModule.h" // For export macro
30 #include "vtkSystemIncludes.h" //dll warning suppression
31 #include <map> // for stl
32 
33 namespace osp
34 {
35  struct Volume;
36 }
37 
38 class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayVolumeCache {
39 public:
42 
46  void AddToCache(double tstep, osp::Volume *payload);
47 
52  osp::Volume* GetFromCache(double tstep);
53 
55 
59  void SetSize(int);
60  int GetSize();
62 
63 private:
64 
65  // deletes all of the content in the cache
66  void Empty();
67  int Size;
68 
69  std::map<double, osp::Volume*> Contents;
70 };
71 
72 #endif //vtkOSPRayVolumeCache_h
73 // VTK-HeaderTest-Exclude: vtkOSPRayVolumeCache.h
temporal cache ospray structures to speed flipbooks