Core 1.0
|
Point in three dimensions with integer coordinates. More...
#include <ivector.h>
Public Member Functions | |
QPoint3 () | |
Empty. | |
QPoint3 (int) | |
Create a vector with the same coordinates. More... | |
QPoint3 (int, int, int) | |
Create a vector with argument coordinates. More... | |
int & | operator[] (int) |
Gets the i-th coordinate of vector. | |
int | operator[] (int) const |
Returns the i-th coordinate of vector. | |
QPoint3 | operator+ () const |
Overloaded. | |
QPoint3 | operator- () const |
Overloaded. | |
QPoint3 & | operator+= (const QPoint3 &) |
Destructive addition. | |
QPoint3 & | operator-= (const QPoint3 &) |
Destructive subtraction. | |
QPoint3 & | operator*= (int) |
Destructive scalar multiply. | |
QPoint3 | Next (int) const |
Return the k-th point in the 1-neighborhood of the point. More... | |
QString | ToString () const |
Create a QString form a integer vector. More... | |
Static Public Attributes | |
static const QPoint3 | next [26] |
% Array of 26 QPoint3 representing the offsets of the 1-neighborhood points of a QPoint3. | |
Protected Attributes | |
int | c [3] = { 0,0,0 } |
Integer coordinates. | |
Friends | |
QPoint3 | operator+ (const QPoint3 &, const QPoint3 &) |
Destructively scale a vector by another vector. More... | |
QPoint3 | operator- (const QPoint3 &, const QPoint3 &) |
Difference between two vectors. | |
bool | operator== (const QPoint3 &, const QPoint3 &) |
Strong equality test. | |
bool | operator!= (const QPoint3 &, const QPoint3 &) |
Strong difference test. | |
std::ostream & | operator<< (std::ostream &, const QPoint3 &) |
Overloaded output-stream operator. More... | |
Point in three dimensions with integer coordinates.
This class completes the QPoint class from Qt.
|
inline |
Create a vector with the same coordinates.
a | Integer. |
|
inline |
Create a vector with argument coordinates.
a,b,c | Coordinates. |
|
inline |
Return the k-th point in the 1-neighborhood of the point.
k | Index. |
QString QPoint3::ToString | ( | ) | const |
Create a QString form a integer vector.
n | Number of digits. |
Destructively scale a vector by another vector.
Adds up two vectors.