From 76c0f4f484c083a0853fa612d09496a48c0ad9ee Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 12 Nov 2008 17:14:20 +0000 Subject: [PATCH] fix octree on adaptive views --- Post/OctreePost.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Post/OctreePost.cpp b/Post/OctreePost.cpp index f0280221ba..0c19f20cd7 100644 --- a/Post/OctreePost.cpp +++ b/Post/OctreePost.cpp @@ -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(), -- GitLab