QtCraft API C++ classes QML types Handbook

QcHoldDisplay Struct

The hold of an item or block definition, or one category's defaults. More...

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

Public Functions

bool isEmpty() const
QcHoldDisplay over(const QcHoldDisplay &base) const

Public Variables

std::optional<QcHoldCategory> category
QcHoldTransform drawn
QcHoldTransform firstPerson
std::optional<QcHoldGrip> grip
QcHoldTransform swing
QcHoldTransform thirdPerson
QcHoldTransform thirdPersonDrawn

Detailed Description

swing is where the item sits in the first-person fist in the middle of a swing (translate and rotate only, no scale): the hand blends from firstPerson to it and back over the swing, so a tool can rest with its flat side towards the viewer and still strike with its point. Its unset fields keep the first-person values (no change during the swing). drawn is where a launcher sits in the first-person fist while it is drawn (decision E-984; translate and rotate only): the hand blends from firstPerson to it as the draw begins and back after the shot. Its unset fields keep the first-person values. thirdPersonDrawn is the same for a figure's fist while it aims; its unset fields keep the thirdPerson values.

Member Function Documentation

bool QcHoldDisplay::isEmpty() const

Returns whether no field and no transform field is set.

QcHoldDisplay QcHoldDisplay::over(const QcHoldDisplay &base) const

Returns this display with every unset field taken from base.

Member Variable Documentation

std::optional<QcHoldCategory> QcHoldDisplay::category

Category whose defaults apply ("category", definitions only); unset picks it from what the item is.

QcHoldTransform QcHoldDisplay::drawn

First-person placement of a drawn launcher ("drawn", no scale).

QcHoldTransform QcHoldDisplay::firstPerson

Placement in the first-person fist ("firstPerson").

std::optional<QcHoldGrip> QcHoldDisplay::grip

Where the hand takes the item ("grip"); unset takes the level below.

QcHoldTransform QcHoldDisplay::swing

First-person placement in the middle of a swing ("swing", no scale).

QcHoldTransform QcHoldDisplay::thirdPerson

Placement in a figure's fist ("thirdPerson").

QcHoldTransform QcHoldDisplay::thirdPersonDrawn

Placement of a drawn launcher in a figure's fist ("thirdPersonDrawn", no scale).