Brief description of class still missing. More...
#include <SourceParameters.h>
Public Types | |
| enum | Type { PlaneWaves, CircularWaves } |
Public Member Functions | |
| double | amplitude () const |
| double | azimuth () const |
| double | azimuthMath () const |
| const QColor & | color () const |
| double | distance () const |
| const QString & | name () const |
| double | phase () const |
| void | setAmplitude (double a) |
| void | setAzimuth (double a) |
| void | setColor (const QColor &c) |
| void | setDistance (double d) |
| void | setName (const QString &n) |
| void | setPhase (double p) |
| void | setSourcePoint (const Point &s) |
| void | setSourceX (double x) |
| void | setSourceY (double y) |
| void | setType (Type t) |
| void | setVelocity (double v) |
| SourceParameters () | |
| const Point2D & | sourcePoint () const |
| Type | type () const |
| double | velocity () const |
| ~SourceParameters () | |
Brief description of class still missing.
Full description of class still missing
References PlaneWaves, and QGpCoreTools::tr().
{
_type=PlaneWaves;
_name=tr("unnamed");
_sourcePoint=Point(-1000.0, 0.0, 0.0);
_azimuth=0.0;
_amplitude=1.0;
_phase=0.0;
_velocity=300.0;
_color=Qt::black;
}
| SourceParameters::~SourceParameters | ( | ) | [inline] |
{}
| double SourceParameters::amplitude | ( | ) | const [inline] |
Referenced by SourceItemModel::data(), and FKArrayMap::setSourceSignals().
{return _amplitude;}
| double SourceParameters::azimuth | ( | ) | const |
References QGpCoreTools::Point2D::azimuthTo(), and PlaneWaves.
Referenced by SourceItemModel::data().
{
double a;
if(_type==PlaneWaves) {
a=_azimuth;
} else {
a=_sourcePoint.azimuthTo(Point());
}
return Angle::mathToGeographic(a);
}
| double SourceParameters::azimuthMath | ( | ) | const |
References QGpCoreTools::Point2D::azimuthTo(), and PlaneWaves.
Referenced by Simulator::displaySource(), and FKArrayMap::setSourceSignals().
{
if(_type==PlaneWaves) {
return _azimuth;
} else {
return _sourcePoint.azimuthTo(Point());
}
}
| const QColor& SourceParameters::color | ( | ) | const [inline] |
Referenced by SourceItemModel::data(), and Simulator::displaySource().
{return _color;}
| double SourceParameters::distance | ( | ) | const |
References QGpCoreTools::Point2D::distanceTo().
Referenced by SourceItemModel::data().
{
return _sourcePoint.distanceTo(Point());
}
| const QString& SourceParameters::name | ( | ) | const [inline] |
Referenced by SourceItemModel::data().
{return _name;}
| double SourceParameters::phase | ( | ) | const [inline] |
Referenced by SourceItemModel::data(), and FKArrayMap::setSourceSignals().
{return _phase;}
| void SourceParameters::setAmplitude | ( | double | a | ) | [inline] |
Referenced by SourceItemModel::setData().
{_amplitude=a;}
| void SourceParameters::setAzimuth | ( | double | a | ) |
References QGpCoreTools::cos(), QGpCoreTools::Point2D::distanceTo(), PlaneWaves, QGpCoreTools::Point2D::setX(), QGpCoreTools::Point2D::setY(), and QGpCoreTools::sin().
Referenced by SourceItemModel::setData().
{
a=Angle::geographicToMath(a);
if(_type==PlaneWaves) {
_azimuth=a;
} else {
double d=_sourcePoint.distanceTo(Point());
_sourcePoint.setX(-d*cos(a));
_sourcePoint.setY(-d*sin(a));
}
}
| void SourceParameters::setColor | ( | const QColor & | c | ) | [inline] |
Referenced by SourceItemModel::setData().
{_color=c;}
| void SourceParameters::setDistance | ( | double | d | ) |
References QGpCoreTools::Point2D::azimuthTo(), QGpCoreTools::cos(), QGpCoreTools::Point2D::setX(), QGpCoreTools::Point2D::setY(), and QGpCoreTools::sin().
Referenced by SourceItemModel::setData().
| void SourceParameters::setName | ( | const QString & | n | ) | [inline] |
Referenced by SourceItemModel::addSource(), and SourceItemModel::setData().
{_name=n;}
| void SourceParameters::setPhase | ( | double | p | ) | [inline] |
Referenced by SourceItemModel::setData().
{_phase=p;}
| void SourceParameters::setSourcePoint | ( | const Point & | s | ) | [inline] |
{_sourcePoint=s;}
| void SourceParameters::setSourceX | ( | double | x | ) | [inline] |
References QGpCoreTools::Point2D::setX().
Referenced by SourceItemModel::setData().
{_sourcePoint.setX(x);}
| void SourceParameters::setSourceY | ( | double | y | ) | [inline] |
References QGpCoreTools::Point2D::setY().
Referenced by SourceItemModel::setData().
{_sourcePoint.setY(y);}
| void SourceParameters::setType | ( | Type | t | ) | [inline] |
{_type=t;}
| void SourceParameters::setVelocity | ( | double | v | ) | [inline] |
Referenced by SourceItemModel::setData().
{_velocity=v;}
| const Point2D& SourceParameters::sourcePoint | ( | ) | const [inline] |
Referenced by SourceItemModel::data(), and FKArrayMap::setSourceSignals().
{return _sourcePoint;}
| Type SourceParameters::type | ( | ) | const [inline] |
Referenced by FKArrayMap::setSourceSignals().
{return _type;}
| double SourceParameters::velocity | ( | ) | const [inline] |
Referenced by SourceItemModel::data(), Simulator::displaySource(), and FKArrayMap::setSourceSignals().
{return _velocity;}