1 #ifndef SimTK_UNITVEC_H
2 #define SimTK_UNITVEC_H
40 template <
class P,
int S>
class UnitVec;
55 template <
class P,
int S>
74 :
BaseVec( static_cast<const typename UnitVec<P,S2>::
BaseVec&>(u) ) {}
103 { assert(0 <= axis && axis <= 2);
177 {
return *
reinterpret_cast<const UnitVec*
>(p); }
181 template <
class P,
int S>
inline UnitVec<P,1>
186 const int minAxis = u[0] <= u[1] ? (u[0] <= u[2] ? 0 : 2)
187 : (u[1] <= u[2] ? 1 : 2);
194 template <
class P,
int S1,
int S2>
inline bool
201 template <
class P,
int S1,
int S2>
inline bool
203 {
return !(u1==u2); }
211 template <
class P,
int S>
227 :
BaseRow(static_cast<const typename UnitRow<P,S2>::
BaseRow&>(u)) { }
248 UnitRow(
const RealP& x,
const RealP& y,
const RealP& z)
254 { assert(0 <= axis && axis <= 2);
317 {
return *
reinterpret_cast<const UnitRow*
>(p); }
320 template <
class P,
int S>
325 const int minAxis = u[0] <= u[1] ? (u[0] <= u[2] ? 0 : 2)
326 : (u[1] <= u[2] ? 1 : 2);
334 template <
class P,
int S1,
int S2>
inline bool
341 template <
class P,
int S1,
int S2>
inline bool
343 {
return !(u1==u2); }
349 #endif // SimTK_UNITVEC_H_