The Gnome Chemistry Utils
0.12.11
|
3D vector. More...
#include <gcu/vector.h>
Public Member Functions | |
Vector () | |
Vector (double x, double y, double z) | |
Vector (double d[3]) | |
Vector (Vector const &v) | |
Vector | operator+ (Vector const &v) const |
Vector | operator- (Vector const &v) const |
Vector | operator* (double m) const |
Vector | operator/ (double d) const |
Vector | operator*= (double m) |
Vector | operator/= (double d) |
double | operator[] (unsigned i) const |
double | GetLength () const |
Vector | CreateOrthogonal () const |
Vector | Cross (Vector const &v) const |
void | SetX (double val) |
double | GetX (void) const |
double & | GetRefX (void) |
void | SetY (double val) |
double | GetY (void) const |
double & | GetRefY (void) |
void | SetZ (double val) |
double | GetZ (void) const |
double & | GetRefZ (void) |
Constructs a vector with all three coordinates equal to 0.
gcu::Vector::Vector | ( | double | x, |
double | y, | ||
double | z | ||
) |
x | the first coordinate. |
y | the second coordinate. |
z | the third coordinate. |
Constructs a vector using the given coordinates.
gcu::Vector::Vector | ( | double | d[3] | ) |
d | an array of coordinates. |
Constructs a vector using the given coordinates.
gcu::Vector::Vector | ( | Vector const & | v | ) |
v | a Vector. |
Coopy constructor.
Vector gcu::Vector::CreateOrthogonal | ( | ) | const |
Vector gcu::Vector::Cross | ( | Vector const & | v | ) | const |
v | a Vector. |
double gcu::Vector::GetLength | ( | ) | const |
gcu::Vector::GetRefX | ( | void | ) | [inline] |
gcu::Vector::GetRefY | ( | void | ) | [inline] |
gcu::Vector::GetRefZ | ( | void | ) | [inline] |
gcu::Vector::GetX | ( | void | ) | const [inline] |
gcu::Vector::GetY | ( | void | ) | const [inline] |
gcu::Vector::GetZ | ( | void | ) | const [inline] |
Vector gcu::Vector::operator* | ( | double | m | ) | const |
m | a number. |
Vector gcu::Vector::operator*= | ( | double | m | ) |
m | a number. |
Multiplies this by m.
v | a Vector. |
v | a Vector. |
Vector gcu::Vector::operator/ | ( | double | d | ) | const |
d | a number. |
Vector gcu::Vector::operator/= | ( | double | d | ) |
d | a number. |
Divides this by d.
double gcu::Vector::operator[] | ( | unsigned | i | ) | const |
i | an index. |
return the ith coordinate.
gcu::Vector::SetX | ( | double | x | ) | [inline] |
gcu::Vector::SetY | ( | double | y | ) | [inline] |
gcu::Vector::SetZ | ( | double | z | ) | [inline] |