SbVec4d(3)
π SbVec4d β the manual page, but make it cute π
okay so bestie, welcome to the SbVec4d(3) page from the Library Functions Manual. Buckle up, we're doing 4D math and we're doing it adorably. β¨
πΈ NAME πΈ
SbVec4d β the SbVec4d class is a 4 dimensional vector with double precision floating point coordinates. π
π SYNOPSIS π
#include <Inventor/SbVec4d.h>
β¨ Public Member Functions β¨
SbVec4d (void)
SbVec4d (const double v[4])
SbVec4d (const double x, const double y, const double z, const double w)
SbVec4d (const SbVec4f &v)
double dot (const SbVec4d &v) const
SbBool equals (const SbVec4d &v, const double tolerance) const
void getReal (SbVec3d &v) const
const double * getValue (void) const
void getValue (double &x, double &y, double &z, double &w) const
double length (void) const
double sqrLength (void) const
void negate (void)
double normalize (void)
SbVec4d & setValue (const double v[4])
SbVec4d & setValue (const double x, const double y, const double z,
const double w)
SbVec4d & setValue (const SbVec4f &v)
double & operator[] (const int i)
const double & operator[] (const int i) const
SbVec4d & operator*= (const double d)
SbVec4d & operator/= (const double d)
SbVec4d & operator+= (const SbVec4d &u)
SbVec4d & operator-= (const SbVec4d &u)
SbVec4d operator- (void) const
void print (FILE *fp) const
π«Ά Friends π«Ά
SbVec4d operator* (const SbVec4d &v, const double d)
SbVec4d operator* (const double d, const SbVec4d &v)
SbVec4d operator/ (const SbVec4d &v, const double d)
SbVec4d operator+ (const SbVec4d &v1, const SbVec4d &v2)
SbVec4d operator- (const SbVec4d &v1, const SbVec4d &v2)
int operator== (const SbVec4d &v1, const SbVec4d &v2)
int operator!= (const SbVec4d &v1, const SbVec4d &v2)
π Detailed Description π
The SbVec4d class is a 4 dimensional vector with double precision floating point coordinates. that's the whole vibe. π¦
Lowkey important lore: this vector class is not by many other classes in Coin. What it does give you is storage for a 3 dimensional homogeneoues vector β with the 4 components usually referred to as <x, y, z, w> β aswell as simple double precision floating point arithmetic operations. π
See also π SbVec2f, SbVec2d, SbVec3f, SbVec3d, SbVec4f
π§ Constructor & Destructor Documentation π§
SbVec4d::SbVec4d (void )
The default constructor does nothing. The vector coordinates will be uninitialized until a call the setValue(). no cap, it's just sitting there empty until you feed it. π
Referenced by dot(), equals(), operator!=, operator*, operator*, operator+, operator+=(), operator-, operator-(), operator-=(), operator/, and operator==.
SbVec4d::SbVec4d (const double v[4])
Constructs an SbVec4d instance with initial values from v. β¨
SbVec4d::SbVec4d (const double x, const double y, const double z, const double w)
Constructs an SbVec4d instance with the initial homogeneous vector set to <x,y,z,w>. iconic. π
SbVec4d::SbVec4d (const SbVec4f & v) [inline], [explicit]
Constructs an SbVec4d instance with initial values from the vector v.
Since πΈ Coin-2.5
References setValue().
π Member Function Documentation π
double SbVec4d::dot (const SbVec4d & v) const
Calculates and returns the result of taking the dot product of this vector and v. math girlies rise. π
References SbVec4d().
SbBool SbVec4d::equals (const SbVec4d & 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.
The comparison is done in 4D-space, i.e. the w component of the vector is not used to make x, y and z into Cartesian coordinates first.
References SoDebugError::postWarning(), and SbVec4d().
void SbVec4d::getReal (SbVec3d & v) const
Returns the vector as a Cartesian 3D vector in v. This means that the 3 first components x, y and z will be divided by the fourth, w. π«
References SoDebugError::postWarning().
const double * SbVec4d::getValue (void ) const
Returns a pointer to an array of four doubles containing the x, y, z and w coordinates of the vector.
See also π setValue().
void SbVec4d::getValue (double & x, double & y, double & z, double & w) const
Returns the x, y, z and w coordinates of the vector.
See also π setValue().
double SbVec4d::length (void ) const
Return the length of the vector in 4D space. π
Referenced by normalize().
double SbVec4d::sqrLength (void ) const
Return the square of the length of the vector in 4D space.
Since πΈ Coin-2.5
void SbVec4d::negate (void )
Negate the vector. flip it, reverse it, give it that opposite energy. π
double SbVec4d::normalize (void )
Normalize the vector to unit length. Return value is the original length of the vector before normalization. she got a glow-up but she remembers where she came from. β¨
References length(), operator/=(), and SoDebugError::postWarning().
SbVec4d & SbVec4d::setValue (const double v[4])
Set new coordinates for the vector from v. Returns reference to self. π
See also π getValue().
Referenced by SbVec4d().
SbVec4d & SbVec4d::setValue (const double x, const double y, const double z, const double w)
Set new coordinates for the vector. Returns reference to self. π
See also π getValue().
SbVec4d & SbVec4d::setValue (const SbVec4f & v)
Set new value from an SbVec4f instance. Returns reference to self.
Since πΈ Coin-2.5
double & SbVec4d::operator[] (const int i)
Index operator. Returns modifiable x, y, z or w component of vector.
See also π getValue() and setValue().
References SoDebugError::postWarning().
const double & SbVec4d::operator[] (const int i) const
Index operator. Returns x, y, z or w component of vector.
See also π getValue() and setValue().
References SoDebugError::postWarning().
SbVec4d & SbVec4d::operator*= (const double d)
Multiply components of vector with value d. Returns reference to self.
SbVec4d & SbVec4d::operator/= (const double d)
Divides components of vector with value d. Returns reference to self.
References SoDebugError::postWarning().
Referenced by normalize().
SbVec4d & SbVec4d::operator+= (const SbVec4d & u)
Adds this vector and vector u. Returns reference to self. β
References SbVec4d().
SbVec4d & SbVec4d::operator-= (const SbVec4d & u)
Subtracts vector u from this vector. Returns reference to self. β
References SbVec4d().
SbVec4d SbVec4d::operator- (void ) const
Non-destructive negation operator. Returns a new SbVec4d instance which has all components negated. she's not changing, she's just showing you a different version of herself. π
See also π negate().
References SbVec4d().
void SbVec4d::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 don't be surprised when she's silent in release mode, bestie. π
π Friends And Related Symbol Documentation π
SbVec4d operator* (const SbVec4d & v, const double d) [friend]
Returns an SbVec4d instance which is the components of vector v multiplied with d.
References SbVec4d().
SbVec4d operator* (const double d, const SbVec4d & v) [friend]
Returns an SbVec4d instance which is the components of vector v multiplied with d.
References SbVec4d().
SbVec4d operator/ (const SbVec4d & v, const double d) [friend]
Returns an SbVec4d instance which is the components of vector v divided on the scalar factor d.
References SoDebugError::postWarning(), and SbVec4d().
SbVec4d operator+ (const SbVec4d & v1, const SbVec4d & v2) [friend]
Returns an SbVec4d instance which is the sum of vectors v1 and v2. π«Ά
References SbVec4d().
SbVec4d operator- (const SbVec4d & v1, const SbVec4d & v2) [friend]
Returns an SbVec4d instance which is vector v2 subtracted from vector v1.
References SbVec4d().
int operator== (const SbVec4d & v1, const SbVec4d & v2) [friend]
Returns 1 if v1 and v2 are equal, 0 otherwise. twin behavior. π―
See also π equals().
References SbVec4d().
int operator!= (const SbVec4d & v1, const SbVec4d & v2) [friend]
Returns 1 if v1 and v2 are not equal, 0 if they are equal. not twins, actually. π
See also π equals().
References SbVec4d().
β Author β
Generated automatically by Doxygen for Coin from the source code. (yes the robot wrote it, and honestly? she ate. π )
and that's the whole page, bestie!! πβ¨ππ¦πΈπ«Άπβπππ§π
okay so before you go β this was SbVec4d(3) from Coin, Version 2.5.0. mwah, ily, go normalize something. π
π
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms