QcHoldTransform Struct
One placement of the held thing around the grip. More...
| Header: | #include <common/content/items/QcHoldDisplay.h> |
Public Functions
Public Variables
Related Non-Members
| enum class | QcHoldCategory { Tool, Weapon, Launcher, Sprite, Block, PartialBlock } |
| enum class | QcHoldGrip { Base, Handle, Middle } |
| const std::size_t | qcHoldCategoryCount |
| const std::size_t | qcHoldGripCount |
Detailed Description
A point of the item (a sprite one unit across, a block one unit per block edge, both relative to the grip) is scaled by scale (metres per unit), turned by rotate (degrees about Y, then X, then Z) and moved by translate (metres) in the frame of the fist: for the first person the camera's (x right, y up, z backwards), for a figure its arm's model space (the arm hanging down, the figure facing -Z). Unset fields take the level below.
Member Function Documentation
bool QcHoldTransform::isEmpty() const
Returns whether no field is set.
QcHoldTransform QcHoldTransform::over(const QcHoldTransform &base) const
Returns this transform with every unset field taken from base.
Member Variable Documentation
std::optional<QcVec3> QcHoldTransform::rotate
Angles in degrees about Y, then X, then Z ("rotate"); unset takes the level below.
std::optional<QcVec3> QcHoldTransform::scale
Metres per unit on each axis ("scale"); unset takes the level below.
std::optional<QcVec3> QcHoldTransform::translate
Offset in metres ("translate"); unset takes the level below.
Related Non-Members
enum class QcHoldCategory
What kind of thing is held; each kind has its defaults.
A definition picks its kind from what it is (the client's look of the item: block, launcher, tool, weapon) or names one in hold.category.
| Constant | Value | Description |
|---|---|---|
QcHoldTransform::QcHoldCategory::Tool | 0 | An item with a tool category or a fishing rod, data name "tool". |
QcHoldTransform::QcHoldCategory::Weapon | 1 | Any other sprite item dealing more than 1 damage, data name "weapon". |
QcHoldTransform::QcHoldCategory::Launcher | 2 | An item with a launcher (bow), data name "launcher". |
QcHoldTransform::QcHoldCategory::Sprite | 3 | Any other flat item, data name "sprite". |
QcHoldTransform::QcHoldCategory::Block | 4 | An item drawn as a full block, data name "block". |
QcHoldTransform::QcHoldCategory::PartialBlock | 5 | An item drawn as a block of smaller boxes, data name "partialBlock". |
enum class QcHoldGrip
Where a hand takes a sprite: by the end of its handle at the lower left (tools, weapons), in the middle (launchers) or from below (anything else).
Blocks are held by the middle of their boxes.
| Constant | Value | Description |
|---|---|---|
QcHoldTransform::QcHoldGrip::Base | 0 | From below, data name "base". |
QcHoldTransform::QcHoldGrip::Handle | 1 | By the end of the handle at the lower left, data name "handle". |
QcHoldTransform::QcHoldGrip::Middle | 2 | In the middle, data name "middle". |
const std::size_t qcHoldCategoryCount
Number of values of QcHoldCategory.
const std::size_t qcHoldGripCount
Number of values of QcHoldGrip.