Strong Coupling Core
0.1.0
Library for solving a system of strong coupled physical subsystems.
|
3D vector class More...
#include <Vec3.h>
Public Member Functions | |
Vec3 () | |
Vec3 (double x, double y, double z) | |
virtual | ~Vec3 () |
Vec3 | cross (const Vec3 &u) const |
Cross product. More... | |
Vec3 | add (const Vec3 &v) const |
Addition. More... | |
Vec3 | subtract (const Vec3 &u) const |
double | dot (const Vec3 &u) const |
Dot product. More... | |
double | x () const |
double | y () const |
double | z () const |
void | set (double x, double y, double z) |
Set the elements. More... | |
void | copy (const Vec3 &) |
Copy elements from some other vector. More... | |
double & | operator[] (const int i) |
Element access. More... | |
void | operator+= (const Vec3 &v) |
u += v More... | |
Vec3 | operator* (double s) const |
v * scalar More... | |
Vec3 | operator+ (const Vec3 v) const |
v + u More... | |
Vec3 | operator- (const Vec3 v) const |
u - v More... | |
3D vector class
Vec3::Vec3 | ( | ) |
Vec3::Vec3 | ( | double | x, |
double | y, | ||
double | z | ||
) |
|
virtual |
void Vec3::copy | ( | const Vec3 & | v | ) |
Copy elements from some other vector.
double Vec3::dot | ( | const Vec3 & | u | ) | const |
Dot product.
|
inline |
v * scalar
|
inline |
u += v
|
inline |
Element access.
void Vec3::set | ( | double | x, |
double | y, | ||
double | z | ||
) |
Set the elements.
double Vec3::x | ( | ) | const |
double Vec3::y | ( | ) | const |
double Vec3::z | ( | ) | const |