53 template <
class T,
class V=T,
class S=T>
105 {t=r.
t;d=r.
d;dd=r.
dd;
return *
this;}
110 d = (d-t*rhs.
d)/rhs.
t;
111 dd= (dd - S(2)*d*rhs.
d-t*rhs.
dd)/rhs.
t;
118 d = (d*rhs.
t+t*rhs.
d);
119 dd = (dd*rhs.
t+S(2)*d*rhs.
d+t*rhs.
dd);
225 template <
class T,
class V,
class S>
230 tmp.
d = (lhs.
d-tmp.
t*rhs.
d)/rhs.
t;
231 tmp.
dd= (lhs.
dd-S(2)*tmp.
d*rhs.
d-tmp.
t*rhs.
dd)/rhs.
t;
235 template <
class T,
class V,
class S>
240 tmp.
d = (lhs.
d*rhs.
t+lhs.
t*rhs.
d);
241 tmp.
dd = (lhs.
dd*rhs.
t+S(2)*lhs.
d*rhs.
d+lhs.
t*rhs.
dd);
245 template <
class T,
class V,
class S>
251 template <
class T,
class V,
class S>
257 template <
class T,
class V,
class S>
263 template <
class T,
class V,
class S>
269 template <
class T,
class V,
class S>
275 template <
class T,
class V,
class S>
281 template <
class T,
class V,
class S>
287 template <
class T,
class V,
class S>
293 template <
class T,
class V,
class S>
299 template <
class T,
class V,
class S>
304 tmp.
d = (-tmp.
t*rhs.
d)/rhs.
t;
305 tmp.
dd= (-S(2)*tmp.
d*rhs.
d-tmp.
t*rhs.
dd)/rhs.
t;
310 template <
class T,
class V,
class S>
317 template <
class T,
class V,
class S>
323 tmp.
dd = tmp.
d*arg.
d+tmp.
t*arg.
dd;
327 template <
class T,
class V,
class S>
333 tmp.
dd = (arg.
dd-tmp.
d*arg.
d)/arg.
t;
337 template <
class T,
class V,
class S>
345 template <
class T,
class V,
class S>
353 template <
class T,
class V,
class S>
361 template <
class T,
class V,
class S>
369 template <
class T,
class V,
class S>
377 template <
class T,
class V,
class S>
385 template <
class T,
class V,
class S>
394 template <
class T,
class V,
class S>
398 tmp.
t =
pow(arg.
t,m);
399 T v2 = (m/arg.
t)*tmp.
t;
401 tmp.
dd = (S((m-1))/arg.
t)*tmp.
d*arg.
d + v2*arg.
dd;
405 template <
class T,
class V,
class S>
411 tmp.
d = (S(0.5)/tmp.
t)*arg.
d;
412 tmp.
dd = (S(0.5)*arg.
dd-
sqr(tmp.
d))/tmp.
t;
416 template <
class T,
class V,
class S>
428 template <
class T,
class V,
class S>
441 template <
class T,
class V,
class S>
453 template <
class T,
class V,
class S>
459 tmp.
d = (x.
t*y.
d-x.
d*y.
t)/v;
460 tmp.
dd = ( x.
t*y.
dd-x.
dd*y.
t-S(2)*(x.
t*x.
d+y.
t*y.
d)*tmp.
d ) / v;
464 template <
class T,
class V,
class S>
471 template <
class T,
class V,
class S>
476 tmp.
d = (x.
t*x.
d+y.
t*y.
d)/tmp.
t;
482 template <
class T,
class V,
class S>
485 return Norm(value.
t);
491 template <
class T,
class V,
class S>
501 template <
class T,
class V,
class S>
509 template <
class T,
class V,
class S>
517 template <
class T,
class V,
class S>
525 template <
class T,
class V,
class S>
VectorAcc operator/(const VectorAcc &r1, double r2)
INLINE Rall2d< T, V, S > & operator=(S c)
INLINE Rall2d(typename TI< T >::Arg tn, const V &afg, const V &afg2)
INLINE S Norm(const Rall1d< T, V, S > &value)
INLINE void LinCombR(S alfa, const Rall1d< T, V, S > &a, const T &beta, const Rall1d< T, V, S > &b, Rall1d< T, V, S > &result)
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
static INLINE Rall2d< T, V, S > Identity()
ArticulatedBodyInertia operator+(const ArticulatedBodyInertia &Ia, const ArticulatedBodyInertia &Ib)
INLINE Rall1d< T, V, S > cosh(const Rall1d< T, V, S > &arg)
INLINE Rall2d< T, V, S > & operator/=(const Rall2d< T, V, S > &rhs)
INLINE Rall1d< T, V, S > hypot(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > sqr(const Rall1d< T, V, S > &arg)
const T & Arg
Arg is used for passing the element to a function.
INLINE Rall1d< T, V, S > sinh(const Rall1d< T, V, S > &arg)
static INLINE Rall2d< T, V, S > Zero()
INLINE Rall1d< T, V, S > tanh(const Rall1d< T, V, S > &arg)
IMETHOD void SetToZero(Vector &v)
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
INLINE Rall1d< T, V, S > atan(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
INLINE Rall2d(const Rall2d< T, V, S > &r)
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
ArticulatedBodyInertia operator*(double a, const ArticulatedBodyInertia &I)
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
INLINE void SetToIdentity(Rall1d< T, V, S > &value)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > abs(const Rall1d< T, V, S > &x)
INLINE Rall2d< T, V, S > & operator+=(const Rall2d< T, V, S > &rhs)
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
INLINE Rall2d< T, V, S > & operator*=(const Rall2d< T, V, S > &rhs)
INLINE Rall2d(typename TI< T >::Arg tn, const V &afg)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > tan(const Rall1d< T, V, S > &arg)
INLINE Rall2d(typename TI< T >::Arg c)
ArticulatedBodyInertia operator-(const ArticulatedBodyInertia &Ia, const ArticulatedBodyInertia &Ib)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
INLINE Rall2d< T, V, S > & operator-=(const Rall2d< T, V, S > &rhs)
INLINE Rall1d< T, V, S > LinComb(S alfa, const Rall1d< T, V, S > &a, const T &beta, const Rall1d< T, V, S > &b)