QcDebugLines Class
The debug visualisations as coloured line segments in the world (decision E-225): chunk and section borders, hitboxes with the view direction, where creatures are heading, and sections that were meshed again. More...
| Header: | #include <clientcore/debug/QcDebugLines.h> |
Public Functions
| QcDebugLines(const QcVec3 &origin) | |
| void | addBox(const QcAabb &box, QRgb color) |
| void | addChunkBorders(const QcVec3 &feet) |
| void | addHitboxes(const QcClientSession &session, double alpha) |
| void | addLine(const QcVec3 &from, const QcVec3 &to, QRgb color) |
| void | addMobGoals(const QcClientSession &session, const QList<QcMsg::MobGoal> &goals, double alpha) |
| void | addRemeshFlashes(const QHash<quint64, qint64> &meshedAt, qint64 nowMs) |
| bool | isEmpty() const |
| const QcVec3 & | origin() const |
| const QList<QcDebugLineVertex> & | vertices() const |
Static Public Members
| const QRgb | chaseColor |
| const QRgb | chunkCornerColor |
| const int | chunkCornerRadius |
| const QRgb | chunkGridColor |
| const QRgb | flashColor |
| const qint64 | flashMs |
| const QRgb | fleeColor |
| const QRgb | hitboxColor |
| const QRgb | lookColor |
| QcAabb | sectionBox(quint64 sectionKey) |
| const QRgb | sectionColor |
| const QRgb | wanderColor |
Detailed Description
GUI-free; built on the GUI thread only while a visualisation is on, and drawn by the world renderer in one draw call.
Member Function Documentation
[explicit] QcDebugLines::QcDebugLines(const QcVec3 &origin)
The vertices are placed relative to origin (decision E-883), near where the lines are drawn.
void QcDebugLines::addBox(const QcAabb &box, QRgb color)
Adds the twelve edges of box in color.
void QcDebugLines::addChunkBorders(const QcVec3 &feet)
The chunk of the player's feet: its corners up to the top of the world, the section borders as rings and a grid on its walls every four blocks; the corners of the chunks around it.
void QcDebugLines::addHitboxes(const QcClientSession &session, double alpha)
Boxes of the entities session knows (positions interpolated by alpha) and their view direction.
void QcDebugLines::addLine(const QcVec3 &from, const QcVec3 &to, QRgb color)
Adds a line from from to to in color.
void QcDebugLines::addMobGoals(const QcClientSession &session, const QList<QcMsg::MobGoal> &goals, double alpha)
From each creature of session (interpolated by alpha) to where it is heading (goals), coloured by chasing, wandering and fleeing.
void QcDebugLines::addRemeshFlashes(const QHash<quint64, qint64> &meshedAt, qint64 nowMs)
Boxes of sections meshed within flashMs, fading; meshedAt maps section keys to the time of their mesh, nowMs in the same clock.
bool QcDebugLines::isEmpty() const
Returns whether there is no line.
const QcVec3 &QcDebugLines::origin() const
Returns the point the vertices are relative to.
[static] QcAabb QcDebugLines::sectionBox(quint64 sectionKey)
Returns the box of the section sectionKey (qcSectionKey()).
const QList<QcDebugLineVertex> &QcDebugLines::vertices() const
Returns the vertices, relative to origin().
Member Variable Documentation
const QRgb QcDebugLines::chaseColor
A creature chasing.
const QRgb QcDebugLines::chunkCornerColor
The corners of the chunks around the player's.
const int QcDebugLines::chunkCornerRadius
Neighbouring chunks within this many chunks show their corners.
const QRgb QcDebugLines::chunkGridColor
The grid on the walls of the player's chunk.
const QRgb QcDebugLines::flashColor
A section meshed again.
const qint64 QcDebugLines::flashMs
Sections that were meshed again flash this long.
const QRgb QcDebugLines::fleeColor
A creature fleeing.
const QRgb QcDebugLines::hitboxColor
Entity boxes.
const QRgb QcDebugLines::lookColor
An entity's view direction.
const QRgb QcDebugLines::sectionColor
The player's chunk: its corners and the section borders.
const QRgb QcDebugLines::wanderColor
A creature wandering.