#include <point2i.H>
Descriptive interface | |
typedef int | value_type |
static int | dim () |
Public Member Functions | |
Constructors | |
Point2i () | |
Default Constructor. Creates a point at the origin. | |
Point2i (int xx, int yy) | |
Constructor that creates a point with the components specified in the arguments. | |
Element Access Functions | |
const int * | data () const |
Returns the components as a 2-element array of integers. | |
int | operator[] (int index) const |
int & | operator[] (int index) |
Overloaded Arithmetic Operators | |
Point2i | operator+ (Cpoint2i &p) const |
Point2i | operator+ (Cvec2i &v) const |
Vec2i | operator- (Cpoint2i &p) const |
Point2i | operator- (Cvec2i &v) const |
Point2i | operator- () const |
void | operator+= (Cpoint2i &p) |
void | operator+= (Cvec2i &v) |
void | operator-= (Cpoint2i &p) |
void | operator-= (Cvec2i &v) |
Point Property Queries | |
double | length () const |
int | length_sqrd () const |
Two Point Operations | |
int | dist_sqrd (Cpoint2i &p) const |
Computes the distance squared between two points. | |
double | dist (Cpoint2i &p) const |
Computes the distance between two points. | |
Overloaded Comparison Operators | |
int | operator== (Cpoint2i &p) const |
Are the two points exactly equal? | |
int | operator!= (Cpoint2i &p) const |
Are the two points not equal? | |
Protected Attributes | |
int | _x |
int | _y |
Friends | |
Overloaded Stream Operators | |
ostream & | operator<< (ostream &os, const Point2i &p) |
Stream insertion operator for Point2i class. | |
Related Functions | |
(Note that these are not member functions.) | |
typedef const Point2i | Cpoint2i |
Shortcut for const Point2i. |
Definition at line 145 of file point2i.H.
|
|
|
Default Constructor. Creates a point at the origin.
Definition at line 158 of file point2i.H. Referenced by operator+(), and operator-(). |
|
Constructor that creates a point with the components specified in the arguments.
|
|
Returns the components as a 2-element array of integers.
Definition at line 181 of file point2i.H. References _x. |
|
|
|
Computes the distance between two points.
Definition at line 219 of file point2i.H. References dist_sqrd(). Referenced by IDRefImage::search(). |
|
Computes the distance squared between two points.
Definition at line 216 of file point2i.H. Referenced by dist(). |
|
|
|
|
|
Are the two points not equal?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Are the two points exactly equal?
|
|
Definition at line 184 of file point2i.H. References _x. |
|
Definition at line 183 of file point2i.H. References _x. |
|
Shortcut for const Point2i.
|
|
Stream insertion operator for Point2i class.
|
|
Definition at line 150 of file point2i.H. Referenced by data(), dist_sqrd(), length(), length_sqrd(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator==(), and operator[](). |
|
Definition at line 150 of file point2i.H. Referenced by dist_sqrd(), length(), length_sqrd(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), and operator==(). |