3D integer vector. More...
#include <Vec3i.h>
Public Member Functions | |
Vec3i () | |
Construct 0 vector. | |
Vec3i (int _a, int _b, int _c) | |
Construct a 3D integer vector. | |
Vec3i (int a) | |
Construct a 3D integer vector with 3 identical coordinates. | |
Vec3i (const Vec3f &v) | |
Construct from a Vec3f. | |
Vec3i (const Vec3d &v) | |
Construct from a Vec3f. | |
Vec3i (const Vec3uc &v) | |
Construct from a Vec3uc. | |
Vec3i (const Vec3usi &v) | |
Construct from a Vec3usi. | |
![]() | |
ArithVec3Int (inta, intb, intc) | |
Construct a 3D int vector. | |
ArithVec3Int () | |
Construct a 3D int vector. | |
![]() | |
ArithVecInt (inta) | |
ArithVecInt (inta, intb) | |
ArithVecInt (inta, intb, intc) | |
ArithVecInt (inta, intb, intc, intd) | |
![]() | |
void | set (int_a, int_b) |
Set all coordinates of a 2D vector. | |
void | set (int_a, int_b, int_c) |
Set all coordinates of a 3D vector. | |
void | set (int_a, int_b, int_c, int_d) |
Set all coordinates of a 4D vector. | |
const int & | operator[] (unsigned int i) const |
Const index operator. | |
int & | operator[] (unsigned int i) |
Non-const index operator. | |
const int & | operator() (unsigned int i) const |
Const index operator. | |
int & | operator() (unsigned int i) |
Non-const index operator. | |
int * | get () |
const int * | get () const |
bool | operator== (const Vec3i &v) const |
Equality operator. | |
bool | operator== (intk) const |
Equality wrt scalar. True if all coords are equal to scalar. | |
bool | operator!= (const Vec3i &v) const |
Inequality operator. | |
bool | operator!= (intk) const |
Inequality wrt scalar. True if any coord not equal to scalar. | |
bool | all_l (const Vec3i &v) const |
bool | all_le (const Vec3i &v) const |
bool | all_g (const Vec3i &v) const |
bool | all_ge (const Vec3i &v) const |
const Vec3i & | operator*= (intk) |
Assignment multiplication with scalar. | |
const Vec3i & | operator*= (const Vec3i &v) |
const Vec3i & | operator/= (intk) |
Assignment division with scalar. | |
const Vec3i & | operator/= (const Vec3i &v) |
Assigment division with vector. Each coord divided independently. | |
const Vec3i & | operator+= (intk) |
Assignment addition with scalar. Adds scalar to each coordinate. | |
const Vec3i & | operator+= (const Vec3i &v) |
Assignmment addition with vector. | |
const Vec3i & | operator-= (intk) |
Assignment subtraction with scalar. Subtracts scalar from each coord. | |
const Vec3i & | operator-= (const Vec3i &v) |
Assignment subtraction with vector. | |
const Vec3i | operator- () const |
Negate vector. | |
const Vec3i | operator- (const Vec3i &v1) const |
Subtract two vectors. | |
const Vec3i | operator* (const Vec3i &v1) const |
const Vec3i | operator* (intk) const |
Multiply scalar onto vector. | |
const Vec3i | operator+ (const Vec3i &v1) const |
Add two vectors. | |
const Vec3i | operator/ (const Vec3i &v1) const |
Divide two vectors. Each coord separately. | |
const Vec3i | operator/ (intk) const |
Divide vector by scalar. | |
const int | min_coord () const |
Return the smallest coordinate of the vector. | |
const int | max_coord () const |
Return the largest coordinate of the vector. | |
Additional Inherited Members | |
![]() | |
typedef int | ScalarType |
For convenience we define a more meaningful name for the scalar type. | |
typedef Vec3i | VectorType |
A more meaningful name for vector type. | |
![]() | |
static unsigned int | get_dim () |
Return dimension of vector. | |
![]() | |
ArithVec () | |
Construct uninitialized vector. | |
ArithVec (int_a) | |
Construct a vector where all coordinates are identical. | |
ArithVec (int_a, int_b) | |
Construct a 2D vector. | |
ArithVec (int_a, int_b, int_c) | |
Construct a 3D vector. | |
ArithVec (int_a, int_b, int_c, int_d) | |
Construct a 4D vector. | |
![]() | |
int | data [N] |
The actual contents of the vector. | |
3D integer vector.
This class does not really extend the template and hence provides only the basic facilities of an ArithVec. The class is typically used for indices to 3D voxel grids.