29 #include <Inventor/SbBasic.h> 
   30 #include <Inventor/system/inttypes.h> 
   32 #include <Inventor/errors/SoDebugError.h> 
   44   SbVec2s(
const short v[2]) { vec[0] = v[0]; vec[1] = v[1]; }
 
   45   SbVec2s(
short x, 
short y) { vec[0] = x; vec[1] = y; }
 
   52   SbVec2s & 
setValue(
const short v[2]) { vec[0] = v[0]; vec[1] = v[1]; 
return *
this; }
 
   60   const short * 
getValue(
void)
 const { 
return vec; }
 
   61   void getValue(
short & x, 
short & y)
 const { x = vec[0]; y = vec[1]; }
 
   63   short & operator [] (
int i) { 
return vec[i]; }
 
   64   const short & operator [] (
int i)
 const { 
return vec[i]; }
 
   66   int32_t 
dot(
SbVec2s v)
 const { 
return vec[0] * v[0] + vec[1] * v[1]; }
 
   67   void negate(
void) { vec[0] = -vec[0]; vec[1] = -vec[1]; }
 
   69   SbVec2s & operator *= (
int d) { vec[0] *= d; vec[1] *= d; 
return *
this; }
 
   70   SbVec2s & operator *= (
double d);
 
   71   SbVec2s & operator /= (
int d) { SbDividerChk(
"SbVec2s::operator/=(int)", d); vec[0] /= d; vec[1] /= d; 
return *
this; }
 
   72   SbVec2s & operator /= (
double d) { SbDividerChk(
"SbVec2s::operator/=(double)", d); 
return operator *= (1.0 / d); }
 
   73   SbVec2s & operator += (
SbVec2s v) { vec[0] += v[0]; vec[1] += v[1]; 
return *
this; }
 
   74   SbVec2s & operator -= (
SbVec2s v) { vec[0] -= v[0]; vec[1] -= v[1]; 
return *
this; }
 
   77   void print(FILE * fp) 
const;
 
   85   SbVec2s val(v); val *= d; 
return val;
 
   89   SbVec2s val(v); val *= d; 
return val;
 
   93   SbVec2s val(v); val *= d; 
return val;
 
   97   SbVec2s val(v); val *= d; 
return val;
 
  101   SbDividerChk(
"operator/(SbVec2s,int)", d);
 
  102   SbVec2s val(v); val /= d; 
return val;
 
  106   SbDividerChk(
"operator/(SbVec2s,double)", d);
 
  107   SbVec2s val(v); val /= d; 
return val;
 
  111   SbVec2s v(v1); v += v2; 
return v;
 
  115   SbVec2s v(v1); v -= v2; 
return v;
 
  119   return ((v1[0] == v2[0]) && (v1[1] == v2[1]));
 
  126 #endif // !COIN_SBVEC2S_H 
The SbVec2f class is a 2 dimensional vector with floating point coordinates.This vector class is used...
Definition: SbVec2f.h:39
void getValue(short &x, short &y) const 
Definition: SbVec2s.h:61
a vector class for containing two byte integers. 
Definition: SbVec2b.h:39
void negate(void)
Definition: SbVec2s.h:67
int operator!=(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:92
SbVec2s(const short v[2])
Definition: SbVec2s.h:44
int operator==(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:88
SbVec2s(short x, short y)
Definition: SbVec2s.h:45
SbVec2s & setValue(const short v[2])
Definition: SbVec2s.h:52
const short * getValue(void) const 
Definition: SbVec2s.h:60
Definition: SbVec2us.h:37
The SbVec2d class is a 2 dimensional vector with double precision floating point coordinates.This vector class is used by many other classes in Coin. It provides storage for a vector in 2 dimensions aswell as simple floating point arithmetic operations on this vector. 
Definition: SbVec2d.h:39
int32_t dot(SbVec2s v) const 
Definition: SbVec2s.h:66
SbVec2d operator*(const SbVec2d &v, double d)
Definition: SbVec2d.h:82
SbVec2s(const SbVec2b &v)
Definition: SbVec2s.h:47
SbVec2d operator-(const SbVec2d &v1, const SbVec2d &v2)
Definition: SbVec2d.h:99
The SbVec2i32 class is a 2 dimensional vector with short integer coordinates.This vector class is use...
Definition: SbVec2i32.h:41
SbVec2d operator/(const SbVec2d &v, double d)
Definition: SbVec2d.h:90
SbVec2s & setValue(short x, short y)
Definition: SbVec2s.h:53
SbVec2s(const SbVec2d &v)
Definition: SbVec2s.h:50
SbVec2s(void)
Definition: SbVec2s.h:43
SbVec2d operator+(const SbVec2d &v1, const SbVec2d &v2)
Definition: SbVec2d.h:95
The SbVec2s class is a 2 dimensional vector with short integer coordinates.This vector class is used ...
Definition: SbVec2s.h:41
SbVec2s(const SbVec2f &v)
Definition: SbVec2s.h:49
SbVec2s(const SbVec2us &v)
Definition: SbVec2s.h:46
SbVec2s(const SbVec2i32 &v)
Definition: SbVec2s.h:48