X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=common.h;h=f4239630e4c5f60081c3f460c8c82556e66ae754;hb=4744d53642cca117c2e130d39cc58b2911336bf3;hp=952b51d8b6b6053db9580acbb1d02740dc04e2ff;hpb=d57b7661518800479c00300ce57407378696eec9;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/common.h b/common.h index 952b51d..f423963 100644 --- a/common.h +++ b/common.h @@ -20,7 +20,10 @@ enum classtype k_classtype_instance = 6, k_classtype_capsule = 7, k_classtype_route_node = 8, - k_classtype_route = 9 + k_classtype_route = 9, + k_classtype_bone = 10, + k_classtype_skeleton = 11, + k_classtype_skin = 12 }; /* TODO: he needs a home somewhere */ @@ -32,4 +35,19 @@ struct ray_hit v3f pos, normal; }; +/* TODO: he needs a home somewhere */ +static void eval_bezier_time( v3f p0, v3f p1, v3f h0, v3f h1, float t, v3f p ) +{ + float tt = t*t, + ttt = tt*t; + + v3_muls( p1, ttt, p ); + v3_muladds( p, h1, 3.0f*tt -3.0f*ttt, p ); + v3_muladds( p, h0, 3.0f*ttt -6.0f*tt +3.0f*t, p ); + v3_muladds( p, p0, 3.0f*tt -ttt -3.0f*t +1.0f, p ); +} + +/* TODO: he needs a home somewhere */ +static float *player_get_pos(void); + #endif /* COMMON_H */