#include <point3i.H>
Descriptive interface | |
| typedef int | value_type |
| static int | dim () |
Public Member Functions | |
Constructors | |
| Point3i () | |
| Default constructor. Creates a point at the origin. | |
| Point3i (int x, int y, int z) | |
| Constructor that creates a point with the components given in the arguments. | |
| Point3i (int *v) | |
| Constructor that creates a point with the values from a 3-element array. | |
Element Access Functions | |
| const int * | data () const |
| Returns the components as a 3-element array of integers. | |
| int | operator[] (int index) const |
| int & | operator[] (int index) |
Overloaded Arithmetic Operators | |
| Point3i | operator+ (Cpoint3i &p) const |
| Point3i | operator- () const |
| void | operator+= (Cpoint3i &p) |
| void | operator-= (Cpoint3i &p) |
Point Property Queries | |
| double | length () const |
| int | length_sqrd () const |
Two Point Operations | |
| int | dist_sqrd (Cpoint3i &p) const |
| Computes the distance squared between two points. | |
| double | dist (Cpoint3i &p) const |
| Computes the distance between two points. | |
Overloaded Comparison Operators | |
| int | operator== (Cpoint3i &p) const |
| Are the two points exactly equal? | |
| int | operator!= (Cpoint3i &p) const |
| Are the two points not equal? | |
Protected Attributes | |
| int | _x |
| int | _y |
| int | _z |
Friends | |
Overloaded Stream Operators | |
| ostream & | operator<< (ostream &os, const Point3i &p) |
| Stream insertion operator for the Point3i class. | |
Related Functions | |
| (Note that these are not member functions.) | |
| typedef const Point3i | Cpoint3i |
| Shortcut for const Point3i. | |
Definition at line 27 of file point3i.H.
|
|
|
|
|
Default constructor. Creates a point at the origin.
Definition at line 40 of file point3i.H. Referenced by operator+(), and operator-(). |
|
||||||||||||||||
|
Constructor that creates a point with the components given in the arguments.
|
|
|
Constructor that creates a point with the values from a 3-element array.
|
|
|
Returns the components as a 3-element array of integers.
Definition at line 67 of file point3i.H. References _x. |
|
|
|
|
|
Computes the distance between two points.
Definition at line 110 of file point3i.H. References dist_sqrd(). |
|
|
Computes the distance squared between two points.
Definition at line 104 of file point3i.H. Referenced by dist(). |
|
|
|
|
|
|
|
|
Are the two points not equal?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Are the two points exactly equal?
|
|
|
Definition at line 70 of file point3i.H. References _x. |
|
|
Definition at line 69 of file point3i.H. References _x. |
|
|
Shortcut for const Point3i.
|
|
||||||||||||
|
Stream insertion operator for the Point3i class.
|
|
|
Definition at line 32 of file point3i.H. Referenced by data(), dist_sqrd(), length(), length_sqrd(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator==(), and operator[](). |
|
|
Definition at line 32 of file point3i.H. Referenced by dist_sqrd(), length(), length_sqrd(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), and operator==(). |
|
|
Definition at line 32 of file point3i.H. Referenced by dist_sqrd(), length(), length_sqrd(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), and operator==(). |
1.4.4