SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
slip::Box4d< CoordType > Class Template Reference

This is a Box4d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 4. More...

#include <Box4d.hpp>

Inheritance diagram for slip::Box4d< CoordType >:
Inheritance graph

Public Types

typedef Box4d< CoordType > self
 
typedef slip::Box< CoordType, 4 > base
 
typedef CoordType value_type
 
typedef value_typeboxer
 
typedef const value_typeconst_boxer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef Point< CoordType, DIM > point_type
 
typedef DPoint< CoordType, DIM > dpoint_type
 

Public Member Functions

std::string name () const
 Returns the name of the class. More...
 
CoordType hypervolume () const
 compute the hypervolume of the Box4d. More...
 
CoordType duration () const
 compute the duration of the Box4d (first dimension size). More...
 
CoordType depth () const
 compute the depth of the Box4d (second dimension size). More...
 
CoordType height () const
 compute the height of the Box4d (third dimension size). More...
 
CoordType width () const
 compute the width of the Box4d (fourth dimension size). More...
 
bool contains (const point_type &p) const
 Returns true if the box contains the point p. More...
 
void translate (const dpoint_type &dp)
 Translate the window along the deplacement dp the dimensions of the window are conserved. More...
 
bool is_consistent () const
 verify if the window is consistent, that is to say if the first point p1 has the smaller coordinates than p2 More...
 
void swap (self &other)
 Swaps two Box. More...
 
Constructors & Destructors
 Box4d ()
 Constructs a Box4d. More...
 
 Box4d (const slip::Point< CoordType, 4 > &p1, const slip::Point< CoordType, 4 > &p2)
 Constructs a Box4d from a CoordType array. More...
 
 Box4d (const CoordType &x11, const CoordType &x12, const CoordType &x13, const CoordType &x14, const CoordType &x21, const CoordType &x22, const CoordType &x23, const CoordType &x24)
 Constructs a Box4d. More...
 
 Box4d (const CoordType &xc, const CoordType &yc, const CoordType &zc, const CoordType &lc, const CoordType &r)
 Constructs a square Box4d using a central point and a width. More...
 
 Box4d (const slip::Point< CoordType, 4 > &pc, const CoordType &r)
 Constructs a square Box4d using a central point and a radius. More...
 
 Box4d (const slip::Point< CoordType, 4 > &pc, const CoordType &r1, const CoordType &r2, const CoordType &r3, const CoordType &r4)
 Constructs a square Box4d using a central point and four radius. More...
 
Element access operators
void first_front_upper_left (slip::Point< CoordType, 4 >)
 Accessor/Mutator of the first_front_upper_left point (p1) of Box4d. More...
 
slip::Point< CoordType, 4 > & first_front_upper_left ()
 Accessor/Mutator of the first_front_upper_left point (p1) of Box4d. More...
 
const slip::Point< CoordType, 4 > & first_front_upper_left () const
 Accessor/Mutator of the first_front_upper_left point (p1) of Box4d. More...
 
void last_back_bottom_right (slip::Point< CoordType, 4 >)
 Accessor/Mutator of the last_back_bottom_right point (p2) of Box4d. More...
 
slip::Point< CoordType, 4 > & last_back_bottom_right ()
 Accessor/Mutator of the last_back_bottom_right point (p2) of Box4d. More...
 
const slip::Point< CoordType, 4 > & last_back_bottom_right () const
 Accessor/Mutator of the last_back_bottom_right point (p2) of Box4d. More...
 
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. More...
 
Comparison operators
bool operator== (const self &other) const
 compare two Box. More...
 
bool operator!= (const self &other) const
 compare two Box. More...
 

Protected Attributes

point_type p1_
 
point_type p2_
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename CoordType>
class slip::Box4d< CoordType >

This is a Box4d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 4.

Version
Fluex 1.0
Date
2013/07/01
Since
1.4.0
Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
Description:
The box is defined by its first-front-upper-left and last-back-bottom-right points p1 and p2.
Conventions4d.jpg
Box4d conventions
Parameters
CoordTypeType of the coordinates of the Box4d

Definition at line 107 of file Box4d.hpp.

Member Typedef Documentation

template<typename CoordType>
typedef slip::Box<CoordType,4> slip::Box4d< CoordType >::base

Definition at line 111 of file Box4d.hpp.

typedef value_type* slip::Box< CoordType, DIM >::boxer
inherited

Definition at line 124 of file Box.hpp.

typedef const value_type* slip::Box< CoordType, DIM >::const_boxer
inherited

Definition at line 125 of file Box.hpp.

typedef const value_type& slip::Box< CoordType, DIM >::const_reference
inherited

Definition at line 127 of file Box.hpp.

typedef DPoint<CoordType,DIM> slip::Box< CoordType, DIM >::dpoint_type
inherited

Definition at line 129 of file Box.hpp.

typedef Point<CoordType,DIM> slip::Box< CoordType, DIM >::point_type
inherited

Definition at line 128 of file Box.hpp.

typedef value_type& slip::Box< CoordType, DIM >::reference
inherited

Definition at line 126 of file Box.hpp.

template<typename CoordType>
typedef Box4d<CoordType> slip::Box4d< CoordType >::self

Definition at line 110 of file Box4d.hpp.

typedef CoordType slip::Box< CoordType, DIM >::value_type
inherited

Definition at line 123 of file Box.hpp.

Constructor & Destructor Documentation

template<typename CoordType >
slip::Box4d< CoordType >::Box4d ( )
inline

Constructs a Box4d.

Remarks
call the default constructors of slip::Point<CoordType,4>

Definition at line 307 of file Box4d.hpp.

template<typename CoordType>
slip::Box4d< CoordType >::Box4d ( const slip::Point< CoordType, 4 > &  p1,
const slip::Point< CoordType, 4 > &  p2 
)
inline

Constructs a Box4d from a CoordType array.

Parameters
p1first extremal point
p2second extremal point

Definition at line 313 of file Box4d.hpp.

template<typename CoordType>
slip::Box4d< CoordType >::Box4d ( const CoordType &  x11,
const CoordType &  x12,
const CoordType &  x13,
const CoordType &  x14,
const CoordType &  x21,
const CoordType &  x22,
const CoordType &  x23,
const CoordType &  x24 
)
inline

Constructs a Box4d.

Parameters
x11first coordinate of the minimal point p1
x12second coordinate of the minimal point p1
x13third coordinate of the minimal point p1
x14fourth coordinate of the minimal point p1
x21first coordinate of the maximal point p2
x22second coordinate of the maximal point p2
x23third coordinate of the maximal point p2
x24fourth coordinate of the maximal point p2

Definition at line 320 of file Box4d.hpp.

template<typename CoordType>
slip::Box4d< CoordType >::Box4d ( const CoordType &  xc,
const CoordType &  yc,
const CoordType &  zc,
const CoordType &  lc,
const CoordType &  r 
)
inline

Constructs a square Box4d using a central point and a width.

Parameters
xcfirst coordinate of the central point
ycsecond coordinate of the central point
zcthird coordinate of the central point
lcfourth coordinate of the central point
rradius of the box (dimensions = (2r,2r,2r,2r))

Definition at line 333 of file Box4d.hpp.

template<typename CoordType>
slip::Box4d< CoordType >::Box4d ( const slip::Point< CoordType, 4 > &  pc,
const CoordType &  r 
)
inline

Constructs a square Box4d using a central point and a radius.

Parameters
pccentral point
rradius of the box (dimensions = (2r,2r,2r,2r))

Definition at line 343 of file Box4d.hpp.

template<typename CoordType>
slip::Box4d< CoordType >::Box4d ( const slip::Point< CoordType, 4 > &  pc,
const CoordType &  r1,
const CoordType &  r2,
const CoordType &  r3,
const CoordType &  r4 
)
inline

Constructs a square Box4d using a central point and four radius.

Parameters
pccentral point
r1radius of the first coordinate box (dim1 =2r1)
r2radius of the second coordinate box (dim2 =2r2)
r3radius of the third coordinate box (dim3 =2r3)
r4radius of the fourth coordinate box (dim4 =2r4)

Definition at line 352 of file Box4d.hpp.

Member Function Documentation

bool slip::Box< CoordType, DIM >::contains ( const point_type p) const
inherited

Returns true if the box contains the point p.

Parameters
ppoint to analyse
Returns
template<typename CoordType >
CoordType slip::Box4d< CoordType >::depth ( ) const
inline

compute the depth of the Box4d (second dimension size).

Returns
the depth

Definition at line 428 of file Box4d.hpp.

template<typename CoordType >
CoordType slip::Box4d< CoordType >::duration ( ) const
inline

compute the duration of the Box4d (first dimension size).

Returns
the duration

Definition at line 432 of file Box4d.hpp.

template<typename CoordType>
void slip::Box4d< CoordType >::first_front_upper_left ( slip::Point< CoordType, 4 >  p1)
inline

Accessor/Mutator of the first_front_upper_left point (p1) of Box4d.

Returns
reference to the first_front_upper_left Point4d of the Box4d

Definition at line 364 of file Box4d.hpp.

template<typename CoordType>
slip::Point< CoordType, 4 > & slip::Box4d< CoordType >::first_front_upper_left ( )
inline

Accessor/Mutator of the first_front_upper_left point (p1) of Box4d.

Returns
reference to the first_front_upper_left Point4d of the Box4d

Definition at line 368 of file Box4d.hpp.

template<typename CoordType>
const slip::Point< CoordType, 4 > & slip::Box4d< CoordType >::first_front_upper_left ( ) const
inline

Accessor/Mutator of the first_front_upper_left point (p1) of Box4d.

Returns
reference to the front_upper_left Point4d of the Box4d

Definition at line 372 of file Box4d.hpp.

template<typename CoordType >
CoordType slip::Box4d< CoordType >::height ( ) const
inline

compute the height of the Box4d (third dimension size).

Returns
the height

Definition at line 424 of file Box4d.hpp.

template<typename CoordType >
CoordType slip::Box4d< CoordType >::hypervolume ( ) const
inline

compute the hypervolume of the Box4d.

Returns
the hypervolume

Definition at line 416 of file Box4d.hpp.

bool slip::Box< CoordType, DIM >::is_consistent ( ) const
inherited

verify if the window is consistent, that is to say if the first point p1 has the smaller coordinates than p2

Returns
true if the "p1 < p2"
template<typename CoordType>
void slip::Box4d< CoordType >::last_back_bottom_right ( slip::Point< CoordType, 4 >  p2)
inline

Accessor/Mutator of the last_back_bottom_right point (p2) of Box4d.

Returns
reference to the last_back_bottom_right Point4d of the Box4d

Definition at line 376 of file Box4d.hpp.

template<typename CoordType>
slip::Point< CoordType, 4 > & slip::Box4d< CoordType >::last_back_bottom_right ( )
inline

Accessor/Mutator of the last_back_bottom_right point (p2) of Box4d.

Returns
reference to the last_back_bottom_right Point4d of the Box4d

Definition at line 380 of file Box4d.hpp.

template<typename CoordType>
const slip::Point< CoordType, 4 > & slip::Box4d< CoordType >::last_back_bottom_right ( ) const
inline

Accessor/Mutator of the last_back_bottom_right point (p2) of Box4d.

Returns
reference to the last_back_bottom_right Point4d of the Box4d

Definition at line 384 of file Box4d.hpp.

template<typename T >
std::string slip::Box4d< T >::name ( ) const
inline

Returns the name of the class.

Definition at line 411 of file Box4d.hpp.

bool slip::Box< CoordType, DIM >::operator!= ( const self other) const
inherited

compare two Box.

Parameters
otherBox to compare
Returns
true if the two box don't have the same coordinates
bool slip::Box< CoordType, DIM >::operator== ( const self other) const
inherited

compare two Box.

Parameters
otherBox to compare
Returns
true if the two box have the same coordinates
template<typename CoordType>
void slip::Box4d< CoordType >::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 
)
inline

Mutator of the coordinates of the Box4d.

Parameters
x11first coordinate of the minimal point p1
x12second coordinate of the minimal point p1
x13third coordinate of the minimal point p1
x14fourth coordinate of the minimal point p1
x21first coordinate of the maximal point p2
x22second coordinate of the maximal point p2
x23third coordinate of the maximal point p2
x24fourth coordinate of the maximal point p2
Returns

Definition at line 388 of file Box4d.hpp.

void slip::Box< CoordType, DIM >::swap ( self other)
inherited

Swaps two Box.

Parameters
otherBox to swap with
void slip::Box< CoordType, DIM >::translate ( const dpoint_type dp)
inherited

Translate the window along the deplacement dp the dimensions of the window are conserved.

Parameters
dpdeplacement of the window
Returns
template<typename CoordType >
CoordType slip::Box4d< CoordType >::width ( ) const
inline

compute the width of the Box4d (fourth dimension size).

Returns
the width

Definition at line 420 of file Box4d.hpp.

Friends And Related Function Documentation

template<typename CoordType>
friend class boost::serialization::access
friend

Definition at line 286 of file Box4d.hpp.

Member Data Documentation

point_type slip::Box< CoordType, DIM >::p1_
protectedinherited

First extremal coordinate of the box

Definition at line 257 of file Box.hpp.

point_type slip::Box< CoordType, DIM >::p2_
protectedinherited

Second extremal coordinate of the box

Definition at line 261 of file Box.hpp.


The documentation for this class was generated from the following file: