Castor3D 0.16.0
Multiplatform 3D engine
|
Length helper class. More...
#include <Length.hpp>
Public Member Functions | |
LengthT (LengthUnit unit=LengthUnit::eMetre) noexcept | |
Default constructor. | |
TypeT | unit (LengthUnit u) const noexcept |
TypeT | kilometres () const noexcept |
TypeT | metres () const noexcept |
TypeT | centimetres () const noexcept |
TypeT | millimetres () const noexcept |
TypeT | yards () const noexcept |
TypeT | feet () const noexcept |
TypeT | inches () const noexcept |
void | kilometres (double value) noexcept |
void | metres (double value) noexcept |
void | centimetres (double value) noexcept |
void | millimetres (double value) noexcept |
void | yards (double value) noexcept |
void | feet (double value) noexcept |
void | inches (double value) noexcept |
operator TypeT const & () const noexcept | |
TypeT const & | value () const noexcept |
TypeT & | operator* () noexcept |
LengthUnit | lengthUnit () const noexcept |
Arithmetic operators. | |
LengthT< TypeT > & | operator= (TypeT const &rhs) noexcept |
LengthT< TypeT > & | operator- () noexcept |
LengthT< TypeT > & | operator+= (LengthT< TypeT > const &rhs) noexcept |
LengthT< TypeT > & | operator-= (LengthT< TypeT > const &rhs) noexcept |
LengthT< TypeT > & | operator+= (TypeT const &rhs) noexcept |
LengthT< TypeT > & | operator-= (TypeT const &rhs) noexcept |
LengthT< TypeT > & | operator*= (double rhs) noexcept |
LengthT< TypeT > & | operator/= (double rhs) noexcept |
Static Public Member Functions | |
template<typename TypeU > | |
static LengthT< TypeT > | fromUnit (TypeU value, LengthUnit unit) noexcept |
Named constructor, expressed in the specified unit. | |
template<typename TypeU > | |
static LengthT< TypeT > | fromKilometres (TypeU value) noexcept |
Named constructor, from kilometres. | |
template<typename TypeU > | |
static LengthT< TypeT > | fromMetres (TypeU value) noexcept |
Named constructor, from metres. | |
template<typename TypeU > | |
static LengthT< TypeT > | fromCentimetres (TypeU value) noexcept |
Named constructor, from centimetres. | |
template<typename TypeU > | |
static LengthT< TypeT > | fromMillimetres (TypeU value) noexcept |
Named constructor, from millimetres. | |
template<typename TypeU > | |
static LengthT< TypeT > | fromYards (TypeU value) noexcept |
Named constructor, from yards. | |
template<typename TypeU > | |
static LengthT< TypeT > | fromFeet (TypeU value) noexcept |
Named constructor, from feet. | |
template<typename TypeU > | |
static LengthT< TypeT > | fromInches (TypeU value) noexcept |
Named constructor, from inches. | |
Friends | |
template<typename TypeU > | |
bool | operator== (LengthT< TypeU > const &lhs, LengthT< TypeU > const &rhs) noexcept |
template<typename TypeU > | |
bool | operator< (LengthT< TypeU > const &lhs, LengthT< TypeU > const &rhs) noexcept |
template<typename TypeU > | |
bool | operator> (LengthT< TypeU > const &lhs, LengthT< TypeU > const &rhs) noexcept |
Length helper class.
|
explicitnoexcept |
Default constructor.
|
noexcept |
|
noexcept |
[in] | value | Length expressed in centimetres. |
|
noexcept |
|
noexcept |
[in] | value | Length expressed in feet. |
|
inlinestaticnoexcept |
Named constructor, from centimetres.
[in] | value | The value. |
References castor::eCentimetre, and castor::LengthT< TypeT >::value().
|
inlinestaticnoexcept |
Named constructor, from feet.
[in] | value | The value. |
References castor::eFoot, and castor::LengthT< TypeT >::value().
|
inlinestaticnoexcept |
Named constructor, from inches.
[in] | value | The value. |
References castor::eInch, and castor::LengthT< TypeT >::value().
|
inlinestaticnoexcept |
Named constructor, from kilometres.
[in] | value | The value. |
References castor::eKilometre, and castor::LengthT< TypeT >::value().
|
inlinestaticnoexcept |
Named constructor, from metres.
[in] | value | The value. |
References castor::eMetre, and castor::LengthT< TypeT >::value().
|
inlinestaticnoexcept |
Named constructor, from millimetres.
[in] | value | The value. |
References castor::eMillimetre, and castor::LengthT< TypeT >::value().
|
inlinestaticnoexcept |
Named constructor, expressed in the specified unit.
[in] | value | The value. |
[in] | unit | The length unit. |
References castor::LengthT< TypeT >::unit(), and castor::LengthT< TypeT >::value().
|
inlinestaticnoexcept |
Named constructor, from yards.
[in] | value | The value. |
References castor::eYard, and castor::LengthT< TypeT >::value().
|
noexcept |
|
noexcept |
[in] | value | Length expressed in inches. |
|
noexcept |
|
noexcept |
[in] | value | Length expressed in kilometres. |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
[in] | value | Length expressed in metres. |
|
noexcept |
|
noexcept |
[in] | value | Length expressed in millimetres. |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Referenced by castor::LengthT< TypeT >::fromUnit().
|
inlinenoexcept |
Referenced by castor::LengthT< TypeT >::fromCentimetres(), castor::LengthT< TypeT >::fromFeet(), castor::LengthT< TypeT >::fromInches(), castor::LengthT< TypeT >::fromKilometres(), castor::LengthT< TypeT >::fromMetres(), castor::LengthT< TypeT >::fromMillimetres(), castor::LengthT< TypeT >::fromUnit(), and castor::LengthT< TypeT >::fromYards().
|
noexcept |
|
noexcept |
[in] | value | Length expressed in yards. |
|
friend |
|
friend |
|
friend |