#include <vecmath.h>
Public Member Functions | |
| ScreenVector () | |
| ScreenVector (const ScreenVector &v) | |
| ScreenVector (int _x, int _y) | |
| ScreenVector & | operator= (const ScreenVector &a) |
| const int & | operator[] (int n) const |
| int & | operator[] (int n) |
| ScreenVector & | operator+= (const ScreenVector &a) |
| ScreenVector & | operator-= (const ScreenVector &a) |
| ScreenVector & | operator *= (int s) |
| ScreenVector | operator- () const |
| ScreenVector | operator+ () const |
| ScreenVector | operator+ (const ScreenVector &v) const |
| ScreenVector | operator- (const ScreenVector &v) const |
| ScreenVector | operator * (const double s) const |
| int | operator * (const ScreenVector &v) const |
| double | length () const |
| int | lengthSquared () const |
| bool | operator== (const ScreenVector &v) const |
| bool | operator!= (const ScreenVector &v) const |
| void | print () const |
Private Attributes | |
| int | x |
| int | y |
|
|
Definition at line 57 of file vecmath.h.
|
|
|
Definition at line 58 of file vecmath.h.
|
|
||||||||||||
|
Definition at line 59 of file vecmath.h.
|
|
|
Definition at line 109 of file vecmath.h. 00109 {
00110 return (double) sqrt( (double) (x * x + y * y) );
00111 }
|
|
|
Definition at line 113 of file vecmath.h.
|
|
|
Definition at line 105 of file vecmath.h.
|
|
|
Definition at line 100 of file vecmath.h. 00100 {
00101 return ScreenVector( (int)(x * s), (int)(y * s) );
00102 }
|
|
|
Definition at line 79 of file vecmath.h.
|
|
|
Definition at line 121 of file vecmath.h.
|
|
|
Definition at line 92 of file vecmath.h. 00092 {
00093 return ScreenVector( x + v.x, y + v.y );
00094 }
|
|
|
Definition at line 88 of file vecmath.h. 00088 {
00089 return *this;
00090 }
|
|
|
Definition at line 69 of file vecmath.h.
|
|
|
Definition at line 96 of file vecmath.h. 00096 {
00097 return ScreenVector( x - v.x, y - v.y );
00098 }
|
|
|
Definition at line 84 of file vecmath.h. 00084 {
00085 return ScreenVector(-x, -y);
00086 }
|
|
|
Definition at line 74 of file vecmath.h.
|
|
|
Definition at line 61 of file vecmath.h.
|
|
|
Definition at line 117 of file vecmath.h.
|
|
|
Definition at line 67 of file vecmath.h. 00067 { return (&x)[n]; }
|
|
|
Definition at line 66 of file vecmath.h. 00066 { return (&x)[n]; }
|
|
|
Definition at line 125 of file vecmath.h.
|
|
|
Definition at line 130 of file vecmath.h. Referenced by operator *(), operator!=(), operator+(), operator-(), and operator==(). |
|
|
Definition at line 130 of file vecmath.h. Referenced by operator *(), operator!=(), operator+(), operator-(), and operator==(). |
1.3.9.1