14 #include "generalmod.h" 35 : x1pos_(0) { *
this = fpd; }
37 FlatPosData& operator =(
const FlatPosData&);
38 FlatPosData*
clone() {
return new FlatPosData(*
this); }
40 void setRange(
bool forx1,
43 {
return forx1 ? x1rg_ : x2rg_; }
44 void setX1Pos(
float*,
int sz,
double offs);
49 inline int nrPts(
bool forx1 )
const 50 {
return range(forx1).nrSteps() + 1; }
52 {
return (
float )( range(forx1).width() ); }
53 IndexInfo indexInfo(
bool forx1,
double pos)
const;
55 double position(
bool forx1,
int)
const;
59 float* getPositions(
bool forx1)
const;
62 inline double offset(
bool forx1 )
const 63 {
return forx1 ? x1offs_ : 0; }
67 {
return x1pos_ && nrPts(
true) > 2; }
69 { setRange(
true, range(
true) ); }
80 {
return forx1 ? x1rg_ : x2rg_; }
double offset(bool forx1) const
For use with getPositions.
Definition: flatposdata.h:62
#define mExpClass(module)
Definition: commondefs.h:160
float * x1pos_
Definition: flatposdata.h:76
Positioning of flat 'bulk' data. Only the 'x1' axis can be irregular.
Definition: flatposdata.h:26
FlatPosData(const FlatPosData &fpd)
Definition: flatposdata.h:34
int nrPts(bool forx1) const
Definition: flatposdata.h:49
~FlatPosData()
Definition: flatposdata.h:36
float width(bool forx1) const
Definition: flatposdata.h:51
Info on (floating-point) position in an array or StepInterval.
Definition: indexinfo.h:23
double x1offs_
Definition: flatposdata.h:77
const StepInterval< double > & range(bool forx1) const
Definition: flatposdata.h:42
StepInterval< double > x2rg_
Definition: flatposdata.h:74
void setRegular()
Definition: flatposdata.h:68
StepInterval< double > x1rg_
Definition: flatposdata.h:73
FlatPosData()
Definition: flatposdata.h:29
bool isIrregular() const
Definition: flatposdata.h:66
StepInterval< double > & rg(bool forx1)
Definition: flatposdata.h:79
FlatPosData * clone()
Definition: flatposdata.h:38