38#include <Inventor/SbBasic.h>
40#include <Inventor/errors/SoDebugError.h>
51 SbVec2d(
const double v[2]) { vec[0] = v[0]; vec[1] = v[1]; }
52 SbVec2d(
double x,
double y) { vec[0] = x; vec[1] = y; }
58 SbVec2d &
setValue(
const double v[2]) { vec[0] = v[0]; vec[1] = v[1];
return *
this; }
65 const double *
getValue(
void)
const {
return vec; }
66 void getValue(
double & x,
double & y)
const { x = vec[0]; y = vec[1]; }
71 SbBool equals(
const SbVec2d & v,
double tolerance)
const;
72 double dot(
const SbVec2d & v)
const {
return vec[0] * v[0] + vec[1] * v[1]; }
73 double length(
void)
const;
74 double sqrLength(
void)
const {
return vec[0]*vec[0] + vec[1]*vec[1]; }
75 double normalize(
void);
76 void negate(
void) { vec[0] = -vec[0]; vec[1] = -vec[1]; }
84 void print(
FILE * fp)
const;
100 SbDividerChk(
"operator/(SbVec2d,double)", d);
113 return ((
v1[0] ==
v2[0]) && (
v1[1] ==
v2[1]));
The SbList class is a template container class for lists.
Definition SbList.h:70
SbList(const int sizehint=DEFAULTSIZE)
Definition SbList.h:78
Type operator[](const int index) const
Definition SbList.h:195
a vector class for containing two byte integers.
Definition SbVec2b.h:48
The SbVec2d class is a 2 dimensional vector with double precision floating point coordinates.
Definition SbVec2d.h:48
void negate(void)
Definition SbVec2d.h:76
double sqrLength(void) const
Definition SbVec2d.h:74
double dot(const SbVec2d &v) const
Definition SbVec2d.h:72
SbVec2d(const SbVec2b &v)
Definition SbVec2d.h:54
SbVec2d & setValue(const double v[2])
Definition SbVec2d.h:58
SbVec2d(double x, double y)
Definition SbVec2d.h:52
SbVec2d(const SbVec2i32 &v)
Definition SbVec2d.h:56
SbVec2d(const double v[2])
Definition SbVec2d.h:51
const double * getValue(void) const
Definition SbVec2d.h:65
SbVec2d(const SbVec2s &v)
Definition SbVec2d.h:55
SbVec2d & setValue(double x, double y)
Definition SbVec2d.h:59
void getValue(double &x, double &y) const
Definition SbVec2d.h:66
SbVec2d(void)
Definition SbVec2d.h:50
SbVec2d(const SbVec2f &v)
Definition SbVec2d.h:53
The SbVec2f class is a 2 dimensional vector with floating point coordinates.
Definition SbVec2f.h:49
The SbVec2i32 class is a 2 dimensional vector with 32-bit signed integer coordinates.
Definition SbVec2i32.h:50
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition SbVec2s.h:51