|
MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
|
#include <EventWindow.h>
Public Member Functions | |
| bool | InWindow (const SPoint &offset) const |
| SPoint | MapToTileValid (const SPoint &offset) const |
| PointSymmetry | GetSymmetry () const |
| void | SetSymmetry (const PointSymmetry psym) |
| Random & | GetRandom () |
| Tile< CC > & | GetTile () |
| bool | IsLiveSite (const SPoint &location) const |
| EventWindow (Tile< CC > &tile) | |
| void | SetCenterInTile (const SPoint ¢er) |
| const SPoint & | GetCenterInTile () const |
| ~EventWindow () | |
| u32 | GetAtomCount () |
| const T & | GetCenterAtom () const |
| void | SetCenterAtom (const T &atom) |
| const T & | GetRelativeAtom (const SPoint &offset) const |
| const T & | GetRelativeAtom (const Dir mooreOffset) const |
| bool | SetRelativeAtom (const SPoint &offset, const T &atom) |
| void | SwapAtoms (const SPoint &locA, const SPoint &locB) |
| void | SwapCenterAtom (const SPoint &relative) |
An EventWindow provides access for an Element to a selected portion of the sites of a Tile to enable the Element::behavior() method to compute a state transition.
|
inline |
Constructs a new EventWindow which takes place on a specified Tile with the default PointSymmetry of PSYM_NORMAL .
| tile | The Tile which this EventWindow will take place in. |
|
inline |
Deconstructs this EventWindow.
|
inline |
Gets the number of sites that are visible, and therefore mutable, to this EventWindow .
|
inline |
Gets the immutable Atom which resides in the center of this EventWindow.
|
inline |
Get the position this EventWindow within the Tile it resides in, in untransformed Tile coordinates.
|
inline |
Gets the Random object used by the Tile that this EventWindow is taking place inside.
| const CC::ATOM_TYPE & MFM::EventWindow< CC >::GetRelativeAtom | ( | const SPoint & | offset | ) | const |
Gets an Atom residing at a specified location inside this EventWindow .
| offset | The location, relative to the center of this EventWindow , of the Atom to be retreived. If this is not inside the EventWindow, will FAIL with ILLEGAL_ARGUMENT . |
offset . | const CC::ATOM_TYPE & MFM::EventWindow< CC >::GetRelativeAtom | ( | const Dir | mooreOffset | ) | const |
Gets an Atom residing at a specified direction from the center atom inside this EventWindow .
| offset | The direction, relative to the center of this EventWindow , of the Atom to be retreived. If this is not inside the EventWindow, will FAIL with ILLEGAL_ARGUMENT . |
offset .
|
inline |
Gets the PointSymmetry currently used by this EventWindow .
|
inline |
Gets the Tile that this EventWindow is taking place inside.
|
inline |
Checks to see if an SPoint describing a vector relative to the center of this EventWindow, is actually within reach of the center of this EventWindow.
| offset | The relative SPoint to check for membership of in this EventWindow. |
true if offset is considered to be inside this EventWindow.
|
inline |
Checks to see if a particular SPoint, relative to the center of this EventWindow, points to a Site that may be used during event execution.
| location | The relative point to check for liveliness in this EventWindow . |
true if this site may be reached during event execution, else false . | SPoint MFM::EventWindow< CC >::MapToTileValid | ( | const SPoint & | offset | ) | const |
FAIL(ILLEGAL_ARGUMENT) if offset is not in the event window
|
inline |
Sets the Atom in the center of this EventWindow to a specified Atom .
| atom | The Atom that will now reside in the center of this EventWindow . |
|
inline |
Place this EventWindow within GetTile, in untransformed Tile coordinates.
| center | The new center of this EventWindow . |
| bool MFM::EventWindow< CC >::SetRelativeAtom | ( | const SPoint & | offset, |
| const T & | atom | ||
| ) |
Sets an Atom residing at a specified location in this EventWindow to a specified Atom .
| offset | The location, relative to the center of this EventWindow , of the Atom to be set. If this is not inside the EventWindow, will FAIL with ILLEGAL_ARGUMENT . |
| atom | The Atom to place in this EventWindow . |
true .
|
inline |
Sets the PointSymmetry to be used by this EventWindow.
| psym | The new PointSymmetry that wil be used by this EventWindow . |
| void MFM::EventWindow< CC >::SwapAtoms | ( | const SPoint & | locA, |
| const SPoint & | locB | ||
| ) |
| void MFM::EventWindow< CC >::SwapCenterAtom | ( | const SPoint & | relative | ) |
Takes the Atom in a specified location and swaps it with an Atom in the center of this EventWindow.
| relative | The location of the first Atom to swap with this EventWindow's center atom. |
1.8.6