QtCraft API C++ classes QML types Handbook

QcGuardPost Struct

The zone a guardian keeps to (decision E-594): the guardian zone of a structure it came into (QcGuardSite, decision E-591), in world cells with both corners inside. More...

Header: #include <server/guardians/QcGuardPost.h>

Public Functions

QcVec3 centre() const
double distanceTo(const QcVec3 &point) const

Public Variables

QcBlockPos max
QcBlockPos min
quint64 site

Detailed Description

Not saved: guardians are not persistent, their zone brings them back.

Member Function Documentation

QcVec3 QcGuardPost::centre() const

Returns the middle of the zone's floor.

double QcGuardPost::distanceTo(const QcVec3 &point) const

Returns the horizontal distance from point to the zone's columns (0 inside) and the distance in height to its cells, the larger of the two.

Member Variable Documentation

QcBlockPos QcGuardPost::max

The highest corner of the zone.

QcBlockPos QcGuardPost::min

The lowest corner of the zone.

quint64 QcGuardPost::site

The guardian zone's site (QcGuardSite).