59 template <
typename T,
int D>
88 template<
typename Reflector>
91 r.property(
"P0",
first,
"The first point");
92 r.property(
"P1",
second,
"The second point");
116 namespace boost {
namespace geometry {
namespace traits {
120 template <
typename T,
int D>
121 struct tag<
mira::Line<T,D> > {
122 typedef segment_tag
type;
125 template <
typename T,
int D>
126 struct point_type<
mira::Line<T,D> > {
130 template <
typename T,
int D, std::
size_t Dimension>
131 struct indexed_access<
mira::Line<T,D>, 0, Dimension>
136 static inline coordinate_type
get(segment_type
const& s) {
137 return geometry::get<Dimension>(s.first);
140 static inline void set(segment_type& s, coordinate_type
const& value) {
141 geometry::set<Dimension>(s.first, value);
145 template <
typename T,
int D, std::
size_t Dimension>
146 struct indexed_access<
mira::Line<T,D>, 1, Dimension>
151 static inline coordinate_type
get(segment_type
const& s) {
152 return geometry::get<Dimension>(s.second);
155 static inline void set(segment_type& s, coordinate_type
const& value) {
156 geometry::set<Dimension>(s.second, value);
Represents a line segment that is spanned by two given points.
Definition: Line.h:60
Line< float, 2 > Line2f
A 2D 32 bit floating precision line.
Definition: Line.h:106
Definition: SyncTimedRead.h:62
General point class template.
Definition: Point.h:133
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Line< float, 3 > Line3f
A 3D 32 bit floating precision line.
Definition: Line.h:107
PointType & front()
Returns a reference to the first point of the line segment.
Definition: Line.h:78
Line< int, 2 > Line2i
A 2D integer line.
Definition: Line.h:104
Class for 2D, 3D and N-dimensional points.
Line(const PointType &p1, const PointType &p2)
Creates a line segment that is spanned by two given points.
Definition: Line.h:70
PointType second
Definition: Line.h:97
PropertyHint type(const std::string &t)
Sets the attribute "type" to the specified value.
Definition: PropertyHint.h:295
Point< T, D > PointType
Definition: Line.h:63
PointType & back()
Returns a reference to the second point of the line segment.
Definition: Line.h:84
Line()
Creates an uninitialized line segment.
Definition: Line.h:67
Line< int, 3 > Line3i
A 3D integer line.
Definition: Line.h:105
const PointType & front() const
Returns a reference to the first point of the line segment.
Definition: Line.h:75
const PointType & back() const
Returns a reference to the second point of the line segment.
Definition: Line.h:81
PointType first
The two points of the line segment.
Definition: Line.h:97
void reflect(Reflector &r)
Definition: Line.h:89