|
0.12.0
|
|
Freundlich's C++ toolkit |
A class representing dynamic or static n-dimensional dimensions.
| T | The dim's value_type |
| N | The dim's dimension type (this is not necessarily a number!) |
| S | The dim's storage type |
See the module description for more information.
Public Types | |
| typedef N | dim_wrapper |
A typedef for the N parameter. | |
| typedef S | storage_type |
A typedef for the S parameter. | |
| typedef math::size_type | size_type |
| A type that counts the number of elements in a dim. | |
| typedef math::difference_type | difference_type |
| A type that provides the difference between the addresses of two elements in a dim. | |
| typedef T | value_type |
| A type that represents the data type stored in a dim. | |
| typedef value_type & | reference |
| A type that provides a reference to an element stored in a dim. | |
| typedef value_type const & | const_reference |
A type that provides a reference to a const element stored in a dim for reading and performing const operations. | |
| typedef T * | pointer |
| A type that provides a pointer to an element in a dim. | |
| typedef T const * | const_pointer |
A type that provides a pointer to a const element in a dim. | |
| typedef pointer | iterator |
| A type that provides a random-access iterator that can read or modify any element in a dim. | |
| typedef const_pointer | const_iterator |
A type that provides a random-access iterator that can read a const element in a dim. | |
| typedef std::reverse_iterator < iterator > | reverse_iterator |
| A type that provides a random-access iterator that can read or modify any element in a reversed dim. | |
| typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
A type that provides a random-access iterator that can read any const element in the dim. | |
Public Member Functions | |
| object () | |
| Construct an uninitialized dim. | |
| object (storage_type const &s) | |
| Construct a dim from a storage source. | |
| object (object const &) | |
| Copy-construct the dim from another dim. | |
| template<typename OtherStorage > | |
| object (object< T, N, OtherStorage > const &) | |
| Create a dim from a dim with the same dimension and value type but different storage type. | |
| template<typename In > | |
| object (In beg, typename boost::enable_if< type_traits::is_iterator< In >, In >::type end) | |
| Create a dim and fill it with the contents of the given range. | |
| FCPPT_MATH_DETAIL_MAKE_VARIADIC_CONSTRUCTOR_DECL (FCPPT_MATH_DIM_MAX_CTOR_PARAMS, object) object &operator | |
| Copy the values from a different dim. | |
| template<typename OtherStorage > | |
| object & | operator= (object< T, N, OtherStorage > const &) |
| Copy the values from a different dim. | |
| ~object () | |
| object & | operator*= (value_type const &) |
| Multiply a dim by a scalar. | |
| object & | operator/= (value_type const &) |
| Divide a dim by a scalar. | |
| reference | operator[] (size_type) |
| Returns a reference to the dim element at a specified position. | |
| const_reference | operator[] (size_type) const |
| Returns a reference to the dim element at a specified position. | |
| reference | w () |
| Returns a reference to the first element in the dim. | |
| const_reference | w () const |
| Returns a reference to the first element in the dim. | |
| reference | h () |
| Returns a reference to the second element in the dim. | |
| const_reference | h () const |
| Returns a reference to the second element in the dim. | |
| reference | d () |
| Returns a reference to the third element in the dim. | |
| const_reference | d () const |
| Returns a reference to the third element in the dim. | |
| value_type | content () const |
| Returns the area/volume of the dimension. | |
| void | swap (object &) |
| Exchanges the elements of two dims. | |
Static Public Member Functions | |
| static object const | null () |
| Returns the dim filled with all zeroes. | |
| typedef const_pointer fcppt::math::dim::object< T, N, S >::const_iterator |
A type that provides a random-access iterator that can read a const element in a dim.
| typedef T const* fcppt::math::dim::object< T, N, S >::const_pointer |
A type that provides a pointer to a const element in a dim.
| typedef value_type const& fcppt::math::dim::object< T, N, S >::const_reference |
A type that provides a reference to a const element stored in a dim for reading and performing const operations.
| typedef std::reverse_iterator<const_iterator> fcppt::math::dim::object< T, N, S >::const_reverse_iterator |
A type that provides a random-access iterator that can read any const element in the dim.
| typedef math::difference_type fcppt::math::dim::object< T, N, S >::difference_type |
A type that provides the difference between the addresses of two elements in a dim.
| typedef N fcppt::math::dim::object< T, N, S >::dim_wrapper |
A typedef for the N parameter.
| typedef pointer fcppt::math::dim::object< T, N, S >::iterator |
A type that provides a random-access iterator that can read or modify any element in a dim.
| typedef T* fcppt::math::dim::object< T, N, S >::pointer |
A type that provides a pointer to an element in a dim.
| typedef value_type& fcppt::math::dim::object< T, N, S >::reference |
A type that provides a reference to an element stored in a dim.
| typedef std::reverse_iterator<iterator> fcppt::math::dim::object< T, N, S >::reverse_iterator |
A type that provides a random-access iterator that can read or modify any element in a reversed dim.
| typedef math::size_type fcppt::math::dim::object< T, N, S >::size_type |
A type that counts the number of elements in a dim.
| typedef S fcppt::math::dim::object< T, N, S >::storage_type |
A typedef for the S parameter.
| typedef T fcppt::math::dim::object< T, N, S >::value_type |
A type that represents the data type stored in a dim.
| FCPPT_PP_PUSH_WARNING object< T, N, S >::object | ( | ) |
Construct an uninitialized dim.
|
explicit |
Construct a dim from a storage source.
| s | The storage source to copy from |
| object< T, N, S >::object | ( | object< T, N, S > const & | _other | ) |
Copy-construct the dim from another dim.
| FCPPT_PP_PUSH_WARNING object< T, N, S >::object | ( | object< T, N, OtherStorage > const & | _other | ) |
Create a dim from a dim with the same dimension and value type but different storage type.
| OtherStorage | The other dim's storage type |
| object< T, N, S >::object | ( | In | beg, |
| typename boost::enable_if< type_traits::is_iterator< In >, In >::type | end | ||
| ) |
Create a dim and fill it with the contents of the given range.
| In | a forward iterator pointing to elements of type T |
| beg | The beginning of the range |
| end | One past the end of the range |
| fcppt::math::dim::object< T, N, S >::value_type object< T, N, S >::content | ( | ) | const |
Returns the area/volume of the dimension.
This is equal to the product of all components of the dimension.
| fcppt::math::dim::object< T, N, S >::reference object< T, N, S >::d | ( | ) |
Returns a reference to the third element in the dim.
N <= 2 | fcppt::math::dim::object< T, N, S >::const_reference object< T, N, S >::d | ( | ) | const |
Returns a reference to the third element in the dim.
N <= 2 | fcppt::math::dim::object< T, N, S >::FCPPT_MATH_DETAIL_MAKE_VARIADIC_CONSTRUCTOR_DECL | ( | FCPPT_MATH_DIM_MAX_CTOR_PARAMS | , |
| object< T, N, S > | |||
| ) |
Copy the values from a different dim.
| fcppt::math::dim::object< T, N, S >::reference object< T, N, S >::h | ( | ) |
Returns a reference to the second element in the dim.
N <= 1 | fcppt::math::dim::object< T, N, S >::const_reference object< T, N, S >::h | ( | ) | const |
Returns a reference to the second element in the dim.
N <= 1
|
static |
Returns the dim filled with all zeroes.
| fcppt::math::dim::object< T, N, S > & object< T, N, S >::operator*= | ( | value_type const & | _value | ) |
Multiply a dim by a scalar.
| fcppt::math::dim::object< T, N, S > & object< T, N, S >::operator/= | ( | value_type const & | _value | ) |
Divide a dim by a scalar.
| FCPPT_PP_POP_WARNING fcppt::math::dim::object< T, N, S >::object FCPPT_PP_POP_WARNING fcppt::math::dim::object< T, N, S > & object< T, N, S >::operator= | ( | object< T, N, OtherStorage > const & | _other | ) |
Copy the values from a different dim.
| OtherStorage | The other dim's storage type |
| fcppt::math::dim::object< T, N, S >::reference object< T, N, S >::operator[] | ( | size_type | _index | ) |
Returns a reference to the dim element at a specified position.
| fcppt::math::dim::object< T, N, S >::const_reference object< T, N, S >::operator[] | ( | size_type | _index | ) | const |
Returns a reference to the dim element at a specified position.
| void object< T, N, S >::swap | ( | object< T, N, S > & | _other | ) |
Exchanges the elements of two dims.
| fcppt::math::dim::object< T, N, S >::reference object< T, N, S >::w | ( | ) |
Returns a reference to the first element in the dim.
| fcppt::math::dim::object< T, N, S >::const_reference object< T, N, S >::w | ( | ) | const |
Returns a reference to the first element in the dim.
1.8.2