MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
|
#include <Element_Bar.h>
Public Member Functions | |
const char * | GetName () const |
SPoint | GetMax (const T &atom) const |
SPoint | GetPos (const T &atom) const |
bool | FitsInRep (const SPoint &v) const |
void | SetSize (T &atom, const SPoint &v) const |
void | SetPos (T &atom, const SPoint v) const |
virtual const T & | GetDefaultAtom () const |
T | GetAtom (const SPoint &size, const SPoint &pos) const |
virtual u32 | DefaultPhysicsColor () const |
virtual u32 | DefaultLowlightColor () const |
virtual u32 | LocalPhysicsColor (const T &atom, u32 selector) const |
virtual void | Behavior (EventWindow< CC > &window) const |
![]() | |
Element (const UUID &uuid) | |
void | AllocateType () |
u32 | GetType () const |
const char * | GetAtomicSymbol () const |
const char * | GetName () const |
virtual void | AppendDescription (const T *atom, OString64 &desc) const |
bool | IsType (u32 type) const |
const UUID & | GetUUID () const |
virtual u32 | PhysicsColor () const |
virtual const char * | GetDescription () const |
void | ToggleLowlightPhysicsColor () |
virtual u32 | Diffusability (EventWindow< CC > &ew, SPoint nowAt, SPoint maybeAt) const |
u32 | NoDiffusability (EventWindow< CC > &ew, SPoint nowAt, SPoint maybeAt) const |
const ElementParameters< CC > & | GetElementParameters () const |
ElementParameters< CC > & | GetElementParameters () |
const AtomicParameters< CC > & | GetAtomicParameters () const |
AtomicParameters< CC > & | GetAtomicParameters () |
Static Public Member Functions | |
static const u32 | TYPE () |
static bool | IsBarType (u32 type) |
Static Public Attributes | |
static Element_Bar | THE_INSTANCE |
static const u32 | TYPE_BITS = 8 |
static const u32 | TYPE_MASK = (1<<TYPE_BITS)-1 |
static const u32 | BITS_PER_DIM = 8 |
static const u32 | STATE_SIZE_IDX = 0 |
static const u32 | STATE_SIZE_LEN = 2 * BITS_PER_DIM |
static const u32 | STATE_POS_IDX = STATE_SIZE_IDX + STATE_SIZE_LEN |
static const u32 | STATE_POS_LEN = 2 * BITS_PER_DIM |
static const u32 | STATE_BITS = STATE_POS_IDX + STATE_POS_LEN |
![]() | |
static const u32 | COMPLETE_DIFFUSABILITY = 1000 |
Additional Inherited Members | |
![]() | |
virtual T | BuildDefaultAtom () const |
const BitVector < P::BITS_PER_ATOM > & | GetBits (const T &atom) const |
BitVector< P::BITS_PER_ATOM > & | GetBits (T &atom) const |
bool | IsValidAtomicSymbol (const char *symbol) |
void | SetAtomicSymbol (const char *symbol) |
void | SetName (const char *name) |
void | Diffuse (EventWindow< CC > &window) const |
virtual u32 | PercentMovable (const T &you, const T &me, const SPoint &offset) const =0 |
A bar-forming class.
Bar grid positions in an event window
-4 -3 -2 -1 0 1 2 3 4 -4 . . . . x . . . . -3 . . . . . . . . . -2 . . x . x . x . . -1 . . . . . . . . . 0 x . x . C . x . x 1 . . . . . . . . . 2 . . x . x . x . . 3 . . . . . . . . . 4 . . . . x . . . .
Each bar atom knows how big the grid is supposed to be (GetMax()), and where within that grid it is supposed to be (GetPos()).
Class: (C1) Name is Element_Bar (C2) Type is 0xba2
|
inlinevirtual |
Describes the behavior of this Element. This is invoked when an Atom of this Element is chosen as the center of an EventWindow for an Event, which is given as a parameter.
window | The EventWindow describing the Event which is currently being executed. |
Implements MFM::Element< CC >.
|
inlinevirtual |
Gets the 32-bit ARGB formatted color that all Atoms of this Element will be drawn with when they have lowlight drawing enabled.
Reimplemented from MFM::Element< CC >.
|
inlinevirtual |
Gets the 32-bit ARGB formatted color that all Atoms of this Element will be drawn with.
Implements MFM::Element< CC >.
|
inlinevirtual |
Gets the default Atom of this Element . If this Element has not been assigned a type through AllocateType()
, this will FAIL with ILLEGAL_STATE. NOTE: The defaultAtom returned here will have been constructed by Element::BuildDefaultAtom, which leaves all state bits zero. If this is not desirable, element subclasses should override this to provide their own default atom initialization.
Reimplemented from MFM::Element< CC >.
|
inlinevirtual |
Used during rendering, will select a color for any Atom of this Element to be rendered with. This should be overridden if wanting to use a gradient or some other variable color based on the body of the specified Atom .
atom | The Atom of this element of which to find a color for. |
selector | An additional argument which may be used to determine the color of which to render atom |
atom
with. Reimplemented from MFM::Element< CC >.