VTK  9.1.0
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. More...
 
std::shared_ptr< T > Get (double tstep)
 Obtain an object from the cache. More...
 
bool Contains (double tstep)
 Query whether cache contains tstep. More...
 
bool HasRoom ()
 Check if the cache has space left. More...
 
void SetSize (size_t sz)
 Set/Get the number of slots available in the cache. More...
 
size_t GetSize ()
 Set/Get the number of slots available in the cache. More...
 

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 39 of file vtkOSPRayCache.h.

Constructor & Destructor Documentation

◆ vtkOSPRayCache()

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

Definition at line 42 of file vtkOSPRayCache.h.

◆ ~vtkOSPRayCache()

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

Definition at line 44 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 49 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 62 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 77 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 89 of file vtkOSPRayCache.h.

◆ Contains()

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

Query whether cache contains tstep.

Definition at line 95 of file vtkOSPRayCache.h.

◆ HasRoom()

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

Check if the cache has space left.

Definition at line 100 of file vtkOSPRayCache.h.


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