cgma
|
Go to the source code of this file.
Classes | |
class | CubitVector |
Typedefs | |
typedef void(CubitVector::* | transform_function )(double gamma, double gamma2) |
Functions | |
CUBIT_UTIL_EXPORT CubitVector | vectorRotate (const double angle, const CubitVector &normalAxis, const CubitVector &referenceAxis) |
CubitVector | operator~ (const CubitVector &vec) |
CubitVector | operator+ (const CubitVector &vector1, const CubitVector &vector2) |
CubitVector | operator- (const CubitVector &vector1, const CubitVector &vector2) |
CubitVector | operator* (const CubitVector &vector1, const CubitVector &vector2) |
CubitVector | operator* (const CubitVector &vector1, const double scalar) |
CubitVector | operator* (const double scalar, const CubitVector &vector1) |
CubitVector | operator/ (const CubitVector &vector1, const double scalar) |
int | operator== (const CubitVector &v1, const CubitVector &v2) |
int | operator!= (const CubitVector &v1, const CubitVector &v2) |
double | operator% (const CubitVector &vector1, const CubitVector &vector2) |
CubitVector | interpolate (const double param, const CubitVector &v1, const CubitVector &v2) |
typedef void( CubitVector::* transform_function)(double gamma, double gamma2) |
Definition at line 20 of file CubitVector.hpp.
CubitVector interpolate | ( | const double | param, |
const CubitVector & | v1, | ||
const CubitVector & | v2 | ||
) | [inline] |
Definition at line 634 of file CubitVector.hpp.
{ CubitVector temp = (1.0 - param) * v1; temp += param * v2; return temp; }
int operator!= | ( | const CubitVector & | v1, |
const CubitVector & | v2 | ||
) | [inline] |
double operator% | ( | const CubitVector & | vector1, |
const CubitVector & | vector2 | ||
) | [inline] |
CubitVector operator* | ( | const CubitVector & | vector1, |
const CubitVector & | vector2 | ||
) | [inline] |
Definition at line 563 of file CubitVector.hpp.
{ return CubitVector(vector1) *= vector2; }
CubitVector operator* | ( | const CubitVector & | vector1, |
const double | scalar | ||
) | [inline] |
Definition at line 570 of file CubitVector.hpp.
{ return CubitVector(vector1) *= scalar; }
CubitVector operator* | ( | const double | scalar, |
const CubitVector & | vector1 | ||
) | [inline] |
Definition at line 577 of file CubitVector.hpp.
{ return CubitVector(vector1) *= scalar; }
CubitVector operator+ | ( | const CubitVector & | vector1, |
const CubitVector & | vector2 | ||
) | [inline] |
Definition at line 541 of file CubitVector.hpp.
CubitVector operator- | ( | const CubitVector & | vector1, |
const CubitVector & | vector2 | ||
) | [inline] |
Definition at line 551 of file CubitVector.hpp.
CubitVector operator/ | ( | const CubitVector & | vector1, |
const double | scalar | ||
) | [inline] |
Definition at line 584 of file CubitVector.hpp.
{ return CubitVector(vector1) /= scalar; }
int operator== | ( | const CubitVector & | v1, |
const CubitVector & | v2 | ||
) | [inline] |
CubitVector operator~ | ( | const CubitVector & | vec | ) | [inline] |
Definition at line 511 of file CubitVector.hpp.
CUBIT_UTIL_EXPORT CubitVector vectorRotate | ( | const double | angle, |
const CubitVector & | normalAxis, | ||
const CubitVector & | referenceAxis | ||
) |
Definition at line 265 of file CubitVector.cpp.
{ // A new coordinate system is created with the xy plane corresponding // to the plane normal to the normal axis, and the x axis corresponding to // the projection of the reference axis onto the normal plane. The normal // plane is the tangent plane at the root point. A unit vector is // constructed along the local x axis and then rotated by the given // ccw angle to form the new point. The new point, then is a unit // distance from the global origin in the tangent plane. double x, y; // project a unit distance from root along reference axis CubitVector yAxis = normalAxis * referenceAxis; CubitVector xAxis = yAxis * normalAxis; yAxis.normalize(); xAxis.normalize(); x = cos(angle); y = sin(angle); xAxis *= x; yAxis *= y; return CubitVector(xAxis + yAxis); }