cgma
|
#include <geometry.hpp>
Public Member Functions | |
Vector3d () | |
Vector3d (const double p[3]) | |
Vector3d (double x, double y, double z) | |
Vector3d (const std::vector< double > &p, int idx=0) | |
double | length () const |
Vector3d | normalize () const |
Vector3d | operator- () const |
Vector3d | reverse () const |
Vector3d | scale (double d) const |
Vector3d | operator* (double d) const |
Vector3d | add (const Vector3d &alt) const |
Vector3d | operator+ (const Vector3d &alt) const |
double | dot (const Vector3d &alt) const |
Vector3d | cross (const Vector3d &alt) const |
Vector3d | rotate_about (const Vector3d &v_p, double theta_p, bool degrees=true) const |
Vector3d | projection (const Vector3d &v) const |
project v onto this vector, return the result | |
Public Attributes | |
double | v [3] |
Definition at line 17 of file geometry.hpp.
Vector3d::Vector3d | ( | ) | [inline] |
Definition at line 22 of file geometry.hpp.
Vector3d::Vector3d | ( | const double | p[3] | ) | [inline] |
Definition at line 26 of file geometry.hpp.
Vector3d::Vector3d | ( | double | x, |
double | y, | ||
double | z | ||
) | [inline] |
Definition at line 32 of file geometry.hpp.
Vector3d::Vector3d | ( | const std::vector< double > & | p, |
int | idx = 0 |
||
) | [inline] |
Definition at line 38 of file geometry.hpp.
Vector3d Vector3d::add | ( | const Vector3d & | alt | ) | const [inline] |
Vector3d Vector3d::cross | ( | const Vector3d & | alt | ) | const [inline] |
double Vector3d::dot | ( | const Vector3d & | alt | ) | const [inline] |
double Vector3d::length | ( | ) | const [inline] |
Vector3d Vector3d::normalize | ( | ) | const [inline] |
Vector3d Vector3d::operator* | ( | double | d | ) | const [inline] |
Definition at line 65 of file geometry.hpp.
{ return scale(d); }
Definition at line 73 of file geometry.hpp.
{ return add(alt); }
Vector3d Vector3d::operator- | ( | ) | const [inline] |
Vector3d Vector3d::projection | ( | const Vector3d & | v | ) | const [inline] |
project v onto this vector, return the result
Definition at line 99 of file geometry.hpp.
Vector3d Vector3d::reverse | ( | void | ) | const [inline] |
Definition at line 57 of file geometry.hpp.
{
return -(*this);
}
Vector3d Vector3d::rotate_about | ( | const Vector3d & | v_p, |
double | theta_p, | ||
bool | degrees = true |
||
) | const [inline] |
Vector3d Vector3d::scale | ( | double | d | ) | const [inline] |
double Vector3d::v[3] |
Definition at line 21 of file geometry.hpp.