QcEnchantingAura Class
What the enchanting tables near the player show in the world (decision E-884), as in the reference: a book floating above each table, turning towards the viewer and opening when the viewer comes near, and runes flying in an arc from the bookshelves that count (QcEnchantingTable) to the table. More...
| Header: | #include <clientcore/session/QcEnchantingAura.h> |
Public Types
Public Functions
| void | refresh(const QcClientWorld &world, const QcVec3 &eye, quint64 tick) |
| const QList<QcEnchantingAura::Rune> & | runesOf(const QcEnchantingAura::Table &table, double seconds) |
| const QList<QcEnchantingAura::Table> & | tables() const |
Static Public Members
| QcEnchantingAura::Book | bookOf(QcBlockPos table, const QcVec3 &viewer, double seconds) |
| const double | cycleSeconds |
| const double | flightSeconds |
| const int | maxTables |
| const double | openDistance |
| const int | radius |
| const int | rescanTicks |
Detailed Description
The tables and their shelves are found again every rescanTicks by looking only into the chunk sections whose palette holds a table, like the campfire smoke (QcCampfireSmoke). Book and runes follow from the positions, the viewer and the time alone, so nothing is kept per rune.
Member Function Documentation
[static] QcEnchantingAura::Book QcEnchantingAura::bookOf(QcBlockPos table, const QcVec3 &viewer, double seconds)
Returns the book above the table at table for a viewer at viewer at seconds of the animations' clock (decision E-962).
void QcEnchantingAura::refresh(const QcClientWorld &world, const QcVec3 &eye, quint64 tick)
Looks for the tables of world around eye again when tick is rescanTicks past the last look or the content changed.
const QList<QcEnchantingAura::Rune> &QcEnchantingAura::runesOf(const QcEnchantingAura::Table &table, double seconds)
Returns the runes flying to table at seconds of the animations' clock (QcWorldMirror::animationSeconds, decision E-962), in a list the aura reuses: valid until the next call.
const QList<QcEnchantingAura::Table> &QcEnchantingAura::tables() const
Returns the tables found by the latest look, the nearest at most maxTables.
Member Variable Documentation
const int QcEnchantingAura::maxTables
Tables drawn at most (the nearest).
const double QcEnchantingAura::openDistance
The book opens within this distance of the viewer (metres) and is wide open at half of it.
const int QcEnchantingAura::radius
Blocks around the eye within which tables are found.
const int QcEnchantingAura::rescanTicks
Ticks between two looks for the tables.