![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
Go to the source code of this file.
Defines | |
#define | VERDICT_EXPORTS |
Functions | |
VerdictVector | interpolate (const double param, const VerdictVector &v1, const VerdictVector &v2) |
VerdictVector | vectorRotate (const double angle, const VerdictVector &normalAxis, const VerdictVector &referenceAxis) |
Variables | |
const double | TWO_VERDICT_PI = 2.0 * VERDICT_PI |
#define VERDICT_EXPORTS |
Definition at line 23 of file VerdictVector.cpp.
VerdictVector interpolate | ( | const double | param, |
const VerdictVector & | v1, | ||
const VerdictVector & | v2 | ||
) |
Definition at line 98 of file VerdictVector.cpp.
{
VerdictVector temp = ( 1.0 - param ) * v1;
temp += param * v2;
return temp;
}
VerdictVector vectorRotate | ( | const double | angle, |
const VerdictVector & | normalAxis, | ||
const VerdictVector & | referenceAxis | ||
) |
Definition at line 225 of file VerdictVector.cpp.
References VerdictVector::normalize().
{
// 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
VerdictVector yAxis = normalAxis * referenceAxis;
VerdictVector xAxis = yAxis * normalAxis;
yAxis.normalize();
xAxis.normalize();
x = cos( angle );
y = sin( angle );
xAxis *= x;
yAxis *= y;
return VerdictVector( xAxis + yAxis );
}
const double TWO_VERDICT_PI = 2.0 * VERDICT_PI |
Definition at line 34 of file VerdictVector.cpp.
Referenced by VerdictVector::scale_angle(), VerdictVector::vector_angle(), VerdictVector::vector_angle_quick(), and VerdictVector::xy_to_rtheta().