6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * The Original Code is Copyright (C) 2009 by Janne Karhu.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
35 #include "DNA_boid_types.h"
37 typedef struct BoidBrainData {
38 struct ParticleSimulationData *sim;
39 struct ParticleSettings *part;
40 float timestep, cfra, dfra;
41 float wanted_co[3], wanted_speed;
44 struct Object *goal_ob;
50 void boids_precalc_rules(struct ParticleSettings *part, float cfra);
51 void boid_brain(BoidBrainData *bbd, int p, struct ParticleData *pa);
52 void boid_body(BoidBrainData *bbd, struct ParticleData *pa);
53 void boid_default_settings(BoidSettings *boids);
54 BoidRule *boid_new_rule(int type);
55 BoidState *boid_new_state(BoidSettings *boids);
56 BoidState *boid_duplicate_state(BoidSettings *boids, BoidState *state);
57 void boid_free_settings(BoidSettings *boids);
58 BoidSettings *boid_copy_settings(BoidSettings *boids);
59 BoidState *boid_get_current_state(BoidSettings *boids);