boid.h 714 Bytes
Newer Older
Cassio Kirch's avatar
Cassio Kirch committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef DERM_TYPE_ENUM
typedef enum {ENDODERM, ECTODERM} cellType;
#define DERM_TYPE_ENUM
#endif


#ifndef BOID_STRUCT
struct Boid
{
  struct Boid* next;         /* Considering on the same box... */
  struct Boid* previous;     /* ... (same list).               */
  unsigned int boxID;
  unsigned int neighbors;
  unsigned int ectoNeighbors;
  cellType type;             /* Endo or ectoderm. */
  double   gamma;
  double   position[2];
  double   velocity[2];
  double   newVelocity[2];
};
#define BOID_STRUCT
#endif

unsigned int getBoxID (struct Boid boid);

void initializeCircle (struct Boid* const boid);

void initializeRectangle (struct Boid* const boid);

void initializeBoid (struct Boid* const boid);