Go to the documentation of this file.
220 const double precision = std::numeric_limits<double>::min())
const
222 return (fabs(
getX() - vector.
getX()) <= precision &&
223 fabs(
getY() - vector.
getY()) <= precision &&
224 fabs(
getZ() - vector.
getZ()) <= precision);
258 return JVector3D(pos).sub(*this).getLengthSquared();
JVector3D()
Default constructor.
double getLengthSquared() const
Get length squared.
double getZ() const
Get z position.
double getDistance(const JVector3D &pos) const
Get distance to point.
JTOOLS::JRange< double > JRangeZ
Type definition of range along z-axis.
JVector3D & mul(const double factor)
Scale vector.
Auxiliary base class for aritmetic operations of derived class types.
JVector3D & cross(const JVector3D &first, const JVector3D &second)
Get cross product.
JVector3D & negate()
Negate vector.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Data structure for vector in three dimensions.
JTOOLS::JRange< double > JRangeX
Type definition of range along x-axis.
JVector3D(const double x, const double y, const double z)
Constructor.
JVector3D(const JVector2D &vector, const double z)
Constructor.
JTOOLS::JRange< double > JRangeY
Type definition of range along y-axis.
void transform(double &__x, double &__y, double &__z) const
Transform.
double getDistanceSquared(const JVector3D &pos) const
Get squared of distance to point.
double getY() const
Get y position.
double getDot(const JVector3D &vector) const
Get dot product.
Auxiliary classes and methods for 3D geometrical objects and operations.
bool equals(const JVector3D &vector, const double precision=std::numeric_limits< double >::min()) const
Check equality.
JVector3D & add(const JVector3D &vector)
Add vector.
double getX() const
Get x position.
JVector3D & div(const double factor)
Scale vector.
JVector3D & transform(const JMatrix3D &T)
Transform.
JVector3D & sub(const JVector3D &vector)
Subtract vector.
double getLength() const
Get length.
Data structure for vector in two dimensions.