SpatialVector<T> CrossProduct(const SpatialVector<T> rhVector) { T x = Y() * rhVector.Z() - Z() * rhVector.Y(); T y = Z() * rhVector.X() - X() * rhVector.Z(); T z = X() * rhVector.Y() - Y() * rhVector.X(); return SpatialVector<T> (x,y,z); }
SpatialVector<T> operator-(const SpatialVector<T>& arg2) const { return SpatialVector<T>(X() - arg2.X(), Y() - arg2.Y(), Z() - arg2.Z()); }
SpatialVector<T> operator+(const SpatialVector<T>& arg2) { return SpatialVector<T>(X() + arg2.X(), Y() + arg2.Y(), Z() + arg2.Z()); }
T InnerProduct(const SpatialVector<T> rhVector) { T retVal = boost::initialized_value; retVal = X()*rhVector.X() + Y()*rhVector.Y() + Z()*rhVector.Z(); return retVal; }