CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Math::TSize2< T > Struct Template Reference

A structure that contains width and height values. More...

#include <CeresEngine/Math/Rect.hpp>

Public Member Functions

 TSize2 ()=default
 
 TSize2 (T width, T height)
 
 TSize2 (const TVector2< T > &vec)
 
 operator TVector2< T > () const
 
TSize2 transform (const TMatrix3< T > &matrix) const
 Transforms the size by the given matrix.
 

Public Attributes

width = 0.0
 A width value.
 
height = 0.0
 A height value.
 

Friends

bool operator== (const TSize2 &lhs, const TSize2 &rhs)
 
bool operator!= (const TSize2 &lhs, const TSize2 &rhs)
 
TSize2 operator+ (const TSize2 &lhs, const TSize2 &rhs)
 
TSize2 operator+ (const TSize2 &lhs, T rhs)
 
TSize2 operator- (const TSize2 &lhs, const TSize2 &rhs)
 
TSize2 operator- (const TSize2 &lhs, T rhs)
 
TSize2 operator* (const TSize2 &lhs, T rhs)
 
TSize2 operator/ (const TSize2 &lhs, T rhs)
 

Detailed Description

template<typename T>
struct Math::TSize2< T >

A structure that contains width and height values.

Constructor & Destructor Documentation

◆ TSize2() [1/3]

template<typename T >
Math::TSize2< T >::TSize2 ( )
default

◆ TSize2() [2/3]

template<typename T >
Math::TSize2< T >::TSize2 ( width,
height 
)
inline

◆ TSize2() [3/3]

template<typename T >
Math::TSize2< T >::TSize2 ( const TVector2< T > &  vec)
inlineexplicit

Member Function Documentation

◆ operator TVector2< T >()

template<typename T >
Math::TSize2< T >::operator TVector2< T > ( ) const
inlineexplicit

◆ transform()

template<typename T >
TSize2 Math::TSize2< T >::transform ( const TMatrix3< T > &  matrix) const

Transforms the size by the given matrix.

Resulting value is an scaled size.

Friends And Related Symbol Documentation

◆ operator!=

template<typename T >
bool operator!= ( const TSize2< T > &  lhs,
const TSize2< T > &  rhs 
)
friend

◆ operator*

template<typename T >
TSize2 operator* ( const TSize2< T > &  lhs,
rhs 
)
friend

◆ operator+ [1/2]

template<typename T >
TSize2 operator+ ( const TSize2< T > &  lhs,
const TSize2< T > &  rhs 
)
friend

◆ operator+ [2/2]

template<typename T >
TSize2 operator+ ( const TSize2< T > &  lhs,
rhs 
)
friend

◆ operator- [1/2]

template<typename T >
TSize2 operator- ( const TSize2< T > &  lhs,
const TSize2< T > &  rhs 
)
friend

◆ operator- [2/2]

template<typename T >
TSize2 operator- ( const TSize2< T > &  lhs,
rhs 
)
friend

◆ operator/

template<typename T >
TSize2 operator/ ( const TSize2< T > &  lhs,
rhs 
)
friend

◆ operator==

template<typename T >
bool operator== ( const TSize2< T > &  lhs,
const TSize2< T > &  rhs 
)
friend

Member Data Documentation

◆ height

template<typename T >
T Math::TSize2< T >::height = 0.0

A height value.

◆ width

template<typename T >
T Math::TSize2< T >::width = 0.0

A width value.


The documentation for this struct was generated from the following file: