![]() |
http://www.sim.no http://www.coin3d.org |
#include <Inventor/SbLinear.h>
This vector class provides storage for a 3 dimensional double precision floating point vector aswell as simple floating point arithmetic operations.
TGS Inventor 2.6
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) |
SbVec3d::SbVec3d | ( | void | ) | [inline] |
The default constructor does nothing. The vector coordinates will be uninitialized until you do a setValue() call.
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.
SbVec3d::SbVec3d | ( | const SbVec3b & | v | ) | [inline, explicit] |
Constructs an SbVec3d instance with initial values from the 8-bit integer precision vector v.
SbVec3d::SbVec3d | ( | const SbVec3s & | v | ) | [inline, explicit] |
Constructs an SbVec3d instance with initial values from the short integer precision vector v.
SbVec3d::SbVec3d | ( | const SbVec3i32 & | v | ) | [inline, explicit] |
Constructs an SbVec3d instance with initial values from the 32-bit integer precision vector v.
SbVec3d & SbVec3d::setValue | ( | const double | v[3] | ) |
SbVec3d & SbVec3d::setValue | ( | const double | x, | |
const double | y, | |||
const double | z | |||
) |
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.
Sets this vector to the vector v.
Returns the result of taking the cross product of this vector and v.
double SbVec3d::dot | ( | const SbVec3d & | v | ) | const |
Calculates and returns the result of taking the dot product of this vector and v.
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.
SbVec3d SbVec3d::getClosestAxis | ( | void | ) | const |
Return the vector representing the principal axis closest to this vector.
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.
void SbVec3d::getValue | ( | double & | x, | |
double & | y, | |||
double & | z | |||
) | const |
double SbVec3d::length | ( | void | ) | const |
Return length of vector.
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).
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.
double & SbVec3d::operator[] | ( | const int | i | ) | [inline] |
Index operator. Returns modifiable x, y or z coordinate of vector.
double SbVec3d::operator[] | ( | const int | i | ) | const [inline] |
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.
Adds this vector and vector u. Returns reference to self.
Subtracts vector u from this vector. Returns reference to self.
SbVec3d SbVec3d::operator- | ( | void | ) | const |
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.
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.
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Wed Oct 3 01:27:45 2007 for Coin by Doxygen. 1.5.2