2D Integer vector. More...
#include <Vec2ui.h>
Public Member Functions | |
| Vec2ui () | |
| Construct 0 vector. | |
| Vec2ui (unsigned int _a) | |
| Construct 2D int vector. | |
| Vec2ui (unsigned int _a, unsigned int _b) | |
| Construct 2D int vector. | |
| Vec2ui (const Vec2f &v) | |
| Convert from 2D float vector. | |
Public Member Functions inherited from CGLA::ArithVec< unsigned int, Vec2ui, 2 > | |
| void | set (unsigned int_a, unsigned int_b) |
| Set all coordinates of a 2D vector. | |
| void | set (unsigned int_a, unsigned int_b, unsigned int_c) |
| Set all coordinates of a 3D vector. | |
| void | set (unsigned int_a, unsigned int_b, unsigned int_c, unsigned int_d) |
| Set all coordinates of a 4D vector. | |
| const unsigned int & | operator[] (unsigned int i) const |
| Const index operator. | |
| unsigned int & | operator[] (unsigned int i) |
| Non-const index operator. | |
| const unsigned int & | operator() (unsigned int i) const |
| Const index operator. | |
| unsigned int & | operator() (unsigned int i) |
| Non-const index operator. | |
| unsigned int * | get () |
| const unsigned int * | get () const |
| bool | operator== (const Vec2ui &v) const |
| Equality operator. | |
| bool | operator== (unsigned intk) const |
| Equality wrt scalar. True if all coords are equal to scalar. | |
| bool | operator!= (const Vec2ui &v) const |
| Inequality operator. | |
| bool | operator!= (unsigned intk) const |
| Inequality wrt scalar. True if any coord not equal to scalar. | |
| bool | all_l (const Vec2ui &v) const |
| bool | all_le (const Vec2ui &v) const |
| bool | all_g (const Vec2ui &v) const |
| bool | all_ge (const Vec2ui &v) const |
| const Vec2ui & | operator*= (unsigned intk) |
| Assignment multiplication with scalar. | |
| const Vec2ui & | operator*= (const Vec2ui &v) |
| const Vec2ui & | operator/= (unsigned intk) |
| Assignment division with scalar. | |
| const Vec2ui & | operator/= (const Vec2ui &v) |
| Assigment division with vector. Each coord divided independently. | |
| const Vec2ui & | operator+= (unsigned intk) |
| Assignment addition with scalar. Adds scalar to each coordinate. | |
| const Vec2ui & | operator+= (const Vec2ui &v) |
| Assignmment addition with vector. | |
| const Vec2ui & | operator-= (unsigned intk) |
| Assignment subtraction with scalar. Subtracts scalar from each coord. | |
| const Vec2ui & | operator-= (const Vec2ui &v) |
| Assignment subtraction with vector. | |
| const Vec2ui | operator- () const |
| Negate vector. | |
| const Vec2ui | operator- (const Vec2ui &v1) const |
| Subtract two vectors. | |
| const Vec2ui | operator* (const Vec2ui &v1) const |
| const Vec2ui | operator* (unsigned intk) const |
| Multiply scalar onto vector. | |
| const Vec2ui | operator+ (const Vec2ui &v1) const |
| Add two vectors. | |
| const Vec2ui | operator/ (const Vec2ui &v1) const |
| Divide two vectors. Each coord separately. | |
| const Vec2ui | operator/ (unsigned intk) const |
| Divide vector by scalar. | |
| const unsigned int | min_coord () const |
| Return the smallest coordinate of the vector. | |
| const unsigned int | max_coord () const |
| Return the largest coordinate of the vector. | |
Additional Inherited Members | |
Public Types inherited from CGLA::ArithVec< unsigned int, Vec2ui, 2 > | |
| typedef unsigned int | ScalarType |
| For convenience we define a more meaningful name for the scalar type. | |
| typedef Vec2ui | VectorType |
| A more meaningful name for vector type. | |
Static Public Member Functions inherited from CGLA::ArithVec< unsigned int, Vec2ui, 2 > | |
| static unsigned int | get_dim () |
| Return dimension of vector. | |
Protected Member Functions inherited from CGLA::ArithVec< unsigned int, Vec2ui, 2 > | |
| ArithVec () | |
| Construct uninitialized vector. | |
| ArithVec (unsigned int_a) | |
| Construct a vector where all coordinates are identical. | |
| ArithVec (unsigned int_a, unsigned int_b) | |
| Construct a 2D vector. | |
| ArithVec (unsigned int_a, unsigned int_b, unsigned int_c) | |
| Construct a 3D vector. | |
| ArithVec (unsigned int_a, unsigned int_b, unsigned int_c, unsigned int_d) | |
| Construct a 4D vector. | |
Protected Attributes inherited from CGLA::ArithVec< unsigned int, Vec2ui, 2 > | |
| unsigned int | data [N] |
| The actual contents of the vector. | |
2D Integer vector.
1.8.6