4.4.1
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
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.
 
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).
 
using size_type = fcppt::math::size_type
 A type that counts the number of elements in a box's vector/dimension.
 
using vector = fcppt::math::vector::static_< T, N >
 A type represents a box's position.
 
using dim = fcppt::math::dim::static_< T, N >
 A type represents a box's size.
 
using min_t = fcppt::strong_typedef< vector,_ >
 
using max_t = fcppt::strong_typedef< vector,_ >
 

Public Member Functions

 object (fcppt::no_init const &)
 Construct an uninitialized box.
 
 object (vector pos, dim size)
 Construct a box from position and size.
 
 object (min_t, max_t)
 Construct a box from two positions.
 
vectorpos ()
 Return the box's position.
 
vector const & pos () const
 
vectormin ()
 
vector const & min () 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>

◆ max_t

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

◆ min_t

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

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

◆ object() [3/3]

template<typename T , fcppt::math::size_type N>
fcppt::math::box::object< T, N >::object ( min_t  ,
max_t   
)

Construct a box from two positions.

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

◆ min() [1/2]

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

◆ min() [2/2]

template<typename T , fcppt::math::size_type N>
vector const & fcppt::math::box::object< T, N >::min ( ) 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