74 #ifndef SLIP_POINT2D_HPP
75 #define SLIP_POINT2D_HPP
82 #include <boost/serialization/access.hpp>
83 #include <boost/serialization/split_member.hpp>
84 #include <boost/serialization/version.hpp>
85 #include <boost/serialization/base_object.hpp>
107 template <
typename CoordType>
108 class Point2d:
public Point<CoordType,2>
128 Point2d(
const CoordType* array);
136 const CoordType&
x2);
149 void x1(
const CoordType& x);
161 const CoordType&
x1()
const;
167 void x2(
const CoordType& x);
179 const CoordType&
x2()
const;
186 std::string
name()
const;
188 friend class boost::serialization::access;
189 template<
class Archive>
190 void save(Archive & ar,
const unsigned int version)
const
192 ar & boost::serialization::base_object<slip::Point<CoordType,2> >(*this);
194 template<
class Archive>
195 void load(Archive & ar,
const unsigned int version)
197 ar & boost::serialization::base_object<slip::Point<CoordType,2> >(*this);
199 BOOST_SERIALIZATION_SPLIT_MEMBER()
225 template<
typename CoordType>
229 this->coord_[0] = CoordType(0);
230 this->coord_[1] = CoordType(0);
233 template<
typename CoordType>
236 Point<CoordType,2>(array)
239 template<
typename CoordType>
244 this->coord_[0] = CoordType(x1);
245 this->coord_[1] = CoordType(x2);
248 template<
typename CoordType>
252 template<
typename CoordType>
256 template<
typename CoordType>
260 template<
typename CoordType>
265 template<
typename CoordType>
269 template<
typename CoordType>
273 template<
typename CoordType>
280 #endif //SLIP_POINT2D_HPP
slip::Point2d< unsigned char > Point2d_uc
unsigned char alias
CoordType & x2()
Accessor/Mutator of the second coordinate of Point2d.
slip::Point2d< float > Point2d_f
float alias
slip::Point2d< short > Point2d_s
short alias
slip::Point2d< unsigned long > Point2d_ul
unsigned long alias
Provides an abstract class to modelize nd points.
slip::Point2d< char > Point2d_c
char alias
This is a point2d class, a specialized version of Point<CoordType,DIM> with DIM = 2...
slip::Point2d< unsigned short > Point2d_us
unsigned long alias
CoordType & x1()
Accessor/Mutator of the first coordinate of Point2d.
std::string name() const
Returns the name of the class.
Point2d()
Constructs a Point2d.
slip::Point2d< int > Point2d_i
int alias
Point< CoordType, 2 > base
slip::Point2d< unsigned int > Point2d_ui
unsigned int alias
slip::Point2d< long > Point2d_l
long alias
slip::Point2d< double > Point2d_d
double alias