3.8.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

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

Public Member Functions

 object (fcppt::no_init const &)
 Construct an uninitialized box. More...
 
 object (vector pos, dim size)
 Construct a box from position and size. More...
 
 object (vector min, vector 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>
using fcppt::math::box::object< T, N >::dim = fcppt::math::dim::static_<T, N>

A type represents a box's size.

◆ dim_wrapper

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

◆ scalar

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

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>
using fcppt::math::box::object< T, N >::size_type = fcppt::math::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>
using fcppt::math::box::object< T, N >::value_type = T

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

◆ vector

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

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  pos,
dim  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  min,
vector  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