Brief description of class still missing. More...
#include <PointND.h>
Public Member Functions | |
void | average (const PointND &) |
int | count () const |
bool | fromString (const StringSection &str) |
void | interpole (double valX, const PointND &p1, const PointND &p2) |
bool | isValid () const |
bool | operator< (const PointND &p) const |
void | operator= (const PointND &p) |
bool | operator== (const PointND &p) const |
PointND () | |
PointND (double x, const QVector< double > &y) | |
PointND (const PointND &o) | |
PointND (const QVector< double > &p) | |
void | setValid (bool) |
void | setX (double x) |
void | setY (double y, const CurvePointOptions *options) |
void | setY (int index, double y) |
QString | toString (int precision=6, char format='g') const |
double | x () const |
double | y (const CurvePointOptions *options) const |
double | y (int index) const |
Brief description of class still missing.
Full description of class still missing
QGpCoreTools::PointND::PointND | ( | ) | [inline] |
{_x=0.0;}
QGpCoreTools::PointND::PointND | ( | double | x, |
const QVector< double > & | y | ||
) | [inline] |
QGpCoreTools::PointND::PointND | ( | const PointND & | o | ) | [inline] |
{_x=o._x; _y=o._y;}
QGpCoreTools::PointND::PointND | ( | const QVector< double > & | p | ) |
Copy constructor from a vector
{ ASSERT(p.count()>1); _x=p.at(0); _y=p; _y.remove(0); }
void QGpCoreTools::PointND::average | ( | const PointND & | p | ) | [inline] |
int QGpCoreTools::PointND::count | ( | ) | const [inline] |
Referenced by average(), interpole(), and toString().
{return _y.count();}
bool QGpCoreTools::PointND::fromString | ( | const StringSection & | str | ) |
References QGpCoreTools::StringSection::isValid(), QGpCoreTools::StringSection::nextField(), setY(), QGpCoreTools::StringSection::toDouble(), and TRACE.
Referenced by CurveReader::parse().
void QGpCoreTools::PointND::interpole | ( | double | valX, |
const PointND & | p1, | ||
const PointND & | p2 | ||
) | [inline] |
bool QGpCoreTools::PointND::isValid | ( | ) | const [inline] |
{return true;}
bool QGpCoreTools::PointND::operator< | ( | const PointND & | p | ) | const [inline] |
{return _x<p._x;}
void QGpCoreTools::PointND::operator= | ( | const PointND & | p | ) | [inline] |
{ _x=p._x; _y=p._y; }
bool QGpCoreTools::PointND::operator== | ( | const PointND & | p | ) | const [inline] |
{ if(_x!=p._x) return false; int n=_y.count(); if(n!=p._y.count()) return false; for(int i=0; i< n; i++) { if(_y.at(i)!=p._y.at(i)) return false; } return true; }
void QGpCoreTools::PointND::setValid | ( | bool | ) | [inline] |
{}
void QGpCoreTools::PointND::setX | ( | double | x | ) | [inline] |
Referenced by interpole().
{_x=x;}
void QGpCoreTools::PointND::setY | ( | double | y, |
const CurvePointOptions * | options | ||
) |
References QGpCoreTools::PointNDOptions::fromDouble().
Referenced by average(), QGpCoreTools::PointNDOptions::fromDouble(), fromString(), and interpole().
{ const PointNDOptions * po=static_cast<const PointNDOptions *>(options); po->fromDouble(*this, y); }
void QGpCoreTools::PointND::setY | ( | int | index, |
double | y | ||
) | [inline] |
QString QGpCoreTools::PointND::toString | ( | int | precision = 6 , |
char | format = 'g' |
||
) | const |
Returns the point as a string with space separation between coordinates. precision is the number of significant digits. format is 'g' or 'f'.
double QGpCoreTools::PointND::x | ( | ) | const [inline] |
Referenced by interpole().
{return _x;}
double QGpCoreTools::PointND::y | ( | const CurvePointOptions * | options | ) | const |
References QGpCoreTools::PointNDOptions::toDouble().
Referenced by average(), interpole(), setY(), QGpCoreTools::PointNDOptions::toDouble(), and toString().
{ const PointNDOptions * po=static_cast<const PointNDOptions *>(options); return po->toDouble(*this); }
double QGpCoreTools::PointND::y | ( | int | index | ) | const [inline] |