SbVec3d(3)

๐Ÿ“ฆ
version 4.0.10 ยท 4 versions
, in fedora 43, fedora 44

๐ŸŒธ 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

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. ๐Ÿ˜ญ

Returns an SbVec3d instance which is the components of the vector v multiplied with d. Vector first, scalar second. ๐Ÿ’ซ

Returns an SbVec3d instance which is the components of the vector v multiplied with d. Scalar first this time, because she contains multitudes. โœจ

Returns an SbVec3d instance which is the components of the vector v divided on the scalar factor d.

Returns an SbVec3d instance which is the sum of the vectors v1 and v2. Friendship. ๐Ÿซถ

Returns an SbVec3d instance which is the vector v2 subtracted from the vector v1. Order matters, don't get it twisted. ๐Ÿ”ฅ

Returns 1 if v1 and v2 are exactly equal, 0 otherwise. Exactly. Like, exactly exactly. ๐ŸŽฏ

See also โ€” equals().

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