73 #ifndef SLIP_POINT4D_HPP
74 #define SLIP_POINT4D_HPP
81 #include <boost/serialization/access.hpp>
82 #include <boost/serialization/split_member.hpp>
83 #include <boost/serialization/version.hpp>
84 #include <boost/serialization/base_object.hpp>
101 template <
typename CoordType>
122 Point4d(
const CoordType* array);
134 const CoordType&
x4);
146 void x1(
const CoordType& x);
156 const CoordType&
x1()
const;
162 void x2(
const CoordType& x);
174 const CoordType&
x2()
const;
180 void x3(
const CoordType& x);
191 const CoordType&
x3()
const;
197 void x4(
const CoordType& x);
208 const CoordType&
x4()
const;
216 std::string
name()
const;
239 template<
class Archive>
240 void save(Archive & ar,
const unsigned int version)
const
242 ar & boost::serialization::base_object<slip::Point<CoordType,4> >(*this);
244 template<
class Archive>
245 void load(Archive & ar,
const unsigned int version)
247 ar & boost::serialization::base_object<slip::Point<CoordType,4> >(*this);
249 BOOST_SERIALIZATION_SPLIT_MEMBER()
276 template<
typename CoordType>
280 this->coord_[0] = CoordType(0);
281 this->coord_[1] = CoordType(0);
282 this->coord_[2] = CoordType(0);
283 this->coord_[3] = CoordType(0);
286 template<
typename CoordType>
289 slip::
Point<CoordType,4>(array)
293 template<
typename CoordType>
296 const CoordType& x1,
const CoordType& x2,
297 const CoordType& x3,
const CoordType& x4)
299 this->coord_[0] = CoordType(x1);
300 this->coord_[1] = CoordType(x2);
301 this->coord_[2] = CoordType(x3);
302 this->coord_[3] = CoordType(x4);
305 template<
typename CoordType>
309 template<
typename CoordType>
313 template<
typename CoordType>
317 template<
typename CoordType>
322 template<
typename CoordType>
326 template<
typename CoordType>
330 template<
typename CoordType>
334 template<
typename CoordType>
338 template<
typename CoordType>
342 template<
typename CoordType>
346 template<
typename CoordType>
350 template<
typename CoordType>
354 template<
typename CoordType>
361 #endif //SLIP_POINT4D_HPP
slip::Point4d< int > Point4d_i
int alias
std::string name() const
Returns the name of the class.
slip::Point4d< short > Point4d_s
short alias
slip::Point4d< unsigned char > Point4d_uc
unsigned char alias
block< value_type, DIM > coord_
The coordinates of the point are stored in this block.
CoordType & x1()
Accessor/Mutator of the first coordinate of Point4d.
Provides an abstract class to modelize nd points.
Define an abstract Point structure.
slip::Point4d< unsigned long > Point4d_ul
unsigned long alias
slip::Point4d< float > Point4d_f
float alias
CoordType & x2()
Accessor/Mutator of the second coordinate of Point4d.
This is a point4d class, a specialized version of Point<CoordType,DIM> with DIM = 4...
slip::Point4d< unsigned int > Point4d_ui
unsigned int alias
CoordType & x3()
Accessor/Mutator of the third coordinate of Point4d.
slip::Point4d< char > Point4d_c
char alias
self & operator=(const base &p)
Assign a Point. Assign elements of Point in a Point4d.
slip::Point4d< unsigned short > Point4d_us
unsigned long alias
Point4d()
Constructs a Point4d.
friend class boost::serialization::access
slip::Point< CoordType, 4 > base
slip::Point4d< double > Point4d_d
double alias
slip::Point4d< long > Point4d_l
long alias
CoordType & x4()
Accessor/Mutator of the fourth coordinate of Point4d.