|
CellularAutomata
|
Some predefined objects of Conway's Game of Life. More...
Functions | |
| template<typename T > | |
| void | copyInto (T *src, const unsigned int src_h, const unsigned int src_w, T *dst, const unsigned int dst_h, const unsigned int dst_w, const unsigned int y, const unsigned int x) |
| Copy an (small) array into another (large) array at a given position. | |
| template<typename T > | |
| void | Glider (State< T > *state, const unsigned int x, const unsigned int y) |
| Copies a glider (3x3) into given position (https://conwaylife.com/wiki/Glider) | |
| template<typename T > | |
| void | Spaceship (State< T > *state, const unsigned int x, const unsigned int y) |
| Copies a spaceship (4x5) into given position (https://conwaylife.com/wiki/Spaceship) | |
| template<typename T > | |
| void | Bipole1 (State< T > *state, const unsigned int x, const unsigned int y) |
| Copies a bipole (4x4) into given position (https://conwaylife.com/wiki/Bipole) | |
| template<typename T > | |
| void | Bipole2 (State< T > *state, const unsigned int x, const unsigned int y) |
| Copies a (alternative) bipole (5x5) into given position (https://conwaylife.com/wiki/Bipole) | |
| template<typename T > | |
| void | r_Pentomino (State< T > *state, const unsigned int x, const unsigned int y) |
| Copies a R-pentomino (3x3) into given position (https://conwaylife.com/wiki/R-pentomino) | |
Some predefined objects of Conway's Game of Life.
| void CellularAutomata::States::Objects::Bipole1 | ( | State< T > * | state, |
| const unsigned int | x, | ||
| const unsigned int | y | ||
| ) |
Copies a bipole (4x4) into given position (https://conwaylife.com/wiki/Bipole)
| T | type |
| state | state on CPU |
| x | X-position |
| y | Y-position |
| void CellularAutomata::States::Objects::Bipole2 | ( | State< T > * | state, |
| const unsigned int | x, | ||
| const unsigned int | y | ||
| ) |
Copies a (alternative) bipole (5x5) into given position (https://conwaylife.com/wiki/Bipole)
| T | type |
| state | state on CPU |
| x | X-position |
| y | Y-position |
|
inline |
Copy an (small) array into another (large) array at a given position.
| T | type |
| src | small source array |
| src_h | source height |
| src_w | source width |
| dst | large destination array |
| dst_w | destination width |
| dst_h | destination height |
| y | Y insert position |
| x | X insert position |
| OutOfBounds |
| void CellularAutomata::States::Objects::Glider | ( | State< T > * | state, |
| const unsigned int | x, | ||
| const unsigned int | y | ||
| ) |
Copies a glider (3x3) into given position (https://conwaylife.com/wiki/Glider)
| T | type |
| state | state on CPU |
| x | X-position |
| y | Y-position |
| void CellularAutomata::States::Objects::r_Pentomino | ( | State< T > * | state, |
| const unsigned int | x, | ||
| const unsigned int | y | ||
| ) |
Copies a R-pentomino (3x3) into given position (https://conwaylife.com/wiki/R-pentomino)
| T | type |
| state | state on CPU |
| x | X-position |
| y | Y-position |
| void CellularAutomata::States::Objects::Spaceship | ( | State< T > * | state, |
| const unsigned int | x, | ||
| const unsigned int | y | ||
| ) |
Copies a spaceship (4x5) into given position (https://conwaylife.com/wiki/Spaceship)
| T | type |
| state | state on CPU |
| x | X-position |
| y | Y-position |