Template class encapsulating a type that will be replicated from Server to Clients, and is stored inside a FieldContainer.
#include <nrg_field.h>
Public Member Functions | |
| Field (FieldContainer *c) | |
| Field (FieldContainer *c, const T &t) | |
| virtual size_t | readFromPacket (Packet &p) |
Reads data from Packet p into this Field. | |
| virtual size_t | writeToPacket (Packet &p) const |
Writes this Field into the Packet p. | |
| virtual void | shiftData () |
| Indicates a new Snapshot has begun and the Field should move data_next to data. | |
| void | set (const T &other) |
| Alternative to Field::operator=. | |
| Field & | operator= (const T &other) |
| Assignment operator, which also marks this field as having been updated. | |
| T | get () const |
| Returns the most up-to-date data without interpolation. | |
| template<class F > | |
| T | getInterp (const F &func) const |
Returns data interpolated between the two latest Snapshots using func. | |
| T | getInterp () const |
| Returns data linearly interpolated between the two latest Snapshots using nrg::lerp. | |