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::Box3d< CoordType > Class Template Reference

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

#include <Box3d.hpp>

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

Public Types

typedef Box3d< CoordType > self
 
typedef Box< CoordType, 3 > 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 volume () const
 compute the volume of the Box3d. More...
 
CoordType width () const
 compute the width of the Box3d. More...
 
CoordType height () const
 compute the height of the Box3d. More...
 
CoordType depth () const
 compute the depth of the Box3d. 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
 Box3d ()
 Constructs a Box3d. More...
 
 Box3d (const Point< CoordType, 3 > &p1, const Point< CoordType, 3 > &p2)
 Constructs a Box3d from a CoordType array. More...
 
 Box3d (const CoordType &x11, const CoordType &x12, const CoordType &x13, const CoordType &x21, const CoordType &x22, const CoordType &x23)
 Constructs a Box3d. More...
 
 Box3d (const CoordType &xc, const CoordType &yc, const CoordType &zc, const CoordType &w)
 Constructs a square Box3d using a central point and a width. More...
 
 Box3d (const Point< CoordType, 3 > &pc, const CoordType &w)
 Constructs a square Box3d using a central point and a width. More...
 
 Box3d (const Point< CoordType, 3 > &pc, const CoordType &w1, const CoordType &w2, const CoordType &w3)
 Constructs a square Box3d using a central point and two widths. More...
 
Element access operators
void front_upper_left (Point< CoordType, 3 >)
 Accessor/Mutator of the front_upper_left point (p1) of Box3d. More...
 
Point< CoordType, 3 > & front_upper_left ()
 Accessor/Mutator of the front_upper_left point (p1) of Box3d. More...
 
const Point< CoordType, 3 > & front_upper_left () const
 Accessor/Mutator of the front_upper_left point (p1) of Box3d. More...
 
void back_bottom_right (Point< CoordType, 3 >)
 Accessor/Mutator of the back_bottom_right point (p2) of Box3d. More...
 
Point< CoordType, 3 > & back_bottom_right ()
 Accessor/Mutator of the back_bottom_right point (p2) of Box3d. More...
 
const Point< CoordType, 3 > & back_bottom_right () const
 Accessor/Mutator of the back_bottom_right point (p2) of Box3d. More...
 
void set_coord (const CoordType &x11, const CoordType &x12, const CoordType &x13, const CoordType &x21, const CoordType &x22, const CoordType &x23)
 Mutator of the coordinates of the Box3d. 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::Box3d< CoordType >

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

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2014/03/15
Version
0.0.2
Since
1.0.0
Description:
The box is defined by its front-upper-left and back-bottom-right points p1 and p2.
-------- _
/ /| x1 /
/ / | /
p1-------- | /
| | | /
| | | O------------> x3
| | p2 |
| |/ |
---------- |
|
\|
x2
Parameters
CoordTypeType of the coordinates of the Box3d

Definition at line 121 of file Box3d.hpp.

Member Typedef Documentation

template<typename CoordType>
typedef Box<CoordType,3> slip::Box3d< CoordType >::base

Definition at line 125 of file Box3d.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 Box3d<CoordType> slip::Box3d< CoordType >::self

Definition at line 124 of file Box3d.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::Box3d< CoordType >::Box3d ( )
inline

Constructs a Box3d.

Remarks
call the default constructors of Point<CoordType,3>

Definition at line 304 of file Box3d.hpp.

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

Constructs a Box3d from a CoordType array.

Parameters
p1first extremal point
p2second extremal point

Definition at line 310 of file Box3d.hpp.

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

Constructs a Box3d.

Parameters
x11first coordinate of the minimal point p1
x12second coordinate of the minimal point p1
x13third 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 p3

Definition at line 317 of file Box3d.hpp.

template<typename CoordType>
slip::Box3d< CoordType >::Box3d ( const CoordType &  xc,
const CoordType &  yc,
const CoordType &  zc,
const CoordType &  w 
)
inline

Constructs a square Box3d 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
wwidth of the box (real width and height=2*w+1)

Definition at line 328 of file Box3d.hpp.

template<typename CoordType>
slip::Box3d< CoordType >::Box3d ( const Point< CoordType, 3 > &  pc,
const CoordType &  w 
)
inline

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

Parameters
pccentral point
wwidth of the box (real width and height=2*w+1)

Definition at line 337 of file Box3d.hpp.

template<typename CoordType>
slip::Box3d< CoordType >::Box3d ( const Point< CoordType, 3 > &  pc,
const CoordType &  w1,
const CoordType &  w2,
const CoordType &  w3 
)
inline

Constructs a square Box3d using a central point and two widths.

Parameters
pccentral point
w1width of the first coordinate box (real width =2*w1+1)
w2width of the second coordinate box (real height =2*w2+1)
w3width of the third coordinate box (real height =2*w3+1)

Definition at line 345 of file Box3d.hpp.

Member Function Documentation

template<typename CoordType>
void slip::Box3d< CoordType >::back_bottom_right ( Point< CoordType, 3 >  p2)
inline

Accessor/Mutator of the back_bottom_right point (p2) of Box3d.

Returns
reference to the back_bottom_right Point3d of the Box3d

Definition at line 368 of file Box3d.hpp.

template<typename CoordType>
Point< CoordType, 3 > & slip::Box3d< CoordType >::back_bottom_right ( )
inline

Accessor/Mutator of the back_bottom_right point (p2) of Box3d.

Returns
reference to the back_bottom_right Point3d of the Box3d

Definition at line 372 of file Box3d.hpp.

template<typename CoordType>
const Point< CoordType, 3 > & slip::Box3d< CoordType >::back_bottom_right ( ) const
inline

Accessor/Mutator of the back_bottom_right point (p2) of Box3d.

Returns
reference to the back_bottom_right Point3d of the Box3d

Definition at line 376 of file Box3d.hpp.

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::Box3d< CoordType >::depth ( ) const
inline

compute the depth of the Box3d.

Returns
the depth

Definition at line 416 of file Box3d.hpp.

template<typename CoordType>
void slip::Box3d< CoordType >::front_upper_left ( Point< CoordType, 3 >  p1)
inline

Accessor/Mutator of the front_upper_left point (p1) of Box3d.

Returns
reference to the front_upper_left Point3d of the Box3d

Definition at line 355 of file Box3d.hpp.

template<typename CoordType>
Point< CoordType, 3 > & slip::Box3d< CoordType >::front_upper_left ( )
inline

Accessor/Mutator of the front_upper_left point (p1) of Box3d.

Returns
reference to the front_upper_left Point3d of the Box3d

Definition at line 359 of file Box3d.hpp.

template<typename CoordType>
const Point< CoordType, 3 > & slip::Box3d< CoordType >::front_upper_left ( ) const
inline

Accessor/Mutator of the front_upper_left point (p1) of Box3d.

Returns
reference to the front_upper_left Point3d of the Box3d

Definition at line 363 of file Box3d.hpp.

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

compute the height of the Box3d.

Returns
the height

Definition at line 412 of file Box3d.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 T >
std::string slip::Box3d< T >::name ( ) const
inline

Returns the name of the class.

Definition at line 399 of file Box3d.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::Box3d< CoordType >::set_coord ( const CoordType &  x11,
const CoordType &  x12,
const CoordType &  x13,
const CoordType &  x21,
const CoordType &  x22,
const CoordType &  x23 
)
inline

Mutator of the coordinates of the Box3d.

Parameters
x11first coordinate of the minimal point p1
x12second coordinate of the minimal point p1
x13third 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
Returns

Definition at line 380 of file Box3d.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::Box3d< CoordType >::volume ( ) const
inline

compute the volume of the Box3d.

Returns
the volume

Definition at line 404 of file Box3d.hpp.

template<typename CoordType >
CoordType slip::Box3d< CoordType >::width ( ) const
inline

compute the width of the Box3d.

Returns
the width

Definition at line 408 of file Box3d.hpp.

Friends And Related Function Documentation

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

Definition at line 284 of file Box3d.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: