VTK  9.4.20241202
Public Member Functions | List of all members
vtkOSPRayCache< T > Class Template Reference

temporal cache ospray structures to speed flipbooks More...

#include <vtkOSPRayCache.h>

Inheritance diagram for vtkOSPRayCache< T >:
[legend]

Public Member Functions

 vtkOSPRayCache ()
 
 ~vtkOSPRayCache ()
 
void Set (double tstep, std::shared_ptr< T > payload)
 Insert a new object into the cache.
 
std::shared_ptr< T > Get (double tstep)
 Obtain an object from the cache.
 
bool Contains (double tstep)
 Query whether cache contains tstep.
 
bool HasRoom ()
 Check if the cache has space left.
 
void SetSize (size_t sz)
 Set/Get the number of slots available in the cache.
 
size_t GetSize ()
 Set/Get the number of slots available in the cache.
 

Detailed Description

template<class T>
class vtkOSPRayCache< T >

temporal cache ospray structures to speed flipbooks

A temporal cache of templated objects that are created on the first playthrough and reused afterward to speed up animations. Cache is first come first serve. In other words the first 'Size' Set() calls will succeed, later calls will be silently ignored. Decreasing the size of the cache frees all previously held contents.

This class is internal.

Definition at line 28 of file vtkOSPRayCache.h.

Constructor & Destructor Documentation

◆ vtkOSPRayCache()

template<class T >
vtkOSPRayCache< T >::vtkOSPRayCache ( )
inline

Definition at line 31 of file vtkOSPRayCache.h.

◆ ~vtkOSPRayCache()

template<class T >
vtkOSPRayCache< T >::~vtkOSPRayCache ( )
inline

Definition at line 33 of file vtkOSPRayCache.h.

Member Function Documentation

◆ Set()

template<class T >
void vtkOSPRayCache< T >::Set ( double  tstep,
std::shared_ptr< T >  payload 
)
inline

Insert a new object into the cache.

Definition at line 38 of file vtkOSPRayCache.h.

◆ Get()

template<class T >
std::shared_ptr< T > vtkOSPRayCache< T >::Get ( double  tstep)
inline

Obtain an object from the cache.

Return nullptr if none present at tstep.

Definition at line 51 of file vtkOSPRayCache.h.

◆ SetSize()

template<class T >
void vtkOSPRayCache< T >::SetSize ( size_t  sz)
inline

Set/Get the number of slots available in the cache.

Default is 0.

Definition at line 66 of file vtkOSPRayCache.h.

◆ GetSize()

template<class T >
size_t vtkOSPRayCache< T >::GetSize ( )
inline

Set/Get the number of slots available in the cache.

Default is 0.

Definition at line 78 of file vtkOSPRayCache.h.

◆ Contains()

template<class T >
bool vtkOSPRayCache< T >::Contains ( double  tstep)
inline

Query whether cache contains tstep.

Definition at line 84 of file vtkOSPRayCache.h.

◆ HasRoom()

template<class T >
bool vtkOSPRayCache< T >::HasRoom ( )
inline

Check if the cache has space left.

Definition at line 89 of file vtkOSPRayCache.h.


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