Frame Cache
The component caches decoded frame data in memory for smooth playback. Configure the cache with:
// Limit cache to 512 MB
model->setCacheMemoryLimit(512 * 1024 * 1024);
// Query the configured limit
size_t limit = model->cacheMemoryLimit();
// Pre-load the next 10 frames for smooth animation
model->preloadFrames(model->currentFrameIndex() + 1, 10);
// Query current cache usage
size_t usedBytes = model->cacheCurrentMemoryBytes();
The same cache API is available at the reader level via
ParticleDatasetReader::setCacheMemoryLimit() and
ParticleDatasetReader::preloadFrames().
To explicitly discard all cached frames (e.g. when switching scalar fields at the reader level):
reader.clearCache();