QtCraft API C++ classes QML types Handbook

QcBlastField Class

The blocks around one explosion as its rays see them (decision E-602), each cell looked up in the world once and then read from a flat cache: a blast's rays cross most cells several times (steps of 0.3 blocks), and the sight lines to bodies cross them again. More...

Header: #include <server/explosions/QcBlastField.h>

Public Types

struct Cell

Public Functions

const QcBlastField::Cell &at(QcBlockPos pos)
qsizetype lookups() const
const QcBlastTable &table() const

Detailed Description

Cells beyond radius of the centre are read from the world directly. A cell of a chunk that is not loaded is loaded false: it stops rays and sight and never breaks.

Member Function Documentation

const QcBlastField::Cell &QcBlastField::at(QcBlockPos pos)

Returns the cell at pos, looked up in the world the first time.

qsizetype QcBlastField::lookups() const

Returns the cells looked up in the world so far (measurements).

const QcBlastTable &QcBlastField::table() const

Returns the blast traits of the block states.