61 template <
typename T,
int D>
90 template<
typename Reflector>
93 r.property(
"P0",
first,
"The first point");
94 r.property(
"P1",
second,
"The second point");
132 namespace boost {
namespace geometry {
namespace traits {
136 template <
typename T,
int D>
137 struct tag<
mira::Line<T,D> > {
138 typedef segment_tag
type;
141 template <
typename T,
int D>
142 struct point_type<
mira::Line<T,D> > {
146 template <
typename T,
int D, std::
size_t Dimension>
147 struct indexed_access<
mira::Line<T,D>, 0, Dimension>
152 static inline coordinate_type
get(segment_type
const& s) {
153 return geometry::get<Dimension>(s.first);
156 static inline void set(segment_type& s, coordinate_type
const& value) {
157 geometry::set<Dimension>(s.first, value);
161 template <
typename T,
int D, std::
size_t Dimension>
162 struct indexed_access<
mira::Line<T,D>, 1, Dimension>
167 static inline coordinate_type
get(segment_type
const& s) {
168 return geometry::get<Dimension>(s.second);
171 static inline void set(segment_type& s, coordinate_type
const& value) {
172 geometry::set<Dimension>(s.second, value);
Represents a line segment that is spanned by two given points.
Definition: Line.h:62
Line< float, 2 > Line2f
A 2D 32 bit floating precision line.
Definition: Line.h:108
Definition: SyncTimedRead.h:62
General point class template.
Definition: Point.h:135
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:109
PointType & front()
Returns a reference to the first point of the line segment.
Definition: Line.h:80
Line< int, 2 > Line2i
A 2D integer line.
Definition: Line.h:106
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:72
PointType second
Definition: Line.h:99
By default, IsCheapToCopy<T>::value evaluates to true for fundamental types T, false for all other ty...
Definition: IsCheapToCopy.h:63
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:65
Type trait to define if a class is cheap to copy.
PointType & back()
Returns a reference to the second point of the line segment.
Definition: Line.h:86
Line()
Creates an uninitialized line segment.
Definition: Line.h:69
Line< int, 3 > Line3i
A 3D integer line.
Definition: Line.h:107
const PointType & front() const
Returns a reference to the first point of the line segment.
Definition: Line.h:77
const PointType & back() const
Returns a reference to the second point of the line segment.
Definition: Line.h:83
PointType first
The two points of the line segment.
Definition: Line.h:99
void reflect(Reflector &r)
Definition: Line.h:91