Gorgon Game Engine
Size.h File Reference

contains the Size class More...

Include dependency graph for Size.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  basic_Size< T_ >
 This class represents a 2D geometric size. More...
 

Namespaces

 Gorgon
 Root namespace for Gorgon Game Engine.
 
 Gorgon::Geometry
 This namespace contains geometric element classes.
 

Typedefs

using Size = basic_Size< int >
 
using Sizef = basic_Size< Float >
 

Functions

template<class T_ >
basic_Size< T_ > Combine (const basic_Size< T_ > &l, const basic_Size< T_ > &r)
 Returns the minimum required size that can hold both size objects. More...
 
template<class T_ , class O_ >
auto operator* (const basic_Point< T_ > &l, const basic_Size< O_ > &r) -> basic_Point< decltype(l.X *r.Width)>
 Allows multiplication of point with a size object. More...
 
template<class T_ >
basic_Size< T_ > operator* (const basic_Size< T_ > &size, double factor)
 Multiplies a size with a scalar, effectively resizing it. More...
 
template<class T_ >
basic_Size< T_ > operator* (double factor, const basic_Size< T_ > &size)
 Multiplies a size with a scalar, effectively resizing it. More...
 
template<class T_ , class O_ >
auto operator/ (const basic_Point< T_ > &l, const basic_Size< O_ > &r) -> basic_Point< decltype(l.X *r.Width)>
 Allows division of point with a size object. More...
 
template<class T_ >
basic_Size< T_ > operator/ (const basic_Size< T_ > &size, double factor)
 Divides a size with a scalar, effectively resizing it. More...
 
template<class T_ >
basic_Size< T_ > operator/ (double factor, const basic_Size< T_ > &size)
 Divides a size with a scalar, effectively resizing it. More...
 
template<class T_ >
std::istream & operator>> (std::istream &in, basic_Size< T_ > &size)
 Reads a size object from a stream. More...
 
template<class T_ , class O_ >
void Scale (basic_Point< T_ > &point, const basic_Size< O_ > &size)
 Scales the given point by the given factor. More...
 
template<class T_ , class O_ >
void Scale (basic_Size< T_ > &l, const basic_Size< O_ > &size)
 Scales the given l by the given factor. More...
 
template<class T_ , class O1_ , class O2_ >
void Scale (basic_Size< T_ > &l, const O1_ &sizex, const O2_ &sizey)
 Scales the given size by the given factors for x and y coordinates. More...
 
template<class T_ , class O_ >
void Scale (basic_Size< T_ > &l, const O_ &size)
 Scales the given size by the given factor. More...
 
template<class T_ >
basic_Size< T_ > Union (const basic_Size< T_ > &l, const basic_Size< T_ > &r)
 Returns the maximum size that can fit into both size objects. More...
 

Detailed Description

contains the Size class