24 #ifndef __GEOMETRY_LINE_SEGMENT_H_
25 #define __GEOMETRY_LINE_SEGMENT_H_
27 #include <geometry/transformable.h>
28 #include <geometry/printable.h>
29 #include <geometry/hom_point.h>
30 #include <geometry/hom_vector.h>
55 virtual std::ostream&
print(std::ostream& stream)
const;
const HomPoint & p1() const
Get the starting point.
LineSegment(const HomPoint &a, const HomPoint &b)
Constructor.
float length() const
Get the length of the line segment.
const HomPoint & p2() const
Get the endpoint.
virtual void post_transform()
This method is called after the primitives are transformed.
virtual void register_primitives()
Here, a derived class should register its primitives (HomPoints and HomVectors) by calling add_primit...
virtual ~LineSegment()
Destructor.
virtual std::ostream & print(std::ostream &stream) const
This method is called by the overloaded <<-operator.
HomPoint project(const HomPoint &p) const
Project a point on this LineSegment.
Interface class for printable objects.