boid.h 698 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
#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;
  cellType type;             /* Endo or ectoderm. */
  double   position[2];
  double   velocity[2];
  double   newVelocity[2];
17
18
19
20
21
#if defined(ENDO_GAMMA) || defined(ECTO_GAMMA) || defined(COUNT_NEIGHBORS)
  double   gamma;
  unsigned int endoNeighbors;
  unsigned int ectoNeighbors;
#endif
Cassio Kirch's avatar
Cassio Kirch committed
22
23
24
25
};
#define BOID_STRUCT
#endif

26

Cassio Kirch's avatar
Cassio Kirch committed
27
28
29
30
unsigned int getBoxID (struct Boid boid);

void initializeBoid (struct Boid* const boid);