![]() |
Cockatrice 2026-03-05-Development-2.11.0-beta.54
A virtual tabletop for multiplayer card games
|
Semantic Z-value layer management for game scene rendering. More...
#include <QtGlobal>Go to the source code of this file.
Namespaces | |
| namespace | ZValueLayerManager |
| Utilities for Z-value validation and layer management. | |
Enumerations | |
| enum class | ZValueLayerManager::Layer { ZValueLayerManager::Zone , ZValueLayerManager::Card , ZValueLayerManager::Overlay } |
| Semantic layer identifiers for Z-value allocation. More... | |
Functions | |
| constexpr bool | ZValueLayerManager::isValidCardZValue (qreal zValue) |
| Validates that a Z-value is within the valid card range. | |
| constexpr bool | ZValueLayerManager::isOverlayZValue (qreal zValue) |
| Validates that a Z-value is in the overlay layer. | |
| constexpr qreal | ZValueLayerManager::overlayZValue (qreal offset) |
| Returns the Z-value for a specific overlay element. | |
Variables | |
| constexpr qreal | ZValueLayerManager::CARD_Z_VALUE_MAX = 40000000.0 |
| Maximum Z-value a card can have on the table zone. | |
| constexpr qreal | ZValueLayerManager::OVERLAY_BASE = 2000000000.0 |
| Base Z-value for overlay elements. | |
Semantic Z-value layer management for game scene rendering.
This file provides a structured approach to Z-value allocation in the game scene. Z-values in Qt determine stacking order - higher values render on top of lower values.
The game scene is organized into three conceptual layers:
The large gap between card Z-values (max ~40M) and overlay base (2B) provides safety margin for future table zone expansions while ensuring overlays always render above cards regardless of table position.
Prefer using the semantic constants from ZValues namespace:
Use validation functions to verify card Z-values during development: