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
;
44 float t
; /* time on current path */
45 int tm
; /* milliseconds */
52 float p
[3]; /* position */
59 const struct b_swch
*base
;
61 float t
; /* current timer */
62 int tm
; /* milliseconds */
63 int f
; /* current state */
64 int e
; /* is a ball inside it? */
69 float e
[3][3]; /* basis of orientation */
70 float p
[3]; /* position vector */
71 float v
[3]; /* velocity vector */
72 float w
[3]; /* angular velocity vector */
73 float E
[3][3]; /* basis of pendulum */
74 float W
[3]; /* angular pendulum velocity */
96 /* Accumulator for tracking time in integer milliseconds. */
101 /*---------------------------------------------------------------------------*/
103 int sol_load_vary(struct s_vary
*, struct s_base
*);
104 void sol_free_vary(struct s_vary
*);
106 /*---------------------------------------------------------------------------*/
109 * Buffers changes to the varying SOL data for interpolation purposes.
114 float t
; /* time on current path */
121 float e
[3][3]; /* basis of orientation */
122 float p
[3]; /* position vector */
123 float E
[3][3]; /* basis of pendulum */
124 float r
; /* radius */
134 struct l_move (*mv
)[2];
135 struct l_ball (*uv
)[2];
138 /*---------------------------------------------------------------------------*/
142 int sol_load_lerp(struct s_lerp
*, struct s_vary
*);
143 void sol_free_lerp(struct s_lerp
*);
145 void sol_lerp_copy(struct s_lerp
*);
146 void sol_lerp_apply(struct s_lerp
*, float);
147 int sol_lerp_cmd(struct s_lerp
*, struct cmd_state
*, const union cmd
*);
149 /*---------------------------------------------------------------------------*/