18 namespace JGEOMETRY2D {}
 
   19 namespace JPP { 
using namespace JGEOMETRY2D; }
 
   21 namespace JGEOMETRY2D {
 
  136       if (
getCCW(segment.first, this->getPosition(), segment.second)) 
 
  156       if (fabs(gp) > precision)
 
  175       const double u = D.
getDot(U);
 
  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);
 
const JPosition2D & getPosition() const 
Get position. 
 
Data structure for vector in two dimensions. 
 
bool intersects(const JSegment2D &segment) const 
Test whether this axis and given line segment intersect. 
 
const JAxis2D & getAxis() const 
Get axis. 
 
Line segment in two dimensions. 
 
double getLengthSquared() const 
Get length squared. 
 
Interface for binary output. 
 
double getIntersection(const JAxis2D &axis, const double precision=1.0e-8) const 
Get intersection of two axes. 
 
double getDot(const JVector2D &point) const 
Get dot product. 
 
JVector2D & mul(const double factor)
Scale vector. 
 
JAxis2D & rotate_back(const JRotation2D &R)
Rotate back axis. 
 
JVector2D()
Default constructor. 
 
JAxis2D & rotate(const JRotation2D &R)
Rotate axis. 
 
double getPerpDot(const JAngle2D &angle) const 
Get perpendicular dot product. 
 
JDirection2D & rotate_back(const JRotation2D &R)
Rotate back. 
 
Data structure for direction in two dimensions. 
 
JVersor2D & negate()
Negate versor. 
 
bool getCCW(const T &a, const T &b, const T &c)
Check sequence of three points in X-Y plane. 
 
JVector2D & sub(const JVector2D &vector)
Subtract vector. 
 
double getDistance(const JVector2D &point) const 
Get distance to point. 
 
Data structure for normalised vector in two dimensions. 
 
JVector2D & negate()
Negate vector. 
 
friend JWriter & operator<<(JWriter &out, const JAxis2D &axis)
Write axis to output. 
 
JDirection2D & rotate(const JRotation2D &R)
Rotate. 
 
JAxis2D()
Default constructor. 
 
JAxis2D & negate()
Negate axis. 
 
JPosition2D & rotate(const JRotation2D &R)
Rotate. 
 
void setAxis(const JAxis2D &axis)
Set axis. 
 
Interface for binary input. 
 
friend JReader & operator>>(JReader &in, JAxis2D &axis)
Read axis from input. 
 
double getDistanceSquared(const JVector2D &point) const 
Get squared of distance to point. 
 
Data structure for position in two dimensions. 
 
const JDirection2D & getDirection() const 
Get direction. 
 
JAxis2D(const JVector2D &pos)
Constructor. 
 
JAxis2D(const JVector2D &pos, const JVersor2D &dir)
Constructor. 
 
friend std::istream & operator>>(std::istream &in, JAxis2D &axis)
Read axis from input. 
 
JPosition2D & rotate_back(const JRotation2D &R)
Rotate back. 
 
JAxis2D(const JSegment2D &segment)
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.