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

fix bbox bottleneck

parent 25e75a6d
No related branches found
No related tags found
No related merge requests found
// $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 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -36,6 +36,7 @@ PViewDataGModel::PViewDataGModel(GModel *model) ...@@ -36,6 +36,7 @@ PViewDataGModel::PViewDataGModel(GModel *model)
_entities.push_back(*it); _entities.push_back(*it);
for(GModel::riter it = _model->firstRegion(); it != _model->lastRegion(); ++it) for(GModel::riter it = _model->firstRegion(); it != _model->lastRegion(); ++it)
_entities.push_back(*it); _entities.push_back(*it);
_bbox = _model->bounds();
} }
PViewDataGModel::~PViewDataGModel() PViewDataGModel::~PViewDataGModel()
......
...@@ -45,6 +45,7 @@ class PViewDataGModel : public PViewData { ...@@ -45,6 +45,7 @@ class PViewDataGModel : public PViewData {
std::vector<stepData<double>*> _nodeData, _elementData; std::vector<stepData<double>*> _nodeData, _elementData;
PViewDataList *_cloneToList(); // create old-style data from this PViewDataList *_cloneToList(); // create old-style data from this
double _min, _max; double _min, _max;
SBoundingBox3d _bbox;
public: public:
PViewDataGModel(GModel *model); PViewDataGModel(GModel *model);
~PViewDataGModel(); ~PViewDataGModel();
...@@ -53,7 +54,7 @@ class PViewDataGModel : public PViewData { ...@@ -53,7 +54,7 @@ class PViewDataGModel : public PViewData {
double getTime(int step); double getTime(int step);
double getMin(int step=-1); double getMin(int step=-1);
double getMax(int step=-1); double getMax(int step=-1);
SBoundingBox3d getBoundingBox(){ return _model->bounds(); } SBoundingBox3d getBoundingBox(){ return _bbox; }
int getNumEntities(); int getNumEntities();
int getNumElements(int ent=-1); int getNumElements(int ent=-1);
int getDimension(int ent, int ele); int getDimension(int ent, int ele);
......
// $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 // 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 ...@@ -40,7 +40,7 @@ bool PViewDataGModel::readMSH(FILE *fp, bool binary, bool swap, int timeStep, do
_nodeData[timeStep]->time = time; _nodeData[timeStep]->time = time;
_nodeData[timeStep]->values.resize(numNodes); _nodeData[timeStep]->values.resize(numNodes);
if(binary){ if(0 &&binary){
Msg(GERROR, "not ready yet for binary"); Msg(GERROR, "not ready yet for binary");
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment