4D integer vector. More...
#include <Vec4i.h>
Public Member Functions | |
| Vec4i () | |
| Construct 0 vector. | |
| Vec4i (int _a, int _b, int _c, int _d) | |
| Construct a 4D integer vector. | |
| Vec4i (int a) | |
| Construct a 4D integer vector with 4 identical coordinates. | |
| Vec4i (const Vec4f &v) | |
| Construct from a Vec4f. | |
| Vec4i (const Vec4uc &v) | |
| Construct from a Vec4uc. | |
| Vec4i (const Vec4usi &v) | |
| Construct from a Vec4usi. | |
Public Member Functions inherited from CGLA::ArithVec4Int< int, Vec4i > | |
| ArithVec4Int (inta, intb, intc, intd) | |
| Construct a 4D int vector. | |
| ArithVec4Int () | |
| Construct a 4D int vector. | |
Public Member Functions inherited from CGLA::ArithVecInt< int, Vec4i, 4 > | |
| ArithVecInt (inta) | |
| ArithVecInt (inta, intb) | |
| ArithVecInt (inta, intb, intc) | |
| ArithVecInt (inta, intb, intc, intd) | |
Public Member Functions inherited from CGLA::ArithVec< int, Vec4i, N > | |
| 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 Vec4i &v) const |
| Equality operator. | |
| bool | operator== (intk) const |
| Equality wrt scalar. True if all coords are equal to scalar. | |
| bool | operator!= (const Vec4i &v) const |
| Inequality operator. | |
| bool | operator!= (intk) const |
| Inequality wrt scalar. True if any coord not equal to scalar. | |
| bool | all_l (const Vec4i &v) const |
| bool | all_le (const Vec4i &v) const |
| bool | all_g (const Vec4i &v) const |
| bool | all_ge (const Vec4i &v) const |
| const Vec4i & | operator*= (intk) |
| Assignment multiplication with scalar. | |
| const Vec4i & | operator*= (const Vec4i &v) |
| const Vec4i & | operator/= (intk) |
| Assignment division with scalar. | |
| const Vec4i & | operator/= (const Vec4i &v) |
| Assigment division with vector. Each coord divided independently. | |
| const Vec4i & | operator+= (intk) |
| Assignment addition with scalar. Adds scalar to each coordinate. | |
| const Vec4i & | operator+= (const Vec4i &v) |
| Assignmment addition with vector. | |
| const Vec4i & | operator-= (intk) |
| Assignment subtraction with scalar. Subtracts scalar from each coord. | |
| const Vec4i & | operator-= (const Vec4i &v) |
| Assignment subtraction with vector. | |
| const Vec4i | operator- () const |
| Negate vector. | |
| const Vec4i | operator- (const Vec4i &v1) const |
| Subtract two vectors. | |
| const Vec4i | operator* (const Vec4i &v1) const |
| const Vec4i | operator* (intk) const |
| Multiply scalar onto vector. | |
| const Vec4i | operator+ (const Vec4i &v1) const |
| Add two vectors. | |
| const Vec4i | operator/ (const Vec4i &v1) const |
| Divide two vectors. Each coord separately. | |
| const Vec4i | 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 | |
Public Types inherited from CGLA::ArithVec< int, Vec4i, N > | |
| typedef int | ScalarType |
| For convenience we define a more meaningful name for the scalar type. | |
| typedef Vec4i | VectorType |
| A more meaningful name for vector type. | |
Static Public Member Functions inherited from CGLA::ArithVec< int, Vec4i, N > | |
| static unsigned int | get_dim () |
| Return dimension of vector. | |
Protected Member Functions inherited from CGLA::ArithVec< int, Vec4i, N > | |
| 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. | |
Protected Attributes inherited from CGLA::ArithVec< int, Vec4i, N > | |
| int | data [N] |
| The actual contents of the vector. | |
4D 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 4D voxel grids.
1.8.6