| 3188 | */ |
| 3189 | |
| 3190 | vector PointSpeed(object *obj, vector *pos, matrix *orient, vector *rotvel, vector *velocity) { |
| 3191 | vector r1 = *pos - obj->pos; |
| 3192 | vector w1; |
| 3193 | vector n1; |
| 3194 | float temp1; |
| 3195 | |
| 3196 | matrix o_t1 = *orient; |
| 3197 | |
| 3198 | vm_TransposeMatrix(&o_t1); |
| 3199 | vector cmp1 = *rotvel * o_t1; |
| 3200 | ConvertEulerToAxisAmount(&cmp1, &n1, &temp1); |
| 3201 | |
| 3202 | n1 *= temp1; |
| 3203 | |
| 3204 | if (temp1 != 0.0f) { |
| 3205 | vm_CrossProduct(&w1, &n1, &r1); |
| 3206 | } else { |
| 3207 | w1 = Zero_vector; |
| 3208 | } |
| 3209 | |
| 3210 | return *velocity + w1; |
| 3211 | } |
| 3212 | |
| 3213 | // MTS: only used in this file. |
| 3214 | // Hacked for some initial testing |
nothing calls this directly
no test coverage detected