136 if (
getCCW(segment.first, this->getPosition(), segment.second))
138 this->getDirection().getPerpDot(segment.second - this->getPosition()) < 0.0);
141 this->getDirection().getPerpDot(segment.second - this->getPosition()) > 0.0);
156 if (fabs(gp) > precision)
251 out << static_cast<const JPosition2D&> (axis);
253 out << static_cast<const JDirection2D&>(axis);
284 out << static_cast<const JPosition2D&> (axis);
285 out << static_cast<const JDirection2D&>(axis);
JAxis2D & negate()
Negate axis.
JAxis2D(const JVector2D &pos)
Constructor.
friend JWriter & operator<<(JWriter &out, const JAxis2D &axis)
Write axis to output.
double getDistanceSquared(const JVector2D &point) const
Get squared of distance to point.
bool intersects(const JSegment2D &segment) const
Test whether this axis and given line segment intersect.
JAxis2D(const JVector2D &pos, const JVersor2D &dir)
Constructor.
JAxis2D(const JSegment2D &segment)
Constructor.
JAxis2D & rotate(const JRotation2D &R)
Rotate axis.
JAxis2D & rotate_back(const JRotation2D &R)
Rotate back axis.
void setAxis(const JAxis2D &axis)
Set axis.
double getDistance(const JVector2D &point) const
Get distance to point.
friend std::istream & operator>>(std::istream &in, JAxis2D &axis)
Read axis from input.
friend JReader & operator>>(JReader &in, JAxis2D &axis)
Read axis from input.
JAxis2D()
Default constructor.
void move(const double step)
Move vertex along this axis.
friend std::ostream & operator<<(std::ostream &out, const JAxis2D &axis)
Write axis to output.
const JAxis2D & getAxis() const
Get axis.
double getIntersection(const JAxis2D &axis, const double precision=1.0e-8) const
Get intersection of two axes.
Data structure for direction in two dimensions.
JDirection2D & rotate_back(const JRotation2D &R)
Rotate back.
double getPerpDot(const JVersor2D &versor) const
Get perpendicular dot product.
JDirection2D & rotate(const JRotation2D &R)
Rotate.
double getPerpDot(const JAngle2D &angle) const
Get perpendicular dot product.
const JDirection2D & getDirection() const
Get direction.
Data structure for position in two dimensions.
JPosition2D & rotate_back(const JRotation2D &R)
Rotate back.
JPosition2D & rotate(const JRotation2D &R)
Rotate.
const JPosition2D & getPosition() const
Get position.
Line segment in two dimensions.
Data structure for vector in two dimensions.
JVector2D & sub(const JVector2D &vector)
Subtract vector.
JVector2D()
Default constructor.
JVector2D & mul(const double factor)
Scale vector.
JVector2D & negate()
Negate vector.
double getLengthSquared() const
Get length squared.
double getDot(const JVector2D &point) const
Get dot product.
Data structure for normalised vector in two dimensions.
JVersor2D & negate()
Negate versor.
Interface for binary input.
Interface for binary output.
Auxiliary classes and methods for 2D geometrical objects and operations.
bool getCCW(const T &a, const T &b, const T &c)
Check sequence of three points in X-Y plane.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).