38#include <Inventor/SbBasic.h>
39#include <Inventor/SbByteBuffer.h>
40#include <Inventor/SbString.h>
42#include <Inventor/errors/SoDebugError.h>
54 SbVec3f(
const float v[3]) { vec[0] = v[0]; vec[1] = v[1]; vec[2] = v[2]; }
55 SbVec3f(
float x,
float y,
float z) { vec[0] = x; vec[1] = y; vec[2] = z; }
62 SbVec3f &
setValue(
const float v[3]) { vec[0] = v[0]; vec[1] = v[1]; vec[2] = v[2];
return *
this; }
63 SbVec3f &
setValue(
float x,
float y,
float z) { vec[0] = x; vec[1] = y; vec[2] = z;
return *
this; }
73 const float *
getValue(
void)
const {
return vec; }
74 void getValue(
float & x,
float & y,
float & z)
const { x = vec[0]; y = vec[1]; z = vec[2]; }
79 SbBool equals(
const SbVec3f & v,
float tolerance)
const;
81 float dot(
const SbVec3f & v)
const {
return vec[0] * v[0] + vec[1] * v[1] + vec[2] * v[2]; }
82 SbVec3f getClosestAxis(
void)
const;
83 float length(
void)
const;
84 float sqrLength(
void)
const {
return vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]; }
85 float normalize(
void);
86 void negate(
void) { vec[0] = -vec[0]; vec[1] = -vec[1]; vec[2] = -vec[2]; }
95 SbBool fromString(
const SbString & str);
97 void print(
FILE * fp)
const;
113 SbDividerChk(
"operator/(SbVec3f,float)", d);
126 return ((
v1[0] ==
v2[0]) && (
v1[1] ==
v2[1]) && (
v1[2] ==
v2[2]));
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
The SbPlane class represents a plane in 3D space.
Definition SbPlane.h:43
The SbString class is a string class with convenience functions for string operations.
Definition SbString.h:52
The SbVec3d class is a 3 dimensional vector with double precision floating point coordinates.
Definition SbVec3d.h:50
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition SbVec3f.h:51
SbVec3f(const SbVec3d &v)
Definition SbVec3f.h:56
SbVec3f(const SbVec3b &v)
Definition SbVec3f.h:57
SbVec3f & setValue(const float v[3])
Definition SbVec3f.h:62
const float * getValue(void) const
Definition SbVec3f.h:73
void getValue(float &x, float &y, float &z) const
Definition SbVec3f.h:74
SbVec3f(const float v[3])
Definition SbVec3f.h:54
SbVec3f(const SbVec3s &v)
Definition SbVec3f.h:58
float dot(const SbVec3f &v) const
Definition SbVec3f.h:81
void negate(void)
Definition SbVec3f.h:86
SbVec3f(void)
Definition SbVec3f.h:53
SbVec3f(float x, float y, float z)
Definition SbVec3f.h:55
SbVec3f & setValue(float x, float y, float z)
Definition SbVec3f.h:63
SbVec3f(const SbVec3i32 &v)
Definition SbVec3f.h:59
float sqrLength(void) const
Definition SbVec3f.h:84
Definition SbVec3i32.h:48
The SbVec3s class is a 3 dimensional vector with short integer coordinates.
Definition SbVec3s.h:51