Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Line.hpp

    r6f646d r5589858  
    1212
    1313#include <memory>
     14#include <vector>
    1415
    1516class Vector;
     17class Plane;
    1618
    1719class Line : public Space
    1820{
    1921public:
    20   Line(Vector &_origin, Vector &_direction);
     22  Line(const Vector &_origin, const Vector &_direction);
     23  Line(const Line& _src);
    2124  virtual ~Line();
    2225
    23   virtual double distance(const Vector &point) const=0;
    24   virtual Vector getClosestPoint(const Vector &point) const=0;
     26  virtual double distance(const Vector &point) const;
     27  virtual Vector getClosestPoint(const Vector &point) const;
     28
     29  Vector getDirection() const;
     30  Vector getOrigin() const;
     31
     32  std::vector<Vector> getPointsOnLine() const;
     33
     34  Vector getIntersection(const Line& otherLine) const;
     35
     36  Vector rotateVector(const Vector &rhs, double alpha) const;
     37
     38  Plane getOrthogonalPlane(const Vector &origin) const;
    2539
    2640private:
     
    2943};
    3044
     45/**
     46 * Named constructor to make a line through two points
     47 */
     48Line makeLineThrough(const Vector &x1, const Vector &x2);
     49
    3150#endif /* LINE_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.