QtCraft API C++ classes QML types Handbook

QcArmourLayer Struct

A layer box of a piece of armour (decision E-235): every box of the reference model (the humanoid) whose slot is in covers, made inflate metres larger on every side and cut to the heights fromY..toY (model space), drawn with texture on its bone. More...

Header: #include <common/content/items/QcArmourDefinition.h>

Public Variables

QStringList covers
double fromY
QString front
double inflate
QString texture
double toY
enum class QcEquipmentSlot { Head, Chest, Legs, Feet }
std::optional<QcEquipmentSlot> qcEquipmentSlotFromName(const QString &name)
QString qcEquipmentSlotName(QcEquipmentSlot slot)

Detailed Description

front textures the face looking forward (-Z) instead, e.g. a helmet with an opening for the face.

Member Variable Documentation

QStringList QcArmourLayer::covers

Model slot names whose boxes the layer copies ("covers", 1 to QcArmourDefinition::maxCovers names).

double QcArmourLayer::fromY

Lower cut height in model space ("fromY", -8 to 8, below toY).

QString QcArmourLayer::front

Qualified texture for the face looking forward ("front"); empty when not set.

double QcArmourLayer::inflate

How much larger the boxes get on every side, in metres ("inflate", 0 to QcArmourDefinition::maxInflate).

QString QcArmourLayer::texture

Qualified texture name of the layer ("texture", required).

double QcArmourLayer::toY

Upper cut height in model space ("toY", -8 to 8).

Related Non-Members

enum class QcEquipmentSlot

The four armour slots of a player or armour stand (decisions E-232, E-234).

ConstantValueDescription
QcArmourLayer::QcEquipmentSlot::Head0Helmet slot, data name "head".
QcArmourLayer::QcEquipmentSlot::Chest1Chestplate slot, data name "chest".
QcArmourLayer::QcEquipmentSlot::Legs2Leggings slot, data name "legs".
QcArmourLayer::QcEquipmentSlot::Feet3Boots slot, data name "feet".

std::optional<QcEquipmentSlot> qcEquipmentSlotFromName(const QString &name)

Returns the slot whose name (see qcEquipmentSlotName()) is name, or std::nullopt for any other text.

QString qcEquipmentSlotName(QcEquipmentSlot slot)

Returns the name of slot used in data, commands and saved files: "head", "chest", "legs", "feet".