Пример #1
0
void
CreateBasis(const avtVector &N, const avtVector &UP, 
        avtVector &u, avtVector &v, avtVector&w)
{
   w = N.normalized();
   u = (UP % w).normalized();
   if (u.norm() == 0)
   {
       avtVector origin(0., 0., 0.);
       avtVector y(0., 1., 0.);
       avtMatrix R; R.MakeRBT(origin, N, UP);
       y = R * y;
       u = (y % w).normalized();
   }
   v = (w % u).normalized();
}
Пример #2
0
// ****************************************************************************
//  Method:  avtTrackball::SetConstrainAxis
//
//  Purpose:
//    Set an axis to constrain to.
//
//  Arguments:
//    v          the axis
//
//  Programmer:  Jeremy Meredith
//  Creation:    October  9, 2001
//
// ****************************************************************************
void
avtTrackball::SetConstrainAxis(const avtVector &v)
{
    constrainAxis = v.normalized();
    constrain = true;
}