Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::ScreenPoint Class Reference

#include <vecmath.h>

List of all members.

Public Member Functions

 ScreenPoint ()
 ScreenPoint (const ScreenPoint &p)
 ScreenPoint (int _x, int _y)
ScreenPointoperator= (const ScreenPoint &a)
const int & operator[] (int n) const
int & operator[] (int n)
ScreenPointoperator+= (const ScreenVector &v)
ScreenPointoperator-= (const ScreenVector &v)
ScreenPointoperator *= (int s)
ScreenPoint operator+ (const ScreenVector &v) const
ScreenVector operator- (const ScreenPoint &p) const
ScreenPoint operator- (const ScreenVector &v) const
bool operator== (const ScreenPoint &p) const
bool operator!= (const ScreenPoint &p) const
void print () const

Private Attributes

int x
int y


Constructor & Destructor Documentation

EMAN::ScreenPoint::ScreenPoint  )  [inline]
 

Definition at line 145 of file vecmath.h.

References x, and y.

00145 : x(0), y(0) {}

EMAN::ScreenPoint::ScreenPoint const ScreenPoint p  )  [inline]
 

Definition at line 146 of file vecmath.h.

References x, and y.

00146 : x(p[0]), y(p[1]) {}

EMAN::ScreenPoint::ScreenPoint int  _x,
int  _y
[inline]
 

Definition at line 147 of file vecmath.h.

References x, and y.

00147 : x(_x), y(_y) {}


Member Function Documentation

ScreenPoint& EMAN::ScreenPoint::operator *= int  s  )  [inline]
 

Definition at line 167 of file vecmath.h.

References x, and y.

00167                                            {
00168                 x *= s; y *= s;
00169                 return *this;
00170             }

bool EMAN::ScreenPoint::operator!= const ScreenPoint p  )  const [inline]
 

Definition at line 188 of file vecmath.h.

References x, x, y, and y.

00188                                                           {
00189                 return x != p.x || y != p.y;
00190             }

ScreenPoint EMAN::ScreenPoint::operator+ const ScreenVector v  )  const [inline]
 

Definition at line 172 of file vecmath.h.

References v, x, and y.

00172                                                                {
00173                 return ScreenPoint( x + v[0], y + v[1] );
00174             }

ScreenPoint& EMAN::ScreenPoint::operator+= const ScreenVector v  )  [inline]
 

Definition at line 157 of file vecmath.h.

References v, x, and y.

00157                                                            {
00158                 x += v[0]; y += v[1];
00159                 return *this;
00160             }

ScreenPoint EMAN::ScreenPoint::operator- const ScreenVector v  )  const [inline]
 

Definition at line 180 of file vecmath.h.

References v, x, and y.

00180                                                                {
00181                 return ScreenPoint( x - v[0], y - v[1] );
00182             }

ScreenVector EMAN::ScreenPoint::operator- const ScreenPoint p  )  const [inline]
 

Definition at line 176 of file vecmath.h.

References x, x, y, and y.

00176                                                                {
00177                 return ScreenVector( x - p.x, y - p.y );
00178             }

ScreenPoint& EMAN::ScreenPoint::operator-= const ScreenVector v  )  [inline]
 

Definition at line 162 of file vecmath.h.

References v, x, and y.

00162                                                            {
00163                 x -= v[0]; y -= v[1];
00164                 return *this;
00165             }

ScreenPoint& EMAN::ScreenPoint::operator= const ScreenPoint a  )  [inline]
 

Definition at line 149 of file vecmath.h.

References x, and y.

00149                                                          {
00150                 x = a[0]; y = a[1];
00151                 return *this;
00152             }

bool EMAN::ScreenPoint::operator== const ScreenPoint p  )  const [inline]
 

Definition at line 184 of file vecmath.h.

References x, x, y, and y.

00184                                                           {
00185                 return x == p.x && y == p.y;
00186             }

int& EMAN::ScreenPoint::operator[] int  n  )  [inline]
 

Definition at line 155 of file vecmath.h.

00155 { return (&x)[n]; }

const int& EMAN::ScreenPoint::operator[] int  n  )  const [inline]
 

Definition at line 154 of file vecmath.h.

00154 { return (&x)[n]; }

void EMAN::ScreenPoint::print  )  const [inline]
 

Definition at line 192 of file vecmath.h.

References x, and y.

00192                                {
00193                 std::cout << "(" << x << ", " << y << ")";
00194             }


Member Data Documentation

int EMAN::ScreenPoint::x [private]
 

Definition at line 197 of file vecmath.h.

Referenced by operator!=(), operator-(), and operator==().

int EMAN::ScreenPoint::y [private]
 

Definition at line 197 of file vecmath.h.

Referenced by operator!=(), operator-(), and operator==().


The documentation for this class was generated from the following file:
Generated on Tue Jun 11 13:43:15 2013 for EMAN2 by  doxygen 1.3.9.1