SbVec3d(3)
๐ธ NAME ๐ธ
SbVec3d โ bestie, it's a 3 dimensional vector with double precision floating point coordinates. That's the whole serve. ๐
โจ SYNOPSIS โจ
#include <Inventor/SbVec3d.h>
๐ซถ Public Member Functions ๐ซถ
SbVec3d (void)
SbVec3d (const double v[3])
SbVec3d (double x, double y, double z)
SbVec3d (const SbVec3f &v)
SbVec3d (const SbVec3b &v)
SbVec3d (const SbVec3s &v)
SbVec3d (const SbVec3i32 &v)
SbVec3d (const SbDPPlane &p0, const SbDPPlane &p1, const SbDPPlane &p2)
SbVec3d & setValue (const double v[3])
SbVec3d & setValue (double x, double y, double z)
SbVec3d & setValue (const SbVec3d &barycentric, const SbVec3d &v0, const
SbVec3d &v1, const SbVec3d &v2)
SbVec3d & setValue (const SbVec3f &v)
SbVec3d & setValue (const SbVec3b &v)
SbVec3d & setValue (const SbVec3s &v)
SbVec3d & setValue (const SbVec3i32 &v)
const double * getValue (void) const
void getValue (double &x, double &y, double &z) const
double & operator[] (const int i)
const double & operator[] (const int i) const
SbVec3d cross (const SbVec3d &v) const
double dot (const SbVec3d &v) const
SbBool equals (const SbVec3d &v, double tolerance) const
SbVec3d getClosestAxis (void) const
double length (void) const
double sqrLength (void) const
void negate (void)
double normalize (void)
SbVec3d & operator*= (double d)
SbVec3d & operator/= (double d)
SbVec3d & operator+= (const SbVec3d &v)
SbVec3d & operator-= (const SbVec3d &v)
SbVec3d operator- (void) const
SbString toString () const
SbBool fromString (const SbString &str)
void print (FILE *fp) const
๐ฆ Related Symbols ๐ฆ
Ok so listen โ these ones are not member symbols, they're the free-range friends just vibing outside the class. (Note that these are not member symbols.) ๐ฃ
SbVec3d operator* (const SbVec3d &v, double d)
SbVec3d operator* (double d, const SbVec3d &v)
SbVec3d operator/ (const SbVec3d &v, double d)
SbVec3d operator+ (const SbVec3d &v1, const SbVec3d &v2)
SbVec3d operator- (const SbVec3d &v1, const SbVec3d &v2)
int operator== (const SbVec3d &v1, const SbVec3d &v2)
int operator!= (const SbVec3d &v1, const SbVec3d &v2)
๐ Detailed Description ๐
So, SbVec3d is a 3 dimensional vector with double precision floating point coordinates. Periodt. ๐
She's holding down storage for a 3 dimensional double precision floating point vector, and she comes with simple floating point arithmetic operations built in. Lowkey a whole package. ๐ธ
See also โ go say hi to the rest of the family: SbVec2s, SbVec2f, SbVec2d, SbVec3s, SbVec3f, SbVec4f, SbVec4d. They're all iconic, ngl. ๐ซถ
Since โ she's been that girl since:
- Coin 2.0
- TGS Inventor 2.6
๐ Constructor & Destructor Documentation ๐
SbVec3d::SbVec3d (void ) [inline]
The default constructor literally does nothing. โ Nothing. Your vector coordinates are gonna be uninitialized until you hit her with a setValue() call. So don't be out here reading uninitialized coords and acting surprised, bestie, that's on you. ๐ญ
SbVec3d::SbVec3d (const double v[3]) [inline]
Builds an SbVec3d instance with the initial values straight from v. Slay. โจ
SbVec3d::SbVec3d (double x, double y, double z) [inline]
Builds an SbVec3d instance with the initial vector endpoint set to <x,y,z>. Three little numbers, one cute vector. ๐
SbVec3d::SbVec3d (const SbVec3f & v) [inline], [explicit]
Builds an SbVec3d instance out of an SbVec3f instance. Glow up from single to double. โจ
SbVec3d::SbVec3d (const SbVec3b & v) [inline], [explicit]
Builds an SbVec3d instance out of an SbVec3b instance.
Since โ Coin 2.5
SbVec3d::SbVec3d (const SbVec3s & v) [inline], [explicit]
Builds an SbVec3d instance out of an SbVec3s instance.
Since โ Coin 2.5
SbVec3d::SbVec3d (const SbVec3i32 & v) [inline], [explicit]
Builds an SbVec3d instance out of an SbVec3i32 instance.
Since โ Coin 2.5
SbVec3d::SbVec3d (const SbDPPlane & p0, const SbDPPlane & p1, const SbDPPlane & p2)
Builds an SbVec3d instance by combining the three given planes. ๐ซ
ok but listen โ none of the planes should be parallel to any of the other two, otherwise a divide by zero error will occur. So do NOT hand her parallel planes. She will not be okay. Neither will your program. ๐
๐ Member Function Documentation ๐
SbVec3d & SbVec3d::setValue (const double v[3]) [inline]
Sets brand new coordinates for the vector, taken from v. Returns a reference to self โ she's generous like that. ๐ซถ
See also โ getValue().
SbVec3d & SbVec3d::setValue (double x, double y, double z) [inline]
Sets new coordinates for the vector. Returns a reference to self.
See also โ getValue().
SbVec3d & SbVec3d::setValue (const SbVec3d & barycentric, const SbVec3d & v0, const SbVec3d & v1, const SbVec3d & v2)
Sets this vector to be the average of v0, v1 and v2. The vector components get weighted by the barycentric vector. Math girl summer. ๐งฎโจ
See also โ getValue().
SbVec3d & SbVec3d::setValue (const SbVec3f & v)
Sets this vector to the single precision vector v, converting the vector to a double precision vector. Upgrade era. ๐
SbVec3d & SbVec3d::setValue (const SbVec3b & v)
Sets this vector to the vector v.
Since โ Coin 2.5
SbVec3d & SbVec3d::setValue (const SbVec3s & v)
Sets this vector to the vector v.
Since โ Coin 2.5
SbVec3d & SbVec3d::setValue (const SbVec3i32 & v)
Sets this vector to the vector v.
Since โ Coin 2.5
const double * SbVec3d::getValue (void ) const [inline]
Returns a pointer to an array of three doubles holding the x, y and z coordinates of the vector. Three doubles, pointer, boom. ๐
See also โ setValue().
void SbVec3d::getValue (double & x, double & y, double & z) const [inline]
Returns the x, y and z coordinates of the vector, handed to you by reference.
See also โ setValue().
double & SbVec3d::operator[] (const int i) [inline]
Index operator. Returns a modifiable x, y or z coordinate of the vector. So yeah, you can write to it. Main character energy. ๐
See also โ getValue() and setValue().
const double & SbVec3d::operator[] (const int i) const [inline]
Index operator. Returns an x, y or z coordinate of the vector. Read-only edition, no touching. ๐
See also โ getValue() and setValue().
SbVec3d SbVec3d::cross (const SbVec3d & v) const
Returns the result of taking the cross product of this vector and v. โ๏ธ
double SbVec3d::dot (const SbVec3d & v) const [inline]
Calculates and returns the result of taking the dot product of this vector and v.
SbBool SbVec3d::equals (const SbVec3d & v, double tolerance) const
Compares the vector with v and returns TRUE if the distance between the vectors is smaller or equal to the square root of tolerance. Yes, the square root of tolerance. Read it twice, bestie. ๐
SbVec3d SbVec3d::getClosestAxis (void ) const
Returns the vector representing the principal axis closest to this vector. She'll tell you which way you're leaning. ๐
double SbVec3d::length (void ) const
Returns the length of the vector.
double SbVec3d::sqrLength (void ) const [inline]
Returns the squared length of the vector. No square root needed, we're keeping it cute. ๐
void SbVec3d::negate (void ) [inline]
Negates the vector, i.e. points it in the opposite direction. Flip the vibe. ๐
double SbVec3d::normalize (void )
Normalizes the vector to unit length. The return value is the original length of the vector before normalization โ she tells you where she came from. ๐ฆ
If the vector is the null vector, no attempt at normalization will be done. Nothing happens. She simply does not participate. ๐
SbVec3d & SbVec3d::operator*= (double d) [inline]
Multiplies the components of the vector with the value d. Returns a reference to self.
SbVec3d & SbVec3d::operator/= (double d) [inline]
Divides the components of the vector with the value d. Returns a reference to self.
SbVec3d & SbVec3d::operator+= (const SbVec3d & v) [inline]
Adds this vector and the vector v. Returns a reference to self.
SbVec3d & SbVec3d::operator-= (const SbVec3d & v) [inline]
Subtracts the vector v from this vector. Returns a reference to self.
SbVec3d SbVec3d::operator- (void ) const [inline]
Non-destructive negation operator. Returns a new SbVec3d instance pointing in the opposite direction of this vector. Original untouched, no notes. โจ
See also โ negate().
SbString SbVec3d::toString () const
Returns a string representation of this object. โ๏ธ
SbBool SbVec3d::fromString (const SbString & str)
Converts from a string representation, and returns whether this is a valid conversion. So like, it tells you if it worked. ๐ซถ
void SbVec3d::print (FILE * fp) const
Dumps the state of this object to the fp file stream.
Heads up bestie: this only works in a debug version of the library. In an optimized build, the method does nothing. So if nothing prints, it's not you, it's the build. ๐ญ
๐ Friends And Related Symbol Documentation ๐
SbVec3d operator* (const SbVec3d & v, double d) [related]
Returns an SbVec3d instance which is the components of the vector v multiplied with d. Vector first, scalar second. ๐ซ
SbVec3d operator* (double d, const SbVec3d & v) [related]
Returns an SbVec3d instance which is the components of the vector v multiplied with d. Scalar first this time, because she contains multitudes. โจ
SbVec3d operator/ (const SbVec3d & v, double d) [related]
Returns an SbVec3d instance which is the components of the vector v divided on the scalar factor d.
SbVec3d operator+ (const SbVec3d & v1, const SbVec3d & v2) [related]
Returns an SbVec3d instance which is the sum of the vectors v1 and v2. Friendship. ๐ซถ
SbVec3d operator- (const SbVec3d & v1, const SbVec3d & v2) [related]
Returns an SbVec3d instance which is the vector v2 subtracted from the vector v1. Order matters, don't get it twisted. ๐ฅ
int operator== (const SbVec3d & v1, const SbVec3d & v2) [related]
Returns 1 if v1 and v2 are exactly equal, 0 otherwise. Exactly. Like, exactly exactly. ๐ฏ
See also โ equals().
int operator!= (const SbVec3d & v1, const SbVec3d & v2) [related]
Returns 1 if v1 and v2 are not equal, 0 if they are equal.
See also โ equals().
๐ Author ๐
Generated automatically by Doxygen for Coin from the source code. A robot wrote this, and honestly? She ate. ๐ค๐
ok that's the whole page, bestie โ go forth and be 3 dimensional. byeeee ๐ฆโจ
Version 4.0.10, dated Thu Jun 25 2026 00:00:00 โ that's the tea, the whole footer, no crumbs left behind. ๐ ๐
๐ฆ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms