#include <GVector3.h>
Collaboration diagram for GCS::GVector3:

Public Member Functions | |
| GVector3 () | |
| GVector3 (const double d) | |
| GVector3 (const double x, const double y, const double z) | |
| GVector3 (const double *component) | |
| GVector3 (const GVector3 &original) | |
| double | length () const |
| double | lengthsq () const |
| GVector3 & | reset () |
| GVector3 & | set (double x, double y, double z) |
| GVector3 & | set (const GVector3 &original) |
| GVector3 & | normalize () |
| GVector3 & | scaleXYZ (const GVector3 &scale) |
| GVector3 & | scaleXYZ (double x, double y, double z) |
| GVector3 & | add (const GVector3 &right) |
| GVector3 & | sub (const GVector3 &right) |
| GVector3 & | mul (double scalar) |
| double | dot (const GVector3 &right) const |
| GVector3 | cross (const GVector3 &right) const |
| GVector3 & | operator= (const GVector3 &original) |
| GVector3 | operator+ (const GVector3 &right) const |
| GVector3 | operator- (const GVector3 &right) const |
| GVector3 | operator * (double factor) const |
| GVector3 & | operator+= (const GVector3 &right) |
| GVector3 & | operator-= (const GVector3 &right) |
| bool | operator== (const GVector3 &comp) const |
| double | distanceTo (const GVector3 &p) const |
| double | angleTo (const GVector3 &v) const |
| GVector3 & | turnAroundAxis (const GVector3 &axis, double angle_rad) |
| GVector3 & | projectTo (const GVector3 &v) |
Gerald Degeneve
|
|
Default constructor initializes all components to 0. |
|
|
Initializes all components to the given value. |
|
||||||||||||||||
|
Initializes vector to given values. |
|
|
Initializes vector to given array.
|
|
|
Copy constructor |
|
|
Mathematically adds given vector to this vector. |
|
|
Calculates the angle (in radians!!) between two vectors. If one of the involved vector's length is 0 then 0 is returned
|
|
|
Calculates the cross product and returns a new vector.
|
|
|
If a GVector3 is used as a point/position then this method can be used to calculate distances between two points.
|
|
|
Calculates the dot product of this * right.
|
|
|
Calculates the length of the vector. |
|
|
Calculates the square-length of the vector. |
|
|
Scales the vector by given scalar. |
|
|
Normalizes the vector to a length of 1. Be careful with vectors that have all components set to 0. |
|
|
Multiplies this vector with given scalar and returns the result.
|
|
|
Adds this vector to given vector and returns a new vector as the result. |
|
|
Adds given vector to this vector. |
|
|
Subtracts this vector from given vector and returns a new vector as the result. |
|
|
Subtracts given vector from this vector. |
|
|
Copies all members from given vector. |
|
|
Compares the given vector to this vector with an epsilon of 0.00001
|
|
|
Projects this vector onto given vector and returns this vector. If the length of the given vector is 0 then this vector is NOT projected and returned as is. |
|
|
Resets the vector to x=y=z=0. |
|
||||||||||||||||
|
This can be used for asymetric scaling. Every component is multiplied with the corresponding given value. |
|
|
Simply calls scaleXYZ(scale.x,scale.y,scale.z); |
|
|
Copies values from given vector. |
|
||||||||||||||||
|
Sets the vector to given values. |
|
|
Mathematically subtracts given vector from this vector. |
|
||||||||||||
|
Turns this vector around given vector for given angle;
|
|
|
Array of coordinates. |
|
|
Texture coordinate u. |
|
|
Texture coordinate v. |
|
|
Texture coordinate w. |
|
|
Point coordinate x. |
|
|
Point coordinate y. |
|
|
Point coordinate z. |
1.3.6