Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::Maths::TRect Class Template Reference

#include <Rect.h>

Inheritance diagram for Teddy::Maths::TRect:

Inheritance graph
[legend]
Collaboration diagram for Teddy::Maths::TRect:

Collaboration graph
[legend]
List of all members.

Public Methods

 TRect ()
 TRect (const TVector2< int > &a, const TVector2< int > &b)
 TRect (const TVector2< float > &a, const TVector2< float > &b)
 TRect (const TVector2< double > &a, const TVector2< double > &b)
 TRect (const TRect< int > &r)
 TRect (const TRect< float > &r)
 TRect (const TRect< double > &r)
TVector2< T > getSize () const
getArea () const
void setSize (const TVector2< T > &size)
const TRect & intersect (const TRect &a)
TRect grow (const TVector2< T > v)
TRect shrink (const TVector2< T > v)
bool hit (const TVector2< T > v) const
const TRect & setPosition (const TVector2< T > &pos)
const TRect & move (const TVector2< T > &v)
const TRect & operator+= (const TVector2< T > &v)
TRect operator+ (const TVector2< T > &v) const
const TRect & operator-= (const TVector2< T > &v)
TRect operator- (const TVector2< T > &v) const

Public Attributes

TVector2< T > min
TVector2< T > max

Private Methods

 TRect ()
 TRect (const TVector2< T > &a, const TVector2< T > &b)
TRect intersection (const TRect &a)
bool hit (const TVector2< T > v)

Private Attributes

TVector2< T > min
TVector2< T > max

template<typename T>
class Teddy::Maths::TRect< T >


Constructor & Destructor Documentation

template<typename T>
Teddy::Maths::TRect< T >::TRect   [inline]
 

Definition at line 49 of file Rect.h.

Referenced by Teddy::Maths::TRect< int >::grow, Teddy::Maths::TRect< int >::intersect, Teddy::Maths::TRect< int >::intersection, Teddy::Maths::TRect< int >::move, Teddy::Maths::TRect< int >::operator+, Teddy::Maths::TRect< int >::operator+=, Teddy::Maths::TRect< int >::operator-, Teddy::Maths::TRect< int >::operator-=, Teddy::Maths::TRect< int >::setPosition, and Teddy::Maths::TRect< int >::shrink.

template<typename T>
Teddy::Maths::TRect< T >::TRect const TVector2< int > &    a,
const TVector2< int > &    b
[inline]
 

Definition at line 54 of file Rect.h.

template<typename T>
Teddy::Maths::TRect< T >::TRect const TVector2< float > &    a,
const TVector2< float > &    b
[inline]
 

Definition at line 58 of file Rect.h.

template<typename T>
Teddy::Maths::TRect< T >::TRect const TVector2< double > &    a,
const TVector2< double > &    b
[inline]
 

Definition at line 62 of file Rect.h.

template<typename T>
Teddy::Maths::TRect< T >::TRect const TRect< int > &    r [inline]
 

Definition at line 66 of file Rect.h.

template<typename T>
Teddy::Maths::TRect< T >::TRect const TRect< float > &    r [inline]
 

Definition at line 70 of file Rect.h.

template<typename T>
Teddy::Maths::TRect< T >::TRect const TRect< double > &    r [inline]
 

Definition at line 74 of file Rect.h.

template<typename T>
Teddy::Maths::TRect< T >::TRect   [inline, private]
 

Definition at line 50 of file Rectangle.h.

template<typename T>
Teddy::Maths::TRect< T >::TRect const TVector2< T > &    a,
const TVector2< T > &    b
[inline, private]
 

Definition at line 51 of file Rectangle.h.


Member Function Documentation

template<typename T>
T Teddy::Maths::TRect< T >::getArea   const [inline]
 

Definition at line 87 of file Rect.h.

template<typename T>
TVector2<T> Teddy::Maths::TRect< T >::getSize   const [inline]
 

Definition at line 79 of file Rect.h.

template<typename T>
TRect Teddy::Maths::TRect< T >::grow const TVector2< T >    v [inline]
 

Definition at line 102 of file Rect.h.

template<typename T>
bool Teddy::Maths::TRect< T >::hit const TVector2< T >    v [inline, private]
 

Definition at line 69 of file Rectangle.h.

template<typename T>
bool Teddy::Maths::TRect< T >::hit const TVector2< T >    v const [inline]
 

Definition at line 110 of file Rect.h.

template<typename T>
const TRect& Teddy::Maths::TRect< T >::intersect const TRect< T > &    a [inline]
 

Definition at line 96 of file Rect.h.

template<typename T>
TRect Teddy::Maths::TRect< T >::intersection const TRect< T > &    a [inline, private]
 

Definition at line 56 of file Rectangle.h.

template<typename T>
const TRect& Teddy::Maths::TRect< T >::move const TVector2< T > &    v [inline]
 

Definition at line 124 of file Rect.h.

Referenced by Teddy::Maths::TRect< int >::setPosition.

template<typename T>
TRect Teddy::Maths::TRect< T >::operator+ const TVector2< T > &    v const [inline]
 

Definition at line 126 of file Rect.h.

template<typename T>
const TRect& Teddy::Maths::TRect< T >::operator+= const TVector2< T > &    v [inline]
 

Definition at line 125 of file Rect.h.

template<typename T>
TRect Teddy::Maths::TRect< T >::operator- const TVector2< T > &    v const [inline]
 

Definition at line 128 of file Rect.h.

template<typename T>
const TRect& Teddy::Maths::TRect< T >::operator-= const TVector2< T > &    v [inline]
 

Definition at line 127 of file Rect.h.

template<typename T>
const TRect& Teddy::Maths::TRect< T >::setPosition const TVector2< T > &    pos [inline]
 

Definition at line 118 of file Rect.h.

template<typename T>
void Teddy::Maths::TRect< T >::setSize const TVector2< T > &    size [inline]
 

Definition at line 92 of file Rect.h.

template<typename T>
TRect Teddy::Maths::TRect< T >::shrink const TVector2< T >    v [inline]
 

Definition at line 106 of file Rect.h.


Member Data Documentation

template<typename T>
TVector2<T> Teddy::Maths::TRect::max [private]
 

Definition at line 48 of file Rectangle.h.

template<typename T>
TVector2<T> Teddy::Maths::TRect::max
 

Definition at line 47 of file Rect.h.

Referenced by Teddy::Maths::TRect< int >::getArea, Teddy::Maths::TRect< int >::getSize, Teddy::Maths::TRect< int >::grow, Teddy::Maths::TRect< int >::hit, Teddy::Maths::TRect< int >::intersect, Teddy::Maths::TRect< int >::intersection, Teddy::Maths::TRect< int >::move, Teddy::Maths::TRect< int >::operator+, Teddy::Maths::TRect< int >::operator+=, Teddy::Maths::TRect< int >::operator-, Teddy::Maths::TRect< int >::operator-=, Teddy::Maths::TRect< int >::setSize, Teddy::Maths::TRect< int >::shrink, and Teddy::Maths::TRect< int >::TRect.

template<typename T>
TVector2<T> Teddy::Maths::TRect::min [private]
 

Definition at line 47 of file Rectangle.h.

template<typename T>
TVector2<T> Teddy::Maths::TRect::min
 

Definition at line 46 of file Rect.h.

Referenced by Teddy::Maths::TRect< int >::getArea, Teddy::Maths::TRect< int >::getSize, Teddy::Maths::TRect< int >::grow, Teddy::Maths::TRect< int >::hit, Teddy::Maths::TRect< int >::intersect, Teddy::Maths::TRect< int >::intersection, Teddy::Maths::TRect< int >::move, Teddy::Maths::TRect< int >::operator+, Teddy::Maths::TRect< int >::operator+=, Teddy::Maths::TRect< int >::operator-, Teddy::Maths::TRect< int >::operator-=, Teddy::Maths::TRect< int >::setPosition, Teddy::Maths::TRect< int >::setSize, Teddy::Maths::TRect< int >::shrink, and Teddy::Maths::TRect< int >::TRect.


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