Castor3D 0.17.0
Multiplatform 3D engine
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
castor::SpeedT< ValueT, DurationT, TraitsT > Class Template Reference

A speed. More...

#include <Speed.hpp>

Inheritance diagram for castor::SpeedT< ValueT, DurationT, TraitsT >:
Inheritance graph
[legend]

Public Types

using duration_type = DurationT
 
using value_type = ValueT
 

Public Member Functions

 SpeedT ()=default
 
constexpr SpeedT (ValueT const &value)
 
template<typename ValueU , typename DurationU >
 SpeedT (SpeedT< ValueU, DurationU > const &rhs)
 
template<typename ValueU , typename DurationU >
SpeedToperator= (SpeedT< ValueU, DurationU > const &rhs)
 
template<typename DurationU >
ValueT getDistance (DurationU const &duration) const
 
ValueT const & getValue () const noexcept
 
SpeedT operator- () const noexcept
 
template<typename ValueU >
SpeedToperator+= (ValueU const &rhs) noexcept
 
template<typename ValueU >
SpeedToperator-= (ValueU const &rhs) noexcept
 
template<typename ValueU >
SpeedToperator*= (ValueU const &rhs) noexcept
 
template<typename ValueU >
SpeedToperator/= (ValueU const &rhs) noexcept
 

Static Public Member Functions

template<typename DurationU >
static double getDurationRatioFrom ()
 
template<typename DurationU >
static double getDurationRatioTo ()
 

Static Public Attributes

static DurationT constexpr Zero { 0u }
 
static DurationT constexpr Unit { 1u }
 

Friends

template<typename ValueU , typename DurationU , typename TraitsU >
class SpeedT
 

Detailed Description

template<typename ValueT, typename DurationT, typename TraitsT>
class castor::SpeedT< ValueT, DurationT, TraitsT >

A speed.

Member Typedef Documentation

◆ duration_type

template<typename ValueT , typename DurationT , typename TraitsT >
using castor::SpeedT< ValueT, DurationT, TraitsT >::duration_type = DurationT

◆ value_type

template<typename ValueT , typename DurationT , typename TraitsT >
using castor::SpeedT< ValueT, DurationT, TraitsT >::value_type = ValueT

Constructor & Destructor Documentation

◆ SpeedT() [1/3]

template<typename ValueT , typename DurationT , typename TraitsT >
castor::SpeedT< ValueT, DurationT, TraitsT >::SpeedT ( )
default

◆ SpeedT() [2/3]

template<typename ValueT , typename DurationT , typename TraitsT >
constexpr castor::SpeedT< ValueT, DurationT, TraitsT >::SpeedT ( ValueT const & value)
inlineexplicitconstexpr

◆ SpeedT() [3/3]

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename ValueU , typename DurationU >
castor::SpeedT< ValueT, DurationT, TraitsT >::SpeedT ( SpeedT< ValueU, DurationU > const & rhs)
inlineexplicit

Member Function Documentation

◆ getDistance()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename DurationU >
ValueT castor::SpeedT< ValueT, DurationT, TraitsT >::getDistance ( DurationU const & duration) const
inline

◆ getDurationRatioFrom()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename DurationU >
static double castor::SpeedT< ValueT, DurationT, TraitsT >::getDurationRatioFrom ( )
inlinestatic

◆ getDurationRatioTo()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename DurationU >
static double castor::SpeedT< ValueT, DurationT, TraitsT >::getDurationRatioTo ( )
inlinestatic

◆ getValue()

template<typename ValueT , typename DurationT , typename TraitsT >
ValueT const & castor::SpeedT< ValueT, DurationT, TraitsT >::getValue ( ) const
inlinenoexcept

◆ operator*=()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename ValueU >
SpeedT & castor::SpeedT< ValueT, DurationT, TraitsT >::operator*= ( ValueU const & rhs)
inlinenoexcept

◆ operator+=()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename ValueU >
SpeedT & castor::SpeedT< ValueT, DurationT, TraitsT >::operator+= ( ValueU const & rhs)
inlinenoexcept

◆ operator-()

template<typename ValueT , typename DurationT , typename TraitsT >
SpeedT castor::SpeedT< ValueT, DurationT, TraitsT >::operator- ( ) const
inlinenoexcept

◆ operator-=()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename ValueU >
SpeedT & castor::SpeedT< ValueT, DurationT, TraitsT >::operator-= ( ValueU const & rhs)
inlinenoexcept

◆ operator/=()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename ValueU >
SpeedT & castor::SpeedT< ValueT, DurationT, TraitsT >::operator/= ( ValueU const & rhs)
inlinenoexcept

◆ operator=()

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename ValueU , typename DurationU >
SpeedT & castor::SpeedT< ValueT, DurationT, TraitsT >::operator= ( SpeedT< ValueU, DurationU > const & rhs)
inline

Friends And Related Symbol Documentation

◆ SpeedT

template<typename ValueT , typename DurationT , typename TraitsT >
template<typename ValueU , typename DurationU , typename TraitsU >
friend class SpeedT
friend

Member Data Documentation

◆ Unit

template<typename ValueT , typename DurationT , typename TraitsT >
DurationT constexpr castor::SpeedT< ValueT, DurationT, TraitsT >::Unit { 1u }
staticconstexpr

◆ Zero

template<typename ValueT , typename DurationT , typename TraitsT >
DurationT constexpr castor::SpeedT< ValueT, DurationT, TraitsT >::Zero { 0u }
staticconstexpr

The documentation for this class was generated from the following files: