Package com.openinventor.inventor.caches
Class SoCpuBufferObjectCache
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.caches.SoCpuBufferObjectCache
-
public class SoCpuBufferObjectCache extends Inventor
CPUBufferObject cache management class. A base class used to manage a simple cache ofSoCpuBufferObject
objects.SoBufferObject
creates an instance of this class that is primarily used for the LDM tile cache (seeSoLDMGlobalResourceParameters
for more information). The buffer object cache can be accessed using theSoBufferObject
static method getBufferObjectCache. Default size is 50 or the value of OIV_BUFFER_OBJECT_CACHE_SIZE.This class was added in Open Inventor 8.5.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
Remove all unused buffers (ref count = 0) from the cache.long
getSize()
Return the max size of the cache (number of buffers).void
resize(long newSize)
Resize cache to the given size.-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
getSize
public long getSize()
Return the max size of the cache (number of buffers).
-
resize
public void resize(long newSize)
Resize cache to the given size.- Parameters:
newSize
- new size for the cache (number of buffers).
Default is 50 or the value specified for OIV_BUFFER_OBJECT_CACHE_SIZE.
-
flush
public void flush()
Remove all unused buffers (ref count = 0) from the cache.
-
-