![]() |
http://www.sim.no http://www.coin3d.org |
#include <Inventor/SbVec4d.h>
This vector class is not by many other classes in Coin. It provides 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.
Public Member Functions | |
SbVec4d (void) | |
SbVec4d (const double v[4]) | |
SbVec4d (const double x, const double y, const double z, const double w) | |
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 |
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) |
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) |
|
The default constructor does nothing. The vector coordinates will be uninitialized until a call the setValue(). |
|
Constructs an SbVec4d instance with initial values from v. |
|
Constructs an SbVec4d instance with the initial homogeneous vector set to <x,y,z,w>. |
|
Calculates and returns the result of taking the dot product of this vector and v. |
|
Compares the vector with v and returns 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. |
|
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. |
|
Returns a pointer to an array of four doubles containing the x, y, z and w coordinates of the vector.
|
|
Returns the x, y, z and w coordinates of the vector.
|
|
Return the length of the vector in 4D space. |
|
Negate the vector. |
|
Normalize the vector to unit length. Return value is the original length of the vector before normalization. |
|
Set new coordinates for the vector from v. Returns reference to self.
|
|
Set new coordinates for the vector. Returns reference to self.
|
|
Index operator. Returns modifiable x, y, z or w component of vector.
|
|
Index operator. Returns x, y, z or w component of vector.
|
|
Multiply components of vector with value d. Returns reference to self. |
|
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. |
|
Non-destructive negation operator. Returns a new SbVec4d instance which has all components negated.
|
|
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 SbVec4d instance which is the components of vector v multiplied with d. |
|
Returns an SbVec4d instance which is the components of vector v multiplied with d. |
|
Returns an SbVec4d instance which is the components of vector v divided on the scalar factor d. |
|
Returns an SbVec4d instance which is the sum of vectors v1 and v2. |
|
Returns an SbVec4d instance which is vector v2 subtracted from vector v1. |
|
Returns 1 if v1 and v2 are equal, 0 otherwise.
|
|
Returns 1 if v1 and v2 are not equal, 0 if they are equal.
|
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Tue Apr 17 03:29:41 2007 for Coin by Doxygen. 1.4.6