SbVec3d(3)

๐Ÿ“ฆ version 2.5.0, in fedora 43, fedora 44

๐Ÿ’– SbVec3d ๐Ÿ’–

okay bestie, so the manual name is SbVec3d and this is a Library Functions Manual page, and honestly? it's giving "tiny class, huge main character energy". let's get into it.


โœจ NAME โœจ

SbVec3d โ€” the SbVec3d class is a 3 dimensional vector with double precision floating point coordinates. that's it, that's the whole vibe. ๐ŸŽ€


๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

#include <Inventor/SbLinear.h>

๐Ÿฆ‹ Public Member Functions ๐Ÿฆ‹

SbVec3d (void)
SbVec3d (const double v[3])
SbVec3d (const double x, const double y, const double z)
SbVec3d (const SbVec3f &v)
SbVec3d (const SbVec3b &v)
SbVec3d (const SbVec3s &v)
SbVec3d (const SbVec3i32 &v)
SbVec3d & setValue (const double v[3])
SbVec3d & setValue (const double x, const double y, const 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)
SbVec3d cross (const SbVec3d &v) const
double dot (const SbVec3d &v) const
SbBool equals (const SbVec3d &v, const double tolerance) const
SbVec3d getClosestAxis (void) const
const double * getValue (void) const
void getValue (double &x, double &y, double &z) const
double length (void) const
double sqrLength () const
void negate (void)
double normalize (void)
double & operator[] (const int i)
const double & operator[] (const int i) const
SbVec3d & operator*= (const double d)
SbVec3d & operator/= (const double d)
SbVec3d & operator+= (const SbVec3d &u)
SbVec3d & operator-= (const SbVec3d &u)
SbVec3d operator- (void) const
void print (FILE *fp) const

๐Ÿงš Friends ๐Ÿงš

SbVec3d operator* (const SbVec3d &v, const double d)
SbVec3d operator* (const double d, const SbVec3d &v)
SbVec3d operator/ (const SbVec3d &v, const 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 ๐Ÿ’…

The SbVec3d class is a 3 dimensional vector with double precision floating point coordinates. yes she said double precision, she's fancy like that. ๐Ÿ‘‘

This vector class provides storage for a 3 dimensional double precision floating point vector aswell as simple floating point arithmetic operations. so like, it holds three doubles and it can do math on them. lowkey iconic.

See also

SbVec2f, SbVec2d, SbVec3f, SbVec4f, SbVec4d

Since

Coin 2.0

TGS Inventor 2.6


๐ŸŒธ Constructor & Destructor Documentation ๐ŸŒธ

SbVec3d::SbVec3d (void ) [inline]

The default constructor does nothing. The vector coordinates will be uninitialized until you do a setValue() call. so like, bestie, she's empty until you feed her, no cap. ๐Ÿซถ

Referenced by cross(), dot(), equals(), getClosestAxis(), operator!=, operator*, operator*, operator+, operator+=(), operator-, operator-(), operator-=(), operator/, operator==, and setValue().

SbVec3d::SbVec3d (const double v[3])

Constructs an SbVec3d instance with initial values from v.

SbVec3d::SbVec3d (const double x, const double y, const double z)

Constructs an SbVec3d instance with the initial vector endpoint set to <x,y,z>.

SbVec3d::SbVec3d (const SbVec3f & v)

Constructs an SbVec3d instance with initial values from the single precision vector v.

DEPRECATED for Coin 3.0 โ€” don't use this. i'm serious bestie, hands off. ๐Ÿ’€

References setValue().

SbVec3d::SbVec3d (const SbVec3b & v) [inline], [explicit]

Constructs an SbVec3d instance with initial values from the 8-bit integer precision vector v.

References setValue().

SbVec3d::SbVec3d (const SbVec3s & v) [inline], [explicit]

Constructs an SbVec3d instance with initial values from the short integer precision vector v.

References setValue().

SbVec3d::SbVec3d (const SbVec3i32 & v) [inline], [explicit]

Constructs an SbVec3d instance with initial values from the 32-bit integer precision vector v.

References setValue().


โญ Member Function Documentation โญ

SbVec3d & SbVec3d::setValue (const double v[3])

Set new coordinates for the vector from v. Returns reference to self. self-reference is her whole personality honestly.

See also

getValue().

Referenced by SoRayPickAction::addIntersection(), SoRayPickAction::computeWorldSpaceRay(), SbXfBox3d::extendBy(), SbXfBox3d::extendBy(), SbBox3d::getSpan(), SoRayPickAction::intersect(), SoRayPickAction::intersect(), SoRayPickAction::intersect(), SoRayPickAction::intersect(), SoRayPickAction::isBetweenPlanes(), SbVec3d(), SbVec3d(), SbVec3d(), SbVec3d(), and SbBox3d::transform().

SbVec3d & SbVec3d::setValue (const double x, const double y, const double z)

Set new coordinates for the vector. Returns reference to self.

See also

getValue().

SbVec3d & SbVec3d::setValue (const SbVec3d & barycentric, const SbVec3d & v0, const SbVec3d & v1, const SbVec3d & v2)

Set this vector to be the average of v0, v1 and v2. The vector components are weighted by the barycentric vector. math girlie behaviour fr fr. ๐Ÿงฎโœจ

See also

getValue().

References SbVec3d().

SbVec3d & SbVec3d::setValue (const SbVec3f & v)

Sets this vector to the single precision vector v, converting the vector to a double precision vector.

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

SbVec3d SbVec3d::cross (const SbVec3d & v) const

Returns the result of taking the cross product of this vector and v. perpendicular girlies rise up โœจ

References SbVec3d().

Referenced by SoRayPickAction::intersect().

double SbVec3d::dot (const SbVec3d & v) const

Calculates and returns the result of taking the dot product of this vector and v.

References SbVec3d().

Referenced by SoRayPickAction::computeWorldSpaceRay(), SbBox3d::getSpan(), and SoRayPickAction::intersect().

SbBool SbVec3d::equals (const SbVec3d & v, const 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, that's not a typo, that's just the lore.)

References SoDebugError::postWarning(), and SbVec3d().

SbVec3d SbVec3d::getClosestAxis (void ) const

Return the vector representing the principal axis closest to this vector.

References SbVec3d().

const double * SbVec3d::getValue (void ) const

Returns a pointer to an array of three doubles containing the x, y and z coordinates of the vector.

See also

setValue().

void SbVec3d::getValue (double & x, double & y, double & z) const

Returns the x, y and z coordinates of the vector.

See also

setValue().

double SbVec3d::length (void ) const

Return length of vector.

Referenced by normalize().

double SbVec3d::sqrLength (void ) const

Returns the squared length of the vector.

void SbVec3d::negate (void )

Negate the vector (i.e. point it in the opposite direction). she turned around, slay. ๐Ÿ”„

double SbVec3d::normalize (void )

Normalize the vector to unit length. Return value is the original length of the vector before normalization.

If the vector is the null vector, no attempt at normalization will be done. (you can't normalize a whole lot of nothing, bestie. zero stays zero. ๐Ÿšซ)

References length(), operator/=(), and SoDebugError::postWarning().

Referenced by SoRayPickAction::computeWorldSpaceRay(), and SbBox3d::getSpan().

double & SbVec3d::operator[] (const int i) [inline]

Index operator. Returns modifiable x, y or z coordinate of vector.

See also

getValue() and setValue().

const double & SbVec3d::operator[] (const int i) const [inline]

Index operator. Returns x, y or z coordinate of vector.

See also

getValue() and setValue().

SbVec3d & SbVec3d::operator*= (const double d)

Multiply components of vector with value d. Returns reference to self.

SbVec3d & SbVec3d::operator/= (const double d)

Divides components of vector with value d. Returns reference to self.

References SoDebugError::postWarning().

Referenced by normalize().

SbVec3d & SbVec3d::operator+= (const SbVec3d & u)

Adds this vector and vector u. Returns reference to self.

References SbVec3d().

SbVec3d & SbVec3d::operator-= (const SbVec3d & u)

Subtracts vector u from this vector. Returns reference to self.

References SbVec3d().

SbVec3d SbVec3d::operator- (void ) const

Non-destructive negation operator. Returns a new SbVec3d instance which points in the opposite direction of this vector. she copies herself and flips the copy, no damage done. ๐Ÿ’–

See also

negate().

References SbVec3d().

void SbVec3d::print (FILE * fp) const

Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. so in release builds she just... doesn't. ๐Ÿ™ˆ

Referenced by SbBox3d::print().


SbVec3d operator* (const SbVec3d & v, const double d) [friend]

Returns an SbVec3d instance which is the components of vector v multiplied with d.

References SbVec3d().

SbVec3d operator* (const double d, const SbVec3d & v) [friend]

Returns an SbVec3d instance which is the components of vector v multiplied with d. same energy, arguments swapped, she's flexible like that. โœจ

References SbVec3d().

SbVec3d operator/ (const SbVec3d & v, const double d) [friend]

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

References SoDebugError::postWarning(), and SbVec3d().

SbVec3d operator+ (const SbVec3d & v1, const SbVec3d & v2) [friend]

Returns an SbVec3d instance which is the sum of vectors v1 and v2.

References SbVec3d().

SbVec3d operator- (const SbVec3d & v1, const SbVec3d & v2) [friend]

Returns an SbVec3d instance which is vector v2 subtracted from vector v1.

References SbVec3d().

int operator== (const SbVec3d & v1, const SbVec3d & v2) [friend]

Returns 1 if v1 and v2 are exactly equal, 0 otherwise. exactly. EXACTLY. no tolerance, no wiggle room, no "close enough". ๐ŸŽฏ

See also

equals().

References SbVec3d().

int operator!= (const SbVec3d & v1, const SbVec3d & v2) [friend]

Returns 1 if v1 and v2 are not equal, 0 if they are equal.

See also

equals().

References SbVec3d().


๐ŸŽ€ Author ๐ŸŽ€

Generated automatically by Doxygen for Coin from the source code.


and that's the whole page bestie!! ๐Ÿซถ this beauty is from Coin, Version 2.5.0, and the manual page is literally named SbVec3d(3) โ€” she's that girl. bye, go normalize something. ๐Ÿ’…โœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from