QtCraft API C++ classes QML types Handbook

QcBlockRenderTable::Quad Struct

struct QcBlockRenderTable::Quad

One face of a shape box, in block-local coordinates; corners are ordered like the full cube faces (0 and 1 along the bottom edge of the texture). More...

Public Variables

bool boundary
std::array<std::array<float, 3>, 4> corners
QcBlockFace face
QcBlockRenderTable::SideRect rect
std::array<std::array<float, 2>, 4> uvs

Detailed Description

Member Variable Documentation

bool Quad::boundary

The quad lies on the cell side face and may be hidden by the neighbour there.

std::array<std::array<float, 3>, 4> Quad::corners

Corners in block-local coordinates (0..1).

QcBlockFace Quad::face

Direction the quad faces.

QcBlockRenderTable::SideRect Quad::rect

Rectangle the quad takes on its cell side (only meaningful when boundary).

std::array<std::array<float, 2>, 4> Quad::uvs

Atlas coordinates of the corners.