24 #include "musclepair.h"
44 lmin = 2.0f*rl - lmax;
45 this->ash = (rl*rl) / ( (lmax-rl)*(lmax-rl) );
54 lmin = 2.0f*rl - lmax;
55 ash = (rl*rl) / ( (lmax-rl)*(lmax-rl) );
72 lmin = 2.0f*rl - lmax;
73 ash = (rl*rl) / ( (lmax-rl)*(lmax-rl) );
94 reduceKsh = reduceFactor;
124 dof->
limits( lowLim, higLim );
125 l1 =
linearMap( angle, lowLim, higLim, lmin, lmax );
134 dx1 = ( x1 - last_x1 ) / timestep;
135 dx2 = ( x2 - last_x2 ) / timestep;
137 float ta1 = act1 * ( -ash*tmax*(x1-rl)*(x1-rl)/(rl*rl) + tmax );
138 float tp1 = reduceKsh*0.5*tmax * ( exp( ksh*(x1-rl)/(lmax-rl) ) - 1.0f ) / ( exp( ksh ) - 1.0f );
141 float ta2 = act2 * ( -ash*tmax*(x2-rl)*(x2-rl)/(rl*rl) + tmax );
142 float tp2 = reduceKsh*0.5*tmax * ( exp( ksh*(x2-rl)/(lmax-rl) ) - 1.0f ) / ( exp( ksh ) - 1.0f );
151 return -(ta1+tp1+tv1) + (ta2+tp2+tv2);