| 168 |  | } | 
| 169 |  |  | 
| 170 |  | /** | 
| 171 | + | * Freezes out all velocity, angular velocity, forces and torques | 
| 172 | + | * on this StuntDouble.  Also computes the number of frozen degrees | 
| 173 | + | * of freedom. | 
| 174 | + | * @return the total number of frozen degrees of freedom | 
| 175 | + | */ | 
| 176 | + | int freeze() { | 
| 177 | + |  | 
| 178 | + | int fdf = 3; | 
| 179 | + |  | 
| 180 | + | setVel(V3Zero); | 
| 181 | + | setFrc(V3Zero); | 
| 182 | + | if (isDirectional()){ | 
| 183 | + | setJ(V3Zero); | 
| 184 | + | setTrq(V3Zero); | 
| 185 | + | if (isLinear()) | 
| 186 | + | fdf +=2; | 
| 187 | + | else | 
| 188 | + | fdf +=3; | 
| 189 | + | } | 
| 190 | + | return fdf; | 
| 191 | + | } | 
| 192 | + |  | 
| 193 | + | /** | 
| 194 |  | * Returns the previous position of this stuntdouble | 
| 195 |  | * @return the position of this stuntdouble | 
| 196 |  | */ |