Unsigned short int 3D vector class. More...
#include <Vec3usi.h>
Public Member Functions | |
Vec3usi () | |
Construct 0 vector. | |
Vec3usi (USInt _a, USInt _b, USInt _c) | |
Construct a Vec3usi. | |
Vec3usi (const Vec3i &v) | |
Construct a Vec3usi from a Vec3i. | |
![]() | |
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 Vec3usi &v) const |
Equality operator. | |
bool | operator== (intk) const |
Equality wrt scalar. True if all coords are equal to scalar. | |
bool | operator!= (const Vec3usi &v) const |
Inequality operator. | |
bool | operator!= (intk) const |
Inequality wrt scalar. True if any coord not equal to scalar. | |
bool | all_l (const Vec3usi &v) const |
bool | all_le (const Vec3usi &v) const |
bool | all_g (const Vec3usi &v) const |
bool | all_ge (const Vec3usi &v) const |
const Vec3usi & | operator*= (intk) |
Assignment multiplication with scalar. | |
const Vec3usi & | operator*= (const Vec3usi &v) |
const Vec3usi & | operator/= (intk) |
Assignment division with scalar. | |
const Vec3usi & | operator/= (const Vec3usi &v) |
Assigment division with vector. Each coord divided independently. | |
const Vec3usi & | operator+= (intk) |
Assignment addition with scalar. Adds scalar to each coordinate. | |
const Vec3usi & | operator+= (const Vec3usi &v) |
Assignmment addition with vector. | |
const Vec3usi & | operator-= (intk) |
Assignment subtraction with scalar. Subtracts scalar from each coord. | |
const Vec3usi & | operator-= (const Vec3usi &v) |
Assignment subtraction with vector. | |
const Vec3usi | operator- () const |
Negate vector. | |
const Vec3usi | operator- (const Vec3usi &v1) const |
Subtract two vectors. | |
const Vec3usi | operator* (const Vec3usi &v1) const |
const Vec3usi | operator* (intk) const |
Multiply scalar onto vector. | |
const Vec3usi | operator+ (const Vec3usi &v1) const |
Add two vectors. | |
const Vec3usi | operator/ (const Vec3usi &v1) const |
Divide two vectors. Each coord separately. | |
const Vec3usi | 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 Vec3usi | 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. | |
Unsigned short int 3D vector class.
This class is mainly useful if we need a 3D int vector that takes up less room than a Vec3i but holds larger numbers than a Vec3c.