From 004875e387c651e7c5231a53eca4e1270e537d2c Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 9 Mar 2008 14:47:32 +0000 Subject: [PATCH] fix bbox bottleneck --- Post/PViewDataGModel.cpp | 3 ++- Post/PViewDataGModel.h | 3 ++- Post/PViewDataGModelIO.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp index 3498baa50a..6afa0ebb21 100644 --- a/Post/PViewDataGModel.cpp +++ b/Post/PViewDataGModel.cpp @@ -1,4 +1,4 @@ -// $Id: PViewDataGModel.cpp,v 1.22 2008-03-08 22:03:13 geuzaine Exp $ +// $Id: PViewDataGModel.cpp,v 1.23 2008-03-09 14:47:32 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -36,6 +36,7 @@ PViewDataGModel::PViewDataGModel(GModel *model) _entities.push_back(*it); for(GModel::riter it = _model->firstRegion(); it != _model->lastRegion(); ++it) _entities.push_back(*it); + _bbox = _model->bounds(); } PViewDataGModel::~PViewDataGModel() diff --git a/Post/PViewDataGModel.h b/Post/PViewDataGModel.h index 6323105877..2f64cb5e0b 100644 --- a/Post/PViewDataGModel.h +++ b/Post/PViewDataGModel.h @@ -45,6 +45,7 @@ class PViewDataGModel : public PViewData { std::vector<stepData<double>*> _nodeData, _elementData; PViewDataList *_cloneToList(); // create old-style data from this double _min, _max; + SBoundingBox3d _bbox; public: PViewDataGModel(GModel *model); ~PViewDataGModel(); @@ -53,7 +54,7 @@ class PViewDataGModel : public PViewData { double getTime(int step); double getMin(int step=-1); double getMax(int step=-1); - SBoundingBox3d getBoundingBox(){ return _model->bounds(); } + SBoundingBox3d getBoundingBox(){ return _bbox; } int getNumEntities(); int getNumElements(int ent=-1); int getDimension(int ent, int ele); diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp index 72a66a098e..01f0192a54 100644 --- a/Post/PViewDataGModelIO.cpp +++ b/Post/PViewDataGModelIO.cpp @@ -1,4 +1,4 @@ -// $Id: PViewDataGModelIO.cpp,v 1.3 2008-03-08 22:03:13 geuzaine Exp $ +// $Id: PViewDataGModelIO.cpp,v 1.4 2008-03-09 14:47:32 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -40,7 +40,7 @@ bool PViewDataGModel::readMSH(FILE *fp, bool binary, bool swap, int timeStep, do _nodeData[timeStep]->time = time; _nodeData[timeStep]->values.resize(numNodes); - if(binary){ + if(0 &&binary){ Msg(GERROR, "not ready yet for binary"); return 0; } -- GitLab