27#include <Inventor/SbBasic.h>
28#include <Inventor/system/inttypes.h>
30#include <Inventor/errors/SoDebugError.h>
40 SbVec2us(
const unsigned short v[2]) { vec[0] = v[0]; vec[1] = v[1]; }
41 SbVec2us(
unsigned short x,
unsigned short y) { vec[0] = x; vec[1] = y; }
46 SbVec2us &
setValue(
const unsigned short v[2]) { vec[0] = v[0]; vec[1] = v[1];
return *
this; }
47 SbVec2us &
setValue(
unsigned short x,
unsigned short y) { vec[0] = x; vec[1] = y;
return *
this; }
52 const unsigned short *
getValue(
void)
const {
return vec; }
53 void getValue(
unsigned short & x,
unsigned short & y)
const { x = vec[0]; y = vec[1]; }
58 int32_t
dot(
SbVec2us v)
const {
return vec[0] * v[0] + vec[1] * v[1]; }
63 SbVec2us &
operator /= (
int d) { SbDividerChk(
"SbVec2us::operator/=(int)", d); vec[0] /= d; vec[1] /= d;
return *
this; }
70 unsigned short vec[2];
91 SbDividerChk(
"operator/(SbVec2us,int)", d);
96 SbDividerChk(
"operator/(SbVec2us,double)", d);
109 return ((
v1[0] ==
v2[0]) && (
v1[1] ==
v2[1]));
The SbList class is a template container class for lists.
Definition SbList.h:47
Type operator[](const int index) const
Definition SbList.h:172
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition SbVec2s.h:37
The SbVec2ub class is a 2 dimensional vector with unsigned 8-bit integer coordinates.
Definition SbVec2ub.h:37
The SbVec2ub class is a 2 dimensional vector with unsigned 32-bit integer coordinates.
Definition SbVec2ui32.h:37
The SbVec2us class is a 2 dimensional vector with unsigned short integer coordinates.
Definition SbVec2us.h:37
SbVec2us(const unsigned short v[2])
Definition SbVec2us.h:40
SbVec2us & setValue(unsigned short x, unsigned short y)
Definition SbVec2us.h:47
SbVec2us(void)
Definition SbVec2us.h:39
int32_t dot(SbVec2us v) const
Definition SbVec2us.h:58
SbVec2us(const SbVec2ub &v)
Definition SbVec2us.h:43
SbVec2us(const SbVec2ui32 &v)
Definition SbVec2us.h:44
const unsigned short * getValue(void) const
Definition SbVec2us.h:52
SbVec2us(const SbVec2s &v)
Definition SbVec2us.h:42
void negate(void)
Definition SbVec2us.cpp:88
SbVec2us(unsigned short x, unsigned short y)
Definition SbVec2us.h:41
void getValue(unsigned short &x, unsigned short &y) const
Definition SbVec2us.h:53
SbVec2us & setValue(const unsigned short v[2])
Definition SbVec2us.h:46