#include <KeosVector2.h>
Public Member Functions | |
| CVector2 (T X=0, T Y=0) | |
| Default constructor. | |
| void | Set (T X, T Y) |
| Set vector. | |
| T | Length () const |
| Returns the length (magnitude) of the vector (sqrt(x² + y²)). | |
| T | LengthSq () const |
| Returns the square of the length(magnitude) of the vector (x² + y²). | |
| void | Normalize () |
| Normalizes the vector. | |
| CVector2< T > | operator+ () const |
| CVector2< T > | operator- () const |
| CVector2< T > | operator+ (const CVector2< T > &v) const |
| CVector2< T > | operator- (const CVector2< T > &v) const |
| const CVector2< T > & | operator+= (const CVector2< T > &v) |
| const CVector2< T > & | operator-= (const CVector2< T > &v) |
| CVector2< T > | operator * (T t) const |
| CVector2< T > | operator/ (T t) const |
| const CVector2< T > & | operator *= (T t) |
| const CVector2< T > & | operator/= (T t) |
| bool | operator== (const CVector2< T > &v) const |
| bool | operator!= (const CVector2< T > &v) const |
| operator T * () | |
| T* cast operator. | |
Public Attributes | |
| T | x |
| T | y |
Definition at line 34 of file KeosVector2.h.
| Keos::CVector2< T >::CVector2 | ( | T | X = 0, |
|
| T | Y = 0 | |||
| ) | [inline] |
| void Keos::CVector2< T >::Set | ( | T | X, | |
| T | Y | |||
| ) | [inline] |
Set vector.
Definition at line 113 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
Referenced by Keos::CRectangle::Set().
| T Keos::CVector2< T >::Length | ( | ) | const [inline] |
Returns the length (magnitude) of the vector (sqrt(x² + y²)).
Definition at line 121 of file KeosVector2.h.
References Keos::CVector2< T >::LengthSq().
Referenced by Keos::CVector2< T >::Normalize().
| T Keos::CVector2< T >::LengthSq | ( | ) | const [inline] |
Returns the square of the length(magnitude) of the vector (x² + y²).
Definition at line 128 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
Referenced by Keos::CVector2< T >::Length().
| void Keos::CVector2< T >::Normalize | ( | ) | [inline] |
Normalizes the vector.
Definition at line 135 of file KeosVector2.h.
References Keos::CVector2< T >::Length(), Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| CVector2< T > Keos::CVector2< T >::operator+ | ( | ) | const [inline] |
Definition at line 148 of file KeosVector2.h.
| CVector2< T > Keos::CVector2< T >::operator- | ( | ) | const [inline] |
Definition at line 155 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| CVector2< T > Keos::CVector2< T >::operator+ | ( | const CVector2< T > & | v | ) | const [inline] |
Definition at line 162 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| CVector2< T > Keos::CVector2< T >::operator- | ( | const CVector2< T > & | v | ) | const [inline] |
Definition at line 169 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| const CVector2< T > & Keos::CVector2< T >::operator+= | ( | const CVector2< T > & | v | ) | [inline] |
Definition at line 176 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| const CVector2< T > & Keos::CVector2< T >::operator-= | ( | const CVector2< T > & | v | ) | [inline] |
Definition at line 186 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| CVector2< T > Keos::CVector2< T >::operator * | ( | T | t | ) | const [inline] |
Definition at line 196 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| CVector2< T > Keos::CVector2< T >::operator/ | ( | T | t | ) | const [inline] |
Definition at line 203 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| const CVector2< T > & Keos::CVector2< T >::operator *= | ( | T | t | ) | [inline] |
Definition at line 210 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| const CVector2< T > & Keos::CVector2< T >::operator/= | ( | T | t | ) | [inline] |
Definition at line 220 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| bool Keos::CVector2< T >::operator== | ( | const CVector2< T > & | v | ) | const [inline] |
Definition at line 230 of file KeosVector2.h.
References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.
| bool Keos::CVector2< T >::operator!= | ( | const CVector2< T > & | v | ) | const [inline] |
Definition at line 238 of file KeosVector2.h.
| Keos::CVector2< T >::operator T * | ( | ) | [inline] |
T* cast operator.
Definition at line 245 of file KeosVector2.h.
References Keos::CVector2< T >::x.
| T Keos::CVector2< T >::x |
Definition at line 83 of file KeosVector2.h.
Referenced by Keos::CGraphicString::Align(), Keos::Console::CLookDefault::CLookDefault(), Keos::CImage::CopyImage(), Keos::COGLRenderSystem::CreateTexture(), Keos::CD3D9RenderSystem::CreateTexture(), Keos::CImage::Flip(), Keos::CImage::GetPixel(), Keos::CFontManager::GetStringPixelSize(), Keos::CRectangle::Intersects(), Keos::CRectangle::Left(), Keos::CVector2< T >::LengthSq(), Keos::CImage::Mirror(), Keos::CVector2< T >::Normalize(), Keos::CVector2< T >::operator *(), Keos::CVector2< T >::operator *=(), Keos::CVector2< T >::operator T *(), Keos::CVector2< T >::operator+(), Keos::CVector2< T >::operator+=(), Keos::CVector2< T >::operator-(), Keos::CVector2< T >::operator-=(), Keos::CVector2< T >::operator/(), Keos::CVector2< T >::operator/=(), Keos::CVector2< T >::operator==(), Keos::operator>>(), Keos::CRectangle::Right(), Keos::CImagesLoader::SaveToFile(), Keos::CVector2< T >::Set(), Keos::CShader::SetParameter(), Keos::CImage::SetPixel(), Keos::CImage::SubImage(), Keos::VectorDot(), and Keos::CRectangle::Width().
| T Keos::CVector2< T >::y |
Definition at line 83 of file KeosVector2.h.
Referenced by Keos::CGraphicString::Align(), Keos::CRectangle::Bottom(), Keos::Console::CLookDefault::CLookDefault(), Keos::CImage::CopyImage(), Keos::COGLRenderSystem::CreateTexture(), Keos::CD3D9RenderSystem::CreateTexture(), Keos::CImage::Flip(), Keos::CFontManager::GetStringPixelSize(), Keos::CRectangle::Height(), Keos::CRectangle::Intersects(), Keos::CVector2< T >::LengthSq(), Keos::CImage::Mirror(), Keos::CVector2< T >::Normalize(), Keos::CVector2< T >::operator *(), Keos::CVector2< T >::operator *=(), Keos::CVector2< T >::operator+(), Keos::CVector2< T >::operator+=(), Keos::CVector2< T >::operator-(), Keos::CVector2< T >::operator-=(), Keos::CVector2< T >::operator/(), Keos::CVector2< T >::operator/=(), Keos::CVector2< T >::operator==(), Keos::operator>>(), Keos::CImagesLoader::SaveToFile(), Keos::CVector2< T >::Set(), Keos::CShader::SetParameter(), Keos::CImage::SubImage(), Keos::CRectangle::Top(), and Keos::VectorDot().
1.5.1-p1