27#include <Inventor/SbBasic.h>
28#include <Inventor/system/inttypes.h>
30#include <Inventor/errors/SoDebugError.h>
40 SbVec2b(
const int8_t v[2]) { vec[0] = v[0]; vec[1] = v[1]; }
41 SbVec2b(int8_t x, int8_t y) { vec[0] = x; vec[1] = y; }
46 SbVec2b &
setValue(
const int8_t v[2]) { vec[0] = v[0]; vec[1] = v[1];
return *
this; }
52 const int8_t *
getValue(
void)
const {
return vec; }
53 void getValue(int8_t & x, int8_t & y)
const { x = vec[0]; y = vec[1]; }
58 int32_t
dot(
SbVec2b v)
const {
return vec[0] * v[0] + vec[1] * v[1]; }
59 void negate(
void) { vec[0] = -vec[0]; vec[1] = -vec[1]; }
63 SbVec2b &
operator /= (
int d) { SbDividerChk(
"SbVec2b::operator/=(int)", d); vec[0] /= d; vec[1] /= d;
return *
this; }
91 SbDividerChk(
"operator/(SbVec2b,int)", d);
96 SbDividerChk(
"operator/(SbVec2b,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
SbList(const int sizehint=DEFAULTSIZE)
Definition SbList.h:55
Type operator[](const int index) const
Definition SbList.h:172
The SbVec2b class is a 2 dimensional vector with 8-bit integer coordinates.
Definition SbVec2b.h:37
int32_t dot(SbVec2b v) const
Definition SbVec2b.h:58
SbVec2b(const int8_t v[2])
Definition SbVec2b.h:40
SbVec2b(const SbVec2ub &v)
Definition SbVec2b.h:42
const int8_t * getValue(void) const
Definition SbVec2b.h:52
SbVec2b & setValue(int8_t x, int8_t y)
Definition SbVec2b.h:47
void negate(void)
Definition SbVec2b.h:59
SbVec2b(int8_t x, int8_t y)
Definition SbVec2b.h:41
SbVec2b(void)
Definition SbVec2b.h:39
SbVec2b & setValue(const int8_t v[2])
Definition SbVec2b.h:46
SbVec2b(const SbVec2i32 &v)
Definition SbVec2b.h:44
void getValue(int8_t &x, int8_t &y) const
Definition SbVec2b.h:53
SbVec2b(const SbVec2s &v)
Definition SbVec2b.h:43
The SbVec2i32 class is a 2 dimensional vector with 32-bit integer coordinates.
Definition SbVec2i32.h:39
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