34 Vec3ui() { _v[0]=0; _v[1]=0; _v[2]=0; }
36 Vec3ui(value_type
r, value_type
g, value_type
b) { _v[0]=
r; _v[1]=
g; _v[2]=
b; }
42 if (_v[0]<v.
_v[0])
return true;
43 else if (_v[0]>v.
_v[0])
return false;
44 else if (_v[1]<v.
_v[1])
return true;
45 else if (_v[1]>v.
_v[1])
return false;
46 else return (_v[2]<v.
_v[2]);
49 inline value_type*
ptr() {
return _v; }
50 inline const value_type*
ptr()
const {
return _v; }
52 inline void set(value_type
r, value_type
g, value_type
b)
54 _v[0]=
r; _v[1]=
g; _v[2]=
b;
59 _v[0]=rhs.
_v[0]; _v[1]=rhs.
_v[1]; _v[2]=rhs.
_v[2];
62 inline value_type&
operator [] (
unsigned int i) {
return _v[i]; }
63 inline value_type
operator [] (
unsigned int i)
const {
return _v[i]; }
65 inline value_type&
x() {
return _v[0]; }
66 inline value_type&
y() {
return _v[1]; }
67 inline value_type&
z() {
return _v[2]; }
69 inline value_type
x()
const {
return _v[0]; }
70 inline value_type
y()
const {
return _v[1]; }
71 inline value_type
z()
const {
return _v[2]; }
73 inline value_type&
r() {
return _v[0]; }
74 inline value_type&
g() {
return _v[1]; }
75 inline value_type&
b() {
return _v[2]; }
77 inline value_type
r()
const {
return _v[0]; }
78 inline value_type
g()
const {
return _v[1]; }
79 inline value_type
b()
const {
return _v[2]; }
84 return Vec3ui(_v[0]*rhs, _v[1]*rhs, _v[2]*rhs);
89 return Vec3ui(_v[0]/rhs, _v[1]/rhs, _v[2]/rhs);
94 return Vec3ui(_v[0]+rhs, _v[1]+rhs, _v[2]+rhs);
99 return Vec3ui(_v[0]-rhs, _v[1]-rhs, _v[2]-rhs);
104 return Vec3ui(_v[0]+rhs.
_v[0], _v[1]+rhs.
_v[1], _v[2]+rhs.
_v[2]);
109 return Vec3ui(_v[0]-rhs.
_v[0], _v[1]-rhs.
_v[1], _v[2]-rhs.
_v[2]);
114 return Vec3ui(_v[0]*rhs.
_v[0], _v[1]*rhs.
_v[1], _v[2]*rhs.
_v[2]);
Vec3ui operator+(value_type rhs) const
bool operator!=(const Vec3ui &v) const
const value_type * ptr() const
void set(const Vec3ui &rhs)
Vec3ui operator-(value_type rhs) const
Vec3ui(value_type r, value_type g, value_type b)
Vec3ui operator/(value_type rhs) const
value_type & operator[](unsigned int i)
Vec3ui operator*(value_type rhs) const
void set(value_type r, value_type g, value_type b)
bool operator<(const Vec3ui &v) const
bool operator==(const Vec3ui &v) const