QtCraft API C++ classes QML types Handbook

QcSpriteShapes Class

The shapes of item sprites in a texture atlas (decision E-831), each cut from the atlas on first use, at the atlas's own resolution up to maxTexels so that sides and picture agree (decision E-991), and kept until the atlas changes. More...

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

Public Functions

std::shared_ptr<const QcSpriteShape> shape(const std::shared_ptr<const QcTextureAtlas> &atlas, const QString &texture)

Static Public Members

const int maxTexels

Detailed Description

Member Function Documentation

std::shared_ptr<const QcSpriteShape> QcSpriteShapes::shape(const std::shared_ptr<const QcTextureAtlas> &atlas, const QString &texture)

Returns the shape of texture in atlas; null without an atlas. Another atlas than the last call's forgets the shapes kept so far.

Member Variable Documentation

const int QcSpriteShapes::maxTexels

The most texels along an edge a shape is cut at: larger tiles take the mip level of this size, so a 256 pixel pack does not build meshes of 256 texels (decision E-991).