MOAB: Mesh Oriented datABase  (version 5.2.1)
VerdictVector.cpp File Reference
#include "moab/verdict.h"
#include <math.h>
#include "VerdictVector.hpp"
#include <float.h>
+ Include dependency graph for VerdictVector.cpp:

Go to the source code of this file.




VerdictVector interpolate (const double param, const VerdictVector &v1, const VerdictVector &v2)
VerdictVector vectorRotate (const double angle, const VerdictVector &normalAxis, const VerdictVector &referenceAxis)


const double TWO_VERDICT_PI = 2.0 * VERDICT_PI

Define Documentation


Definition at line 23 of file VerdictVector.cpp.

Function Documentation

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 219 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;

    x = cos( angle );
    y = sin( angle );

    xAxis *= x;
    yAxis *= y;
    return VerdictVector( xAxis + yAxis );

Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines