QtCraft API C++ classes QML types Handbook

QcCampfireSmoke Class

The smoke rising from the lit campfires near the player (decision E-772): a list of the campfires (blocks whose campfire cooks) within radius blocks, found again every rescanTicks by looking only into the chunk sections whose palette holds such a block, and a few puffs per campfire that rise, drift and shrink in a loop. More...

Header: #include <clientcore/session/QcCampfireSmoke.h>

Public Functions

const QList<QcBlockPos> &campfires() const
void refresh(const QcClientWorld &world, const QcVec3 &eye, quint64 tick)

Static Public Members

const int maxCampfires
const double puffSeconds
QList<QcEffectPuff> puffsOf(QcBlockPos pos, double seconds)
const int puffsPerCampfire
const int radius
const int rescanTicks

Detailed Description

The puffs follow from the campfire's position and the time alone, so nothing is kept per puff.

Member Function Documentation

const QList<QcBlockPos> &QcCampfireSmoke::campfires() const

Returns the smoking campfires found by the latest look, the nearest at most maxCampfires.

[static] QList<QcEffectPuff> QcCampfireSmoke::puffsOf(QcBlockPos pos, double seconds)

Returns the puffs of the campfire at pos at seconds of the animations' clock (QcWorldMirror::animationSeconds, decision E-962).

void QcCampfireSmoke::refresh(const QcClientWorld &world, const QcVec3 &eye, quint64 tick)

Looks for the campfires of world around eye again when tick is rescanTicks past the last look or the world changed.

Member Variable Documentation

const int QcCampfireSmoke::maxCampfires

Campfires drawn with smoke at most (the nearest).

const double QcCampfireSmoke::puffSeconds

Seconds a puff takes from the fire to where it fades.

const int QcCampfireSmoke::puffsPerCampfire

Puffs in the air above each campfire at a time.

const int QcCampfireSmoke::radius

Blocks around the eye within which campfires smoke.

const int QcCampfireSmoke::rescanTicks

Ticks between two looks for the campfires.