![]() |
http://www.sim.no http://www.coin3d.org |
The SbVec3d class is a 3 dimensional vector with double precision floating point coordinates. More...
#include <Inventor/SbLinear.h>
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) |
Related Symbols | |
(Note that these are not member symbols.) | |
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) |
The SbVec3d class is a 3 dimensional vector with double precision floating point coordinates.
This vector class provides storage for a 3 dimensional double precision floating point vector aswell as simple floating point arithmetic operations.
|
inline |
The default constructor does nothing. The vector coordinates will be uninitialized until you do a setValue() call.
Referenced by cross(), and operator-().
Constructs an SbVec3d instance with the initial vector endpoint set to <x,y,z>.
Constructs an SbVec3d instance with initial values from the single precision vector v.
DEPRECATED
for Coin 3.0 – don't use this.
References setValue().
Constructs an SbVec3d instance with initial values from the 8-bit integer precision vector v.
Constructs an SbVec3d instance with initial values from the short integer precision vector v.
Constructs an SbVec3d instance with initial values from the 32-bit integer precision vector v.
Set new coordinates for the vector from v. Returns reference to self.
Referenced by SbBox3d::extendBy(), SoRayPickAction::intersect(), SbBox3d::makeEmpty(), SbVec3d(), SbBox3d::setBounds(), SbBox3d::setBounds(), and SbBox3d::setBounds().
Set new coordinates for the vector. Returns reference to self.
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.
Sets this vector to the single precision vector v, converting the vector to a double precision vector.
Returns the result of taking the cross product of this vector and v.
References SbVec3d().
Referenced by SoRayPickAction::intersect().
Calculates and returns the result of taking the dot product of this vector and v.
Referenced by SoRayPickAction::computeWorldSpaceRay(), and SoRayPickAction::intersect().
Compares the vector with v and returns TRUE
if the distance between the vectors is smaller or equal to the square root of tolerance.
References SoDebugError::postWarning().
Return the vector representing the principal axis closest to this vector.
Returns a pointer to an array of three doubles containing the x, y and z coordinates of the vector.
void SbVec3d::getValue | ( | double & | x, |
double & | y, | ||
double & | z ) const |
Returns the x, y and z coordinates of the vector.
double SbVec3d::length | ( | void | ) | const |
Return length of vector.
Referenced by normalize().
double SbVec3d::sqrLength | ( | void | ) | const |
Returns the squared length of the vector.
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.
References length(), operator/=(), and SoDebugError::postWarning().
Referenced by SoRayPickAction::computeWorldSpaceRay().
|
inline |
Index operator. Returns modifiable x, y or z coordinate of vector.
|
inline |
Index operator. Returns x, y or z coordinate of vector.
Multiply components of vector with value d. Returns reference to self.
Divides components of vector with value d. Returns reference to self.
References SoDebugError::postWarning().
Referenced by normalize().
Adds this vector and vector u. Returns reference to self.
Subtracts vector u from this vector. Returns reference to self.
Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile.
Returns an SbVec3d instance which is the components of vector v multiplied with d.
Returns an SbVec3d instance which is the components of vector v multiplied with d.
Returns an SbVec3d instance which is the components of vector v divided on the scalar factor d.
Returns an SbVec3d instance which is the sum of vectors v1 and v2.
Returns an SbVec3d instance which is vector v2 subtracted from vector v1.
Returns 1 if v1 and v2 are exactly equal, 0 otherwise.
Returns 1 if v1 and v2 are not equal, 0 if they are equal.
Returns an SbVec3d instance which is the components of vector v multiplied with d.
Returns an SbVec3d instance which is the components of vector v multiplied with d.
Returns an SbVec3d instance which is the components of vector v divided on the scalar factor d.
Returns an SbVec3d instance which is the sum of vectors v1 and v2.
Returns an SbVec3d instance which is vector v2 subtracted from vector v1.
Returns 1 if v1 and v2 are exactly equal, 0 otherwise.
Returns 1 if v1 and v2 are not equal, 0 if they are equal.
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Mon Jan 22 2024 for Coin by Doxygen. 1.10.0