QtCraft API C++ classes QML types Handbook

QcShapePart Struct

One part of a block shape: boxes and crossed planes that apply in the states where all its conditions hold. More...

Header: #include <common/content/blocks/QcShapePart.h>

Public Variables

QList<QcAabb> boxes
QList<QcAabb> collision
QList<QcAabb> crosses
bool customCollision
bool stretch
QList<QcAabb> target
QString texture
QList<QcShapeCondition> when

Detailed Description

Member Variable Documentation

QList<QcAabb> QcShapePart::boxes

Boxes in block-local metres (0..1); they are drawn, targeted and, unless collision replaces them, collided with.

QList<QcAabb> QcShapePart::collision

Collision boxes ("collision", up to QcShapeDefinition::maxCollisionHeight high); used when customCollision is set.

QList<QcAabb> QcShapePart::crosses

Regions drawn as two crossed planes (plants); targeted by their box, never collided with.

bool QcShapePart::customCollision

Collision boxes instead of boxes (fences reach 1.5 m, an open gate has none).

bool QcShapePart::stretch

Each face shows the whole texture stretched over it (torches) instead of the part of the texture where the face lies in the cell.

QList<QcAabb> QcShapePart::target

Boxes pointed at (aimed, outlined), neither drawn nor collided with: a wire too thin to hit gets a flat box over the whole cell (tripwire). Once a part of a state has them, only these boxes of all its parts are pointed at.

QString QcShapePart::texture

Texture slot of the block used for all faces of these boxes; empty uses the face textures. "$<property>" takes the slot named by the state's value of that property (the lens colour of the signal indicator light, decision E-765).

QList<QcShapeCondition> QcShapePart::when

Conditions on the block's state ("when"); empty: the part applies in every state.