ICAROUS
|
#include <Point.h>
Public Member Functions | |
Point (double x, double y, double z) | |
Point | mkX (double X) const |
Point | mkY (double Y) const |
Point | mkZ (double Z) const |
Point | Hat () const |
Point | Neg () const |
Point | Add (const Point &v) const |
Point | Sub (const Point &v) const |
Point | Scal (double k) const |
Point | linear (const Velocity &v, double t) const |
std::string | toString () const |
std::string | toString (int prec, const std::string &xUnits, const std::string &yUnits, const std::string &zUnits) const |
std::string | toStringUnits (const std::string &xUnits, const std::string &yUnits, const std::string &zUnits) const |
std::vector< std::string > | toStringList () const |
std::string | toStringNP () const |
std::string | toStringNP (int precision) const |
std::string | toStringNP (int precision, const std::string &xUnits, const std::string &yUnits, const std::string &zUnits) const |
![]() | |
Vect3 (const double xx=0, const double yy=0, const double zz=0) | |
Vect3 (const Vect2 &v, const double vz) | |
virtual | ~Vect3 () |
Vect3 | mkX (double nx) |
Vect3 | mkY (double ny) |
Vect3 | mkZ (double nz) |
bool | isZero () const |
bool | almostEquals (const Vect3 &v) const |
bool | almostEquals2D (const Vect3 &v, double horizEps) const |
bool | almostEquals (const Vect3 &v, INT64FM maxUlps) const |
bool | within_epsilon (const Vect3 &v2, double epsilon) const |
Vect3 | operator+ (const Vect3 &v) const |
Vect3 | operator- (const Vect3 &v) const |
Vect3 | operator- () const |
Vect3 | operator* (const double k) const |
double | operator* (const Vect3 &v) const |
bool | operator== (const Vect3 &v) const |
bool | operator!= (const Vect3 &v) const |
Vect3 | ScalAdd (const double k, const Vect3 &v) const |
Vect3 | AddScal (double k, const Vect3 &v) const |
Vect3 | PerpR () const |
Vect3 | PerpL () const |
Vect3 | linear (const Vect3 &v, double t) const |
Vect3 | linearByDist2D (double track, double d) const |
Vect2 | vect2 () const |
Vect3 | Hat () const |
Vect3 | cross (const Vect3 &v) const |
bool | parallel (const Vect3 &v) const |
Vect3 | Add (const Vect3 &v) const |
Vect3 | Sub (const Vect3 &v) const |
Vect3 | Neg () const |
Vect3 | Scal (double k) const |
double | dot (const double x, const double y, const double z) const |
double | dot (const Vect3 &v) const |
double | sqv () const |
double | norm () const |
double | det2D (const Vect3 &v) const |
double | dot2D (const Vect3 &v) const |
double | sqv2D () const |
double | norm2D () const |
Vect3 | Hat2D () const |
double | cyl_norm (const double d, const double h) const |
double | distanceH (const Vect3 &w) const |
double | distanceV (const Vect3 &w) const |
std::string | toString () const |
std::string | toString (int precision) const |
std::string | toStringNP (const std::string &xunit, const std::string &yunit, const std::string &zunit) const |
std::string | toStringNP (const std::string &xunit, const std::string &yunit, const std::string &zunit, int precision) const |
std::string | formatXYZ (const std::string &pre, const std::string &mid, const std::string &post) const |
std::string | formatXYZ (int prec, const std::string &pre, const std::string &mid, const std::string &post) const |
std::string | toPVS () const |
std::string | toPVS (int precision) const |
bool | isInvalid () const |
Static Public Member Functions | |
static const Point & | ZEROP () |
static const Point & | INVALIDP () |
static Point | mk (const Vect3 &v) |
static Point | mk (const Vect2 &v, double alt=0.0) |
static Point | mk (double x, double y, double z) |
static Point | make (double x, double y, double z) |
static Point | make (double x, const std::string &unitsX, double y, const std::string &unitsY, double z, const std::string &unitsZ) |
static Point | parse (const std::string &str) |
![]() | |
static Vect3 | mk (double x, double y, double z) |
static Vect3 | makeXYZ (double x, std::string ux, double y, std::string uy, double z, std::string uz) |
static Vect3 | mkXYZ (double x, double y, double z) |
static Vect3 | make (double x, double y, double z) |
static Vect3 | make (double x, const std::string &xunits, double y, const std::string &yunits, double z, const std::string &zunits) |
static double | tcpa (const Vect3 &so, const Vect3 &vo, const Vect3 &si, const Vect3 &vi) |
static const Vect3 & | ZERO () |
static const Vect3 & | INVALID () |
static Vect3 | parse (const std::string &s) |
Additional Inherited Members | |
![]() | |
double | x |
double | y |
double | z |
This class represents a point or a 3-dimensional vector. This class contains methods to make the printing of Vect3's be more appropriate for a position (units of length), instead of the abstract Vect3 which has no natural units.
Point::Point | ( | double | x, |
double | y, | ||
double | z | ||
) |
Instantiates a new point in internal units.
x | the x |
y | the y |
z | the z |
|
static |
An invalid point, used for error reporting
Calculates position after t time units in direction and magnitude of velocity v
v | velocity |
t | time |
|
static |
New point from Euclidean coordinates in the given units.
x | the x-point |
unitsX | the units for x |
y | the y-point |
unitsY | the units for y |
z | the z-point |
unitsZ | the units for z |
|
static |
New point from Euclidean coordinates in conventional units.
x | the x-point [NM] |
y | the y-point [NM] |
z | the z-point [ft] |
New point from Vect2 (setting the altitude to 0.0).
v | the 2-D point vector (in internal units). |
alt | the altitude in internal units |
|
static |
New point from Euclidean coordinates in internal units.
x | the x-point [internal] |
y | the y-point [internal] |
z | the z-point [internal] |
Point Point::mkX | ( | double | X | ) | const |
New point from existing point, changing only the X
X | new X [internal units] |
Point Point::mkY | ( | double | Y | ) | const |
New point from existing point, changing only the Y
Y | new Y [internal units] |
Point Point::mkZ | ( | double | Z | ) | const |
New point from existing point, changing only the Z
Z | new Z [internal units] |
|
static |
This parses a space or comma-separated string as a Point (an inverse to the toString method). If three bare values are present, then it is interpreted as the default units for a point: [NM,NM,ft]. If there are 3 value/unit pairs then each values is interpreted with regard to the appropriate unit. If the string cannot be parsed, an INVALID value is returned.
str | string to parse |
std::string Point::toString | ( | ) | const |
String representation of the point in [NM, NM, ft]
std::string Point::toString | ( | int | prec, |
const std::string & | xUnits, | ||
const std::string & | yUnits, | ||
const std::string & | zUnits | ||
) | const |
String representation of the point in the given units
prec | precision (0-15) |
xUnits | units for the x value |
yUnits | units for the y value |
zUnits | units for the z value |
|
virtual |
Return an array of string representing each value of the point in the units [NM,NM,ft]
Implements larcfm::OutputList.
std::string Point::toStringNP | ( | ) | const |
String representation, 4 decimal places, without parentheses
std::string Point::toStringNP | ( | int | precision | ) | const |
String representation, with user-specified precision
precision | precision (0-15) |
std::string Point::toStringNP | ( | int | precision, |
const std::string & | xUnits, | ||
const std::string & | yUnits, | ||
const std::string & | zUnits | ||
) | const |
String representation, with user-specified precision
precision | precision (0-15) |
xUnits | units for the x value |
yUnits | units for the y value |
zUnits | units for the z value |
std::string Point::toStringUnits | ( | const std::string & | xUnits, |
const std::string & | yUnits, | ||
const std::string & | zUnits | ||
) | const |
String representation with the given units
xUnits | units for the x value |
yUnits | units for the y value |
zUnits | units for the z value |
|
static |
Return a zero point vector