Public Member Functions | Protected Attributes
CVec2 Class Reference

#include <vec2.h>

Inheritance diagram for CVec2:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CVec2 ()
 CVec2 (double x, double y)
 CVec2 (const CVec2 &vec)
double dot (const CVec2 &vec) const
bool equal (CVec2 vec) const
double getAngle (const CVec2 &vec) const
CVec2 getNormal () const
CVec2 getNormalized () const
double magnitude () const
CVec2makePerp ()
CVec2normalize ()
CVec2 operator* (double num) const
double operator* (const CVec2 &vVector) const
CVec2operator*= (double num)
CVec2 operator+ (const CVec2 &vVector) const
CVec2 operator- (const CVec2 &vVector) const
CVec2 operator- () const
CVec2 operator/ (double num) const
CVec2operator/= (double num)
double operator[] (unsigned int i) const
double & operator[] (unsigned int i)
CVec2 rotate (float angle) const
void set (double fx, double fy)
double sqr () const
std::string toString () const
double x () const
double y () const

Protected Attributes

double m_X
double m_Y

Detailed Description

Definition at line 18 of file vec2.h.


Constructor & Destructor Documentation

CVec2::CVec2 ( ) [inline]

Definition at line 22 of file vec2.h.

CVec2::CVec2 ( double  x,
double  y 
) [inline]

Definition at line 27 of file vec2.h.

CVec2::CVec2 ( const CVec2 vec) [inline]

Definition at line 32 of file vec2.h.


Member Function Documentation

double CVec2::dot ( const CVec2 vec) const [inline]

Definition at line 141 of file vec2.h.

bool CVec2::equal ( CVec2  vec) const [inline]

Definition at line 159 of file vec2.h.

double CVec2::getAngle ( const CVec2 vec) const [inline]

Definition at line 146 of file vec2.h.

CVec2 CVec2::getNormal ( ) const [inline]

Definition at line 126 of file vec2.h.

CVec2 CVec2::getNormalized ( ) const [inline]

Definition at line 131 of file vec2.h.

double CVec2::magnitude ( ) const [inline]

Definition at line 82 of file vec2.h.

CVec2& CVec2::makePerp ( ) [inline]

Definition at line 118 of file vec2.h.

CVec2& CVec2::normalize ( ) [inline]

Definition at line 113 of file vec2.h.

CVec2 CVec2::operator* ( double  num) const [inline]

Definition at line 52 of file vec2.h.

double CVec2::operator* ( const CVec2 vVector) const [inline]

Definition at line 57 of file vec2.h.

CVec2& CVec2::operator*= ( double  num) [inline]

Definition at line 106 of file vec2.h.

CVec2 CVec2::operator+ ( const CVec2 vVector) const [inline]

Definition at line 37 of file vec2.h.

CVec2 CVec2::operator- ( const CVec2 vVector) const [inline]

Definition at line 42 of file vec2.h.

CVec2 CVec2::operator- ( ) const [inline]

Definition at line 47 of file vec2.h.

CVec2 CVec2::operator/ ( double  num) const [inline]

Definition at line 62 of file vec2.h.

CVec2& CVec2::operator/= ( double  num) [inline]

Definition at line 98 of file vec2.h.

double CVec2::operator[] ( unsigned int  i) const [inline]

Definition at line 88 of file vec2.h.

double& CVec2::operator[] ( unsigned int  i) [inline]

Definition at line 93 of file vec2.h.

CVec2 CVec2::rotate ( float  angle) const [inline]
Parameters:
angleRotation angle in radiants

Definition at line 152 of file vec2.h.

void CVec2::set ( double  fx,
double  fy 
) [inline]

Definition at line 67 of file vec2.h.

double CVec2::sqr ( ) const [inline]

Definition at line 136 of file vec2.h.

std::string CVec2::toString ( ) const [inline]

Returns the string representation of the vector.

Returns:
string representation of the point.

Reimplemented in Transformation2D.

Definition at line 168 of file vec2.h.

double CVec2::x ( ) const [inline]

Definition at line 72 of file vec2.h.

double CVec2::y ( ) const [inline]

Definition at line 77 of file vec2.h.


Member Data Documentation

double CVec2::m_X [protected]

Definition at line 176 of file vec2.h.

double CVec2::m_Y [protected]

Definition at line 176 of file vec2.h.


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


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09