2.10.0
Freundlich's C++ toolkit
Public Types | Public Member Functions
fcppt::math::box::object< T, N > Class Template Reference

Detailed Description

template<typename T, fcppt::math::size_type N>
class fcppt::math::box::object< T, N >

A class representing axis aligned boxes, cubes, hypercubes, ...

Template Parameters
TThe box's value_type
NThe box's (numeric) dimension

Public Types

typedef T value_type
 A type that represents the data type stored in a box's vector/dimension. More...
 
typedef fcppt::math::static_size< N > dim_wrapper
 
typedef value_type scalar
 A type that represents the data type stored in a box's vector/dimension (synonymous to value_type). More...
 
typedef fcppt::math::size_type size_type
 A type that counts the number of elements in a box's vector/dimension. More...
 
typedef fcppt::math::vector::static_< T, N > vector
 A type represents a box's position. More...
 
typedef fcppt::math::dim::static_< T, N > dim
 A type represents a box's size. More...
 

Public Member Functions

 object (fcppt::no_init const &)
 Construct an uninitialized box. More...
 
 object (vector const &pos, dim const &size)
 Construct a box from position and size. More...
 
 object (vector const &min, vector const &max)
 Construct a box from position and size. More...
 
vectorpos ()
 Return the box's position. More...
 
vector const & pos () const
 
vectormax ()
 
vector const & max () const
 
dim size () const
 
value_type left () const
 
value_type right () const
 
value_type top () const
 
value_type bottom () const
 
value_type front () const
 
value_type back () const
 

Member Typedef Documentation

◆ dim

template<typename T, fcppt::math::size_type N>
typedef fcppt::math::dim::static_< T, N > fcppt::math::box::object< T, N >::dim

A type represents a box's size.

◆ dim_wrapper

template<typename T, fcppt::math::size_type N>
typedef fcppt::math::static_size< N > fcppt::math::box::object< T, N >::dim_wrapper

◆ scalar

template<typename T, fcppt::math::size_type N>
typedef value_type fcppt::math::box::object< T, N >::scalar

A type that represents the data type stored in a box's vector/dimension (synonymous to value_type).

◆ size_type

template<typename T, fcppt::math::size_type N>
typedef fcppt::math::size_type fcppt::math::box::object< T, N >::size_type

A type that counts the number of elements in a box's vector/dimension.

◆ value_type

template<typename T, fcppt::math::size_type N>
typedef T fcppt::math::box::object< T, N >::value_type

A type that represents the data type stored in a box's vector/dimension.

◆ vector

template<typename T, fcppt::math::size_type N>
typedef fcppt::math::vector::static_< T, N > fcppt::math::box::object< T, N >::vector

A type represents a box's position.

Constructor & Destructor Documentation

◆ object() [1/3]

template<typename T, fcppt::math::size_type N>
fcppt::math::box::object< T, N >::object ( fcppt::no_init const &  )
explicit

Construct an uninitialized box.

Warning
The content of the box will be undefined (not null) after initialization

◆ object() [2/3]

template<typename T, fcppt::math::size_type N>
fcppt::math::box::object< T, N >::object ( vector const &  pos,
dim const &  size 
)

Construct a box from position and size.

Parameters
posThe box's position
sizeThe box's size

◆ object() [3/3]

template<typename T, fcppt::math::size_type N>
fcppt::math::box::object< T, N >::object ( vector const &  min,
vector const &  max 
)

Construct a box from position and size.

Parameters
minThe box's min position
maxThe box's max position

Member Function Documentation

◆ back()

template<typename T, fcppt::math::size_type N>
value_type fcppt::math::box::object< T, N >::back ( ) const

◆ bottom()

template<typename T, fcppt::math::size_type N>
value_type fcppt::math::box::object< T, N >::bottom ( ) const

◆ front()

template<typename T, fcppt::math::size_type N>
value_type fcppt::math::box::object< T, N >::front ( ) const

◆ left()

template<typename T, fcppt::math::size_type N>
value_type fcppt::math::box::object< T, N >::left ( ) const

◆ max() [1/2]

template<typename T, fcppt::math::size_type N>
vector& fcppt::math::box::object< T, N >::max ( )

◆ max() [2/2]

template<typename T, fcppt::math::size_type N>
vector const& fcppt::math::box::object< T, N >::max ( ) const

◆ pos() [1/2]

template<typename T, fcppt::math::size_type N>
vector& fcppt::math::box::object< T, N >::pos ( )

Return the box's position.

◆ pos() [2/2]

template<typename T, fcppt::math::size_type N>
vector const& fcppt::math::box::object< T, N >::pos ( ) const

◆ right()

template<typename T, fcppt::math::size_type N>
value_type fcppt::math::box::object< T, N >::right ( ) const

◆ size()

template<typename T, fcppt::math::size_type N>
dim fcppt::math::box::object< T, N >::size ( ) const

◆ top()

template<typename T, fcppt::math::size_type N>
value_type fcppt::math::box::object< T, N >::top ( ) const