QtCraft API C++ classes QML types Handbook

QcTethers Class

Which parent each child of a family is tied to on the client, from frame to frame (decision E-839; the Kjut's threads, drawn by QcTetherMesher). More...

Header: #include <clientcore/entitymeshes/QcTethers.h>

Public Functions

QList<QcTetherMesher::Thread> threads(const QHash<quint32, QcClientEntity> &entities, const std::shared_ptr<const QcContentRegistry> &content, double alpha)

Static Public Members

const double switchShare

Detailed Description

The client knows no family links, so each child of a kind that is the child of a family with a tetherTexture is tied to the nearest living parent of that family's kind within its tetherRange; a child keeps the parent of the last frame while that one stays in range, unless another comes clearly closer (switchShare), so threads do not flicker between two parents at about the same distance. When the parent dies, it leaves the living entities and the threads are gone with it. The kinds with threads are worked out once per content (a new registry from the server). GUI thread only, not locked.

Member Function Documentation

QList<QcTetherMesher::Thread> QcTethers::threads(const QHash<quint32, QcClientEntity> &entities, const std::shared_ptr<const QcContentRegistry> &content, double alpha)

Returns the threads among entities (creatures of content) at alpha between the last two ticks.

Member Variable Documentation

const double QcTethers::switchShare

Another parent takes a child over only when it is nearer than this share of the distance to the parent of the last frame.