QcFigureLook Namespace
What players and items look like when drawn: shared by the world (QcEntityFrameBuilder) and the character preview, so the preview shows exactly what other players see. More...
| Header: | #include <clientcore/figures/QcFigureLook.h> |
Classes
| struct | Dressed |
Functions
| QcFigureLook::Dressed | armour(const QcContentRegistry &content, const QcEquipment &equipment, QcEntityMesher::ModelLook look) |
| QcEntityMesher::ItemLook | atDraw(QcEntityMesher::ItemLook look, double drawProgress, const std::function<bool (const QString &)> &hasTexture) |
| const QcAppearanceDefinition * | cape(const QcContentRegistry &content, const QString &name) |
| QString | drawSprite(const QString &sprite, int stage) |
| int | drawStage(double drawProgress) |
| QcEntityMesher::ItemLook | dropped(const QcContentRegistry &content, QcItemId item, QcSpriteShapes &shapes, const std::shared_ptr<const QcTextureAtlas> &atlas) |
| std::optional<QcEntityMesher::ItemLook> | flames(const QcContentRegistry &content, double width, double height) |
| std::optional<QcEntityMesher::ItemLook> | held(const QcContentRegistry &content, QcItemId item) |
| std::optional<QcEntityMesher::ItemLook> | heldAtDraw(const QcContentRegistry &content, QcItemId item, double drawProgress, QcSpriteShapes &shapes, const std::shared_ptr<const QcTextureAtlas> &atlas) |
| QcEntityMesher::ItemLook | item(const QcContentRegistry &content, QcItemId item) |
| QcBlockId | itemState(const QcContentRegistry &content, QcBlockId block) |
| const QcLauncherDefinition * | launcher(const QcContentRegistry &content, QcItemId item) |
| QcEntityMesher::ModelLook | player(const QcContentRegistry &content, const QcAppearance &appearance) |
| QcEntityMesher::ModelLook | stand(const QcContentRegistry &content, const QcStandPose &pose) |
| QcFigureLook::Dressed | standArmour(const QcContentRegistry &content, const QcEquipment &equipment, QcEntityMesher::ModelLook look) |
| QcAnimator::BodyPose | standBody(const QcStandPose &pose, double seconds) |
| quint8 | standHiddenBones(const QcStandPose &pose) |
Detailed Description
Function Documentation
QcFigureLook::Dressed QcFigureLook::armour(const QcContentRegistry &content, const QcEquipment &equipment, QcEntityMesher::ModelLook look)
Returns what a figure wears: the attachments of the armour in equipment (QcArmourLook) and look with it: under a helmet the hair is left out, so it does not poke through, and a cape hangs outside a chest layer (ModelLook::capeClearance). content is the registry the armour comes from.
QcEntityMesher::ItemLook QcFigureLook::atDraw(QcEntityMesher::ItemLook look, double drawProgress, const std::function<bool (const QString &)> &hasTexture)
Returns look with the sprite of the draw stage of drawProgress. A stage hasTexture does not know keeps the resting sprite, so a launcher without stage textures looks as it always did.
const QcAppearanceDefinition *QcFigureLook::cape(const QcContentRegistry &content, const QString &name)
Returns the cape of content called name; none for an empty name, an unknown one or another kind of appearance.
QString QcFigureLook::drawSprite(const QString &sprite, int stage)
Returns the texture name of the draw stage stage (1 to 3) of the sprite sprite.
int QcFigureLook::drawStage(double drawProgress)
Returns the draw stage (decision E-987) of a launcher drawn with the power drawProgress (QcEntityPose::drawProgress): 0 when it is not drawn, 1 from the start of the draw, 2 from 65 % and 3 from 90 % of the draw time, the reference's borders.
QcEntityMesher::ItemLook QcFigureLook::dropped(const QcContentRegistry &content, QcItemId item, QcSpriteShapes &shapes, const std::shared_ptr<const QcTextureAtlas> &atlas)
Returns the look of the dropped item of content: as item(), a sprite with the shape atlas gives it through shapes, so that it lies as one solid item (decision E-991); flat without an atlas.
std::optional<QcEntityMesher::ItemLook> QcFigureLook::flames(const QcContentRegistry &content, double width, double height)
Returns the flames around a burning body (decision E-393): four walls with the texture of the default fire of content (QcContentRegistry::defaultFire) standing just outside a body width wide, inside a cube of height (BlockPlacement::size), glowing; nothing when the content has no fire block.
std::optional<QcEntityMesher::ItemLook> QcFigureLook::held(const QcContentRegistry &content, QcItemId item)
Returns the look of item of content in a figure's hand (world and preview): none for no item or one the content does not know.
std::optional<QcEntityMesher::ItemLook> QcFigureLook::heldAtDraw(const QcContentRegistry &content, QcItemId item, double drawProgress, QcSpriteShapes &shapes, const std::shared_ptr<const QcTextureAtlas> &atlas)
Returns the look of item of content in a figure's hand at drawProgress (negative when not drawn): the sprite of its stage with that sprite's shape from shapes, the stages that atlas holds, and the grip of the resting sprite. None as held().
QcEntityMesher::ItemLook QcFigureLook::item(const QcContentRegistry &content, QcItemId item)
Returns the look of item as drawn in a hand, on the ground or falling: placeable cube blocks as cubes (or their shape), everything else as a sprite of the item texture. An item content does not know looks like nothing (an empty look). How a hand holds it comes from the item's hold, then its block's, then its category's defaults (decision E-831).
QcBlockId QcFigureLook::itemState(const QcContentRegistry &content, QcBlockId block)
Returns the state of block of content a block item is drawn in (icons, hand, dropped items): fences, walls and panes show a piece of a run rather than a lone post.
const QcLauncherDefinition *QcFigureLook::launcher(const QcContentRegistry &content, QcItemId item)
Returns the launcher of item of content: null for no item, one the content does not know or one that is no launcher.
QcEntityMesher::ModelLook QcFigureLook::player(const QcContentRegistry &content, const QcAppearance &appearance)
Returns the humanoid model of content with the outfit, hair and cape of appearance; an outfit the content does not offer falls back to the default outfit, a hair style or cape of the wrong kind to none. Not valid when the content has no humanoid model.
QcEntityMesher::ModelLook QcFigureLook::stand(const QcContentRegistry &content, const QcStandPose &pose)
Returns the armour stand of content in pose (decision E-238): the stand model with its wooden outfit, half size when small. Not valid when the content has no stand model.
QcFigureLook::Dressed QcFigureLook::standArmour(const QcContentRegistry &content, const QcEquipment &equipment, QcEntityMesher::ModelLook look)
Returns what a stand wears of equipment, with its look, from content: armour() and, under a head piece, a filler in the stand's wood (QcArmourLook::headFillers) that closes the helmet's face opening.
QcAnimator::BodyPose QcFigureLook::standBody(const QcStandPose &pose, double seconds)
Returns the stand's pose as bone rotations (it does not animate); a cape sways gently as on a figure standing still at seconds.
quint8 QcFigureLook::standHiddenBones(const QcStandPose &pose)
Returns the bones a stand in pose leaves out: the arms and the base plate when switched off.