1#ifndef COIN_SBVEC2I32_H
2#define COIN_SBVEC2I32_H
38#include <Inventor/SbBasic.h>
39#include <Inventor/system/inttypes.h>
41#include <Inventor/errors/SoDebugError.h>
53 SbVec2i32(
const int32_t v[2]) { vec[0] = v[0]; vec[1] = v[1]; }
54 SbVec2i32(int32_t x, int32_t y) { vec[0] = x; vec[1] = y; }
69 const int32_t *
getValue(
void)
const {
return vec; }
70 void getValue(int32_t & x, int32_t & y)
const { x = vec[0]; y = vec[1]; }
75 int32_t
dot(
const SbVec2i32 & v)
const {
return vec[0] * v[0] + vec[1] * v[1]; }
76 void negate(
void) { vec[0] = -vec[0]; vec[1] = -vec[1]; }
80 SbVec2i32 &
operator /= (
int d) { SbDividerChk(
"SbVec2i32::operator/=(int)", d); vec[0] /= d; vec[1] /= d;
return *
this; }
86 void print(
FILE * fp)
const;
110 SbDividerChk(
"operator/(SbVec2i32,int)", d);
115 SbDividerChk(
"operator/(SbVec2i32,double)", d);
128 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
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
void getValue(int32_t &x, int32_t &y) const
Definition SbVec2i32.h:70
SbVec2i32(const SbVec2s &v)
Definition SbVec2i32.h:57
SbVec2i32(const SbVec2f &v)
Definition SbVec2i32.h:58
SbVec2i32(void)
Definition SbVec2i32.h:52
SbVec2i32(int32_t x, int32_t y)
Definition SbVec2i32.h:54
int32_t dot(const SbVec2i32 &v) const
Definition SbVec2i32.h:75
void negate(void)
Definition SbVec2i32.h:76
SbVec2i32 & setValue(const int32_t v[2])
Definition SbVec2i32.h:61
const int32_t * getValue(void) const
Definition SbVec2i32.h:69
SbVec2i32(const SbVec2d &v)
Definition SbVec2i32.h:59
SbVec2i32(const SbVec2ui32 &v)
Definition SbVec2i32.h:55
SbVec2i32 & setValue(int32_t x, int32_t y)
Definition SbVec2i32.h:62
SbVec2i32(const int32_t v[2])
Definition SbVec2i32.h:53
SbVec2i32(const SbVec2b &v)
Definition SbVec2i32.h:56
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition SbVec2s.h:51
Definition SbVec2ui32.h:46