Pyrogenesis trunk
Public Member Functions | Public Attributes | List of all members
CVector2D Class Reference

#include <Vector2D.h>

Public Member Functions

 CVector2D ()
 
 CVector2D (float x, float y)
 
 CVector2D (const CSize2D &size)
 
 operator float * ()
 
 operator const float * () const
 
bool operator== (const CVector2D &v) const
 
bool operator!= (const CVector2D &v) const
 
CVector2D operator- () const
 
CVector2D operator+ (const CVector2D &t) const
 
CVector2D operator- (const CVector2D &t) const
 
CVector2D operator* (float f) const
 
CVector2D operator/ (float f) const
 
CVector2Doperator+= (const CVector2D &t)
 
CVector2Doperator-= (const CVector2D &t)
 
CVector2Doperator*= (float f)
 
CVector2Doperator/= (float f)
 
float Dot (const CVector2D &a) const
 
float LengthSquared () const
 
float Length () const
 
void Normalize ()
 
CVector2D Normalized () const
 
CVector2D Rotated (float angle) const
 Returns a version of this vector rotated counterclockwise by angle radians. More...
 
void Rotate (float angle)
 Rotates this vector counterclockwise by angle radians. More...
 
CVector2D operator+ (const CSize2D &size) const
 
CVector2D operator- (const CSize2D &size) const
 
void operator+= (const CSize2D &size)
 
void operator-= (const CSize2D &size)
 
PS::span< const float > AsFloatArray () const
 

Public Attributes

float X
 
float Y
 

Constructor & Destructor Documentation

◆ CVector2D() [1/3]

CVector2D::CVector2D ( )
inline

◆ CVector2D() [2/3]

CVector2D::CVector2D ( float  x,
float  y 
)
inline

◆ CVector2D() [3/3]

CVector2D::CVector2D ( const CSize2D size)

Member Function Documentation

◆ AsFloatArray()

PS::span< const float > CVector2D::AsFloatArray ( ) const
inline

◆ Dot()

float CVector2D::Dot ( const CVector2D a) const
inline

◆ Length()

float CVector2D::Length ( ) const
inline

◆ LengthSquared()

float CVector2D::LengthSquared ( ) const
inline

◆ Normalize()

void CVector2D::Normalize ( )
inline

◆ Normalized()

CVector2D CVector2D::Normalized ( ) const
inline

◆ operator const float *()

CVector2D::operator const float * ( ) const
inline

◆ operator float *()

CVector2D::operator float * ( )
inline

◆ operator!=()

bool CVector2D::operator!= ( const CVector2D v) const

◆ operator*()

CVector2D CVector2D::operator* ( float  f) const
inline

◆ operator*=()

CVector2D & CVector2D::operator*= ( float  f)
inline

◆ operator+() [1/2]

CVector2D CVector2D::operator+ ( const CSize2D size) const

◆ operator+() [2/2]

CVector2D CVector2D::operator+ ( const CVector2D t) const
inline

◆ operator+=() [1/2]

void CVector2D::operator+= ( const CSize2D size)

◆ operator+=() [2/2]

CVector2D & CVector2D::operator+= ( const CVector2D t)
inline

◆ operator-() [1/3]

CVector2D CVector2D::operator- ( ) const
inline

◆ operator-() [2/3]

CVector2D CVector2D::operator- ( const CSize2D size) const

◆ operator-() [3/3]

CVector2D CVector2D::operator- ( const CVector2D t) const
inline

◆ operator-=() [1/2]

void CVector2D::operator-= ( const CSize2D size)

◆ operator-=() [2/2]

CVector2D & CVector2D::operator-= ( const CVector2D t)
inline

◆ operator/()

CVector2D CVector2D::operator/ ( float  f) const
inline

◆ operator/=()

CVector2D & CVector2D::operator/= ( float  f)
inline

◆ operator==()

bool CVector2D::operator== ( const CVector2D v) const

◆ Rotate()

void CVector2D::Rotate ( float  angle)
inline

Rotates this vector counterclockwise by angle radians.

◆ Rotated()

CVector2D CVector2D::Rotated ( float  angle) const
inline

Returns a version of this vector rotated counterclockwise by angle radians.

Member Data Documentation

◆ X

float CVector2D::X

◆ Y

float CVector2D::Y

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