|
Core 1.0
|
Point in three dimensions with integer coordinates. More...
#include <ivector.h>
Public Member Functions | |
| Vec2I () | |
| Empty. | |
| Vec2I (int) | |
| Create a vector with the same coordinates. | |
| Vec2I (int, int) | |
| Create a vector with argument coordinates. | |
| Vec2I (const Vector2 &) | |
| Create a vector. | |
| int & | operator[] (int) |
| Gets the i-th coordinate of vector. | |
| constexpr int | operator[] (int) const |
| Returns the i-th coordinate of vector. | |
| Vec2I | operator+ () const |
| Overloaded. | |
| Vec2I | operator- () const |
| Overloaded. | |
| Vec2I & | operator+= (const Vec2I &) |
| Destructive addition. | |
| Vec2I & | operator-= (const Vec2I &) |
| Destructive subtraction. | |
| Vec2I & | operator*= (int) |
| Destructive scalar multiply. | |
| Vec2I | operator* (int) const |
| Multiply. | |
| Vec2I | operator>> (int) const |
| Shift. | |
| Vec2I | operator^ (const Vec2I &) const |
| Shift. | |
| QString | ToString () const |
| Create a QString form a integer vector. | |
Protected Attributes | |
| int | c [2] = { 0,0 } |
| Integer coordinates. | |
Friends | |
| Vec2I | operator+ (const Vec2I &u, const Vec2I &v) |
| Adds up two vectors. | |
| Vec2I | operator- (const Vec2I &u, const Vec2I &v) |
| Difference between two vectors. | |
| bool | operator== (const Vec2I &u, const Vec2I &v) |
| Strong equality test. | |
| bool | operator!= (const Vec2I &u, const Vec2I &v) |
| Strong difference test. | |
| std::ostream & | operator<< (std::ostream &s, const Vec2I &u) |
| Overloaded output-stream operator. | |
Point in three dimensions with integer coordinates.
|
inlineexplicit |
Create a vector with the same coordinates.
| a | Integer. |
|
inlineexplicit |
Create a vector with argument coordinates.
| a,b | Coordinates. |
|
inlineexplicit |
Create a vector.
| v | Vector. |