Skip to content
Snippets Groups Projects
Commit 76c0f4f4 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix octree on adaptive views

parent 25fa0af7
No related branches found
No related tags found
No related merge requests found
......@@ -222,12 +222,13 @@ OctreePost::OctreePost(PView *v)
{
_theViewDataGModel = dynamic_cast<PViewDataGModel*>(_theView->getData());
if(_theViewDataGModel) return; // the octree is available in the model
if(_theViewDataGModel) return; // the octree is already available in the model
_theViewDataList = dynamic_cast<PViewDataList*>(_theView->getData());
// use adaptive data if available
_theViewDataList = dynamic_cast<PViewDataList*>(_theView->getData(true));
if(_theViewDataList){
SBoundingBox3d bb = v->getData()->getBoundingBox();
SBoundingBox3d bb = _theViewDataList->getBoundingBox();
double min[3] = {bb.min().x(), bb.min().y(), bb.min().z()};
double size[3] = {bb.max().x() - bb.min().x(),
bb.max().y() - bb.min().y(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment