49 SbVec2ub(
const uint8_t v[2]) { vec[0] = v[0]; vec[1] = v[1]; }
50 SbVec2ub(uint8_t x, uint8_t y) { vec[0] = x; vec[1] = y; }
55 SbVec2ub & setValue(
const uint8_t v[2]) { vec[0] = v[0]; vec[1] = v[1];
return *
this; }
56 SbVec2ub & setValue(uint8_t x, uint8_t y) { vec[0] = x; vec[1] = y;
return *
this; }
61 const uint8_t * getValue(
void)
const {
return vec; }
62 void getValue(uint8_t & x, uint8_t & y)
const { x = vec[0]; y = vec[1]; }
67 int32_t dot(
SbVec2ub v)
const {
return vec[0] * v[0] + vec[1] * v[1]; }
70 SbVec2ub &
operator *= (
int d) { vec[0] = uint8_t(vec[0] * d); vec[1] = uint8_t(vec[1] * d);
return *
this; }
72 SbVec2ub &
operator /= (
int d) { SbDividerChk(
"SbVec2ub::operator/=(int)", d); vec[0] = uint8_t(vec[0] / d); vec[1] = uint8_t(vec[1] / d);
return *
this; }