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