1
// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
3
// See the LICENSE.txt file for license information. Please report all
4
// bugs and problems to <gmsh@geuz.org>.
6
#ifndef _PVIEW_DATA_REMOTE_H_
7
#define _PVIEW_DATA_REMOTE_H_
11
#include "PViewData.h"
12
#include "SBoundingBox3d.h"
14
// The container for a remote dataset (does not contain any actual
16
class PViewDataRemote : public PViewData {
20
std::vector<double> _timeStepMin, _timeStepMax;
22
std::vector<double> _time;
24
PViewDataRemote(double min, double max, double time, SBoundingBox3d bbox)
25
: _numTimeSteps(1), _min(min), _max(max), _bbox(bbox)
27
_time.push_back(time);
30
bool finalize(){ return false;}
31
int getNumTimeSteps(){ return _numTimeSteps; }
32
double getMin(int step=-1){ return _min; }
33
double getMax(int step=-1){ return _max; }
34
SBoundingBox3d getBoundingBox(int step=-1){ return _bbox; }
35
double getTime(int step)
37
if(step >= 0 && step < (int)_time.size()) return _time[step];
40
int getNumElements(int step=-1, int ent=-1)
42
// hack so that it does not retrn 0
46
void setMin(double min){ _min = min; }
47
void setMax(double max){ _min = max; }
48
void setBoundingBox(SBoundingBox3d bbox){ _bbox = bbox; }
49
void setTime(int step, double time)
51
if(step >= (int)_time.size()) _time.resize(step + 1);