74 #ifndef SLIP_BOX4D_HPP
75 #define SLIP_BOX4D_HPP
83 #include <boost/serialization/access.hpp>
84 #include <boost/serialization/split_member.hpp>
85 #include <boost/serialization/version.hpp>
106 template <
typename CoordType>
141 Box4d(
const CoordType& x11,
142 const CoordType& x12,
143 const CoordType& x13,
144 const CoordType& x14,
145 const CoordType& x21,
146 const CoordType& x22,
147 const CoordType& x23,
148 const CoordType& x24);
158 Box4d(
const CoordType& xc,
184 const CoordType& r4);
238 const CoordType& x12,
239 const CoordType& x13,
240 const CoordType& x14,
241 const CoordType& x21,
242 const CoordType& x22,
243 const CoordType& x23,
244 const CoordType& x24);
252 std::string
name()
const;
271 CoordType
depth()
const;
283 CoordType
width()
const;
286 friend class boost::serialization::access;
287 template<
class Archive>
288 void save(Archive & ar,
const unsigned int version)
const
290 ar & boost::serialization::base_object<slip::Box<CoordType,4> >(*this);
292 template<
class Archive>
293 void load(Archive & ar,
const unsigned int version)
295 ar & boost::serialization::base_object<slip::Box<CoordType,4> >(*this);
297 BOOST_SERIALIZATION_SPLIT_MEMBER()
305 template<
typename CoordType>
308 slip::
Box<CoordType,4>()
311 template<
typename CoordType>
315 slip::
Box<CoordType,4>(p1,p2)
318 template<
typename CoordType>
321 const CoordType& x12,
322 const CoordType& x13,
323 const CoordType& x14,
324 const CoordType& x21,
325 const CoordType& x22,
326 const CoordType& x23,
327 const CoordType& x24):
328 slip::
Box<CoordType,4>(
Point4d<CoordType>(x11,x12,x13,x14),
Point4d<CoordType>(x21,x22,x23,x24))
331 template<
typename CoordType>
338 slip::
Box<CoordType,4>(
Point4d<CoordType>(xc-r,yc-r,zc-r,lc-r),
Point4d<CoordType>(xc+r,yc+r,zc+r,lc+r))
341 template<
typename CoordType>
345 slip::
Box<CoordType,4>(
Point4d<CoordType>(pc[0]-r,pc[1]-r,pc[2]-r,pc[3]-r),
346 Point4d<CoordType>(pc[0]+r,pc[1]+r,pc[2]+r,pc[3]+r))
350 template<
typename CoordType>
356 const CoordType& r4):
357 slip::
Box<CoordType,4>(
Point4d<CoordType>(pc[0]-r1,pc[1]-r2,pc[2]-r3,pc[3]-r4),
358 Point4d<CoordType>(pc[0]+r1,pc[1]+r2,pc[2]+r3,pc[3]+r4))
362 template<
typename CoordType>
366 template<
typename CoordType>
370 template<
typename CoordType>
374 template<
typename CoordType>
378 template<
typename CoordType>
382 template<
typename CoordType>
386 template<
typename CoordType>
389 const CoordType& x12,
390 const CoordType& x13,
391 const CoordType& x14,
392 const CoordType& x21,
393 const CoordType& x22,
394 const CoordType& x23,
395 const CoordType& x24)
414 template<
typename CoordType>
418 template<
typename CoordType>
422 template<
typename CoordType>
426 template<
typename CoordType>
430 template<
typename CoordType>
436 #endif //SLIP_BOX4D_HPP
Box4d()
Constructs a Box4d.
slip::Box< CoordType, 4 > base
CoordType depth() const
compute the depth of the Box4d (second dimension size).
std::string name() const
Returns the name of the class.
Provides an abstract class to manipulate nd box.
Provides a class to modelize 4d points.
This is a Box4d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 4...
slip::Point< CoordType, 4 > & last_back_bottom_right()
Accessor/Mutator of the last_back_bottom_right point (p2) of Box4d.
This is a point4d class, a specialized version of Point<CoordType,DIM> with DIM = 4...
Define an abstract Box structure.
CoordType hypervolume() const
compute the hypervolume of the Box4d.
CoordType width() const
compute the width of the Box4d (fourth dimension size).
CoordType duration() const
compute the duration of the Box4d (first dimension size).
slip::Point< CoordType, 4 > & first_front_upper_left()
Accessor/Mutator of the first_front_upper_left point (p1) of Box4d.
CoordType height() const
compute the height of the Box4d (third dimension size).
void set_coord(const CoordType &x11, const CoordType &x12, const CoordType &x13, const CoordType &x14, const CoordType &x21, const CoordType &x22, const CoordType &x23, const CoordType &x24)
Mutator of the coordinates of the Box4d.