Structure for cell within the spatial grid used for BOIDS separation optimization.
Each cell has an x and y coordinate, as well as an operator+ for adding two SeparationCells together and an operator== for comparing two SeparationCells.
More...
#include <BOIDS.h>
Structure for cell within the spatial grid used for BOIDS separation optimization.
Each cell has an x and y coordinate, as well as an operator+ for adding two SeparationCells together and an operator== for comparing two SeparationCells.
Definition at line 30 of file BOIDS.h.
◆ SeparationCell() [1/2]
| SeparationCell::SeparationCell |
( |
| ) |
|
|
inline |
Definition at line 33 of file BOIDS.h.
33 {
34 this->x = 0;
35 this->y = 0;
36 }
◆ SeparationCell() [2/2]
| SeparationCell::SeparationCell |
( |
int | x, |
|
|
int | y ) |
|
inline |
Definition at line 38 of file BOIDS.h.
38 {
39 this->x = x;
40 this->y = y;
41 }
◆ operator+()
Definition at line 43 of file BOIDS.h.
43 {
44 return SeparationCell(this->x + other.x, this->y + other.y);
45 }
◆ operator==()
Definition at line 47 of file BOIDS.h.
47 {
48 return x == other.x && y == other.y;
49 }
The documentation for this struct was generated from the following file: