2 * Copyright (C) 2003 Robert Kooima
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
18 #include "base_config.h"
19 #include "solid_base.h"
25 /*---------------------------------------------------------------------------*/
29 const struct b_path *base;
31 int f; /* enable flag */
36 const struct b_body *base;
38 float t; /* time on current path */
39 int tm; /* milliseconds */
46 float p[3]; /* position */
53 const struct b_swch *base;
55 float t; /* current timer */
56 int tm; /* milliseconds */
57 int f; /* current state */
58 int e; /* is a ball inside it? */
63 float e[3][3]; /* basis of orientation */
64 float p[3]; /* position vector */
65 float v[3]; /* velocity vector */
66 float w[3]; /* angular velocity vector */
67 float E[3][3]; /* basis of pendulum */
68 float W[3]; /* angular pendulum velocity */
74 const struct s_base *base;
89 /*---------------------------------------------------------------------------*/
91 int sol_load_vary(struct s_vary *, const struct s_base *);
92 void sol_free_vary(struct s_vary *);
94 /*---------------------------------------------------------------------------*/
97 * Buffers changes to the varying SOL data for interpolation purposes.
102 float t; /* time on current path */
109 float e[3][3]; /* basis of orientation */
110 float p[3]; /* position vector */
111 float E[3][3]; /* basis of pendulum */
112 float r; /* radius */
122 struct l_body (*bv)[2];
123 struct l_ball (*uv)[2];
126 /*---------------------------------------------------------------------------*/
130 int sol_load_lerp(struct s_lerp *, struct s_vary *);
131 void sol_free_lerp(struct s_lerp *);
133 void sol_lerp_copy(struct s_lerp *);
134 void sol_lerp_apply(struct s_lerp *, float);
135 int sol_lerp_cmd(struct s_lerp *, struct cmd_state *, const union cmd *);
137 /*---------------------------------------------------------------------------*/