Repository navigation
Dynamic spatial clipping for out-of-core point clouds during paging in VSG #1758
|
Summary I am trying to implement dynamic, spatially clipped rendering of an out-of-core point cloud in VSG. Part of the point cloud is resident in memory, while the remaining tiles are stored on disk and loaded on demand. For disk-backed tiles, clipping ideally needs to happen during loading, before the resulting node is inserted into the scene graph. Current approach in OSG In our OSG implementation, we can subclass ReadFileCallback at the application level; this allows us to obtain the osg::Node* loaded on the reader thread and clip it before it reaches the scene graph. Repositories:
Problem in VSG In VSG, PagedLOD and DatabasePager handle asynchronous loading through ReaderWriter, but I have not found an equivalent "ReadFileCallback" similar to the one in osg. Any suggestions would be appreciated. |
Replies: 1 comment 1 reply
|
Both the OSG and VSG's ReaderWriter mechanism support use of psuedo loaders that intercept file reads and can defer the implementation on to other loader then post processing the data. The vsgXchange::curl loader is an example of this - intercepting the http or http to decide to handle the file request then doing the libcurl calls to get the data, then passing it on to the appropriate loader for final reading. Just place your psuedo loader at the start of the vsg::Options::readerWriters list so it's called first. |
Both the OSG and VSG's ReaderWriter mechanism support use of psuedo loaders that intercept file reads and can defer the implementation on to other loader then post processing the data.
The vsgXchange::curl loader is an example of this - intercepting the http or http to decide to handle the file request then doing the libcurl calls to get the data, then passing it on to the appropriate loader for final reading.
Just place your psuedo loader at the start of the vsg::Options::readerWriters list so it's called first.