12#ifndef ZOAPPBOARDLOCATIONS_H
13#define ZOAPPBOARDLOCATIONS_H
15#include "toymaker/sim_system.hpp"
50 static std::shared_ptr<BaseSimObjectAspect>
create(
const nlohmann::json& jsonAspectProperties);
57 std::shared_ptr<BaseSimObjectAspect>
clone()
const override;
static std::string getSimObjectAspectTypeName()
Gets the aspect type string associated with this class.
Definition board_locations.hpp:33
std::shared_ptr< BaseSimObjectAspect > clone() const override
Uses this aspect's data to construct a new aspect.
Definition board_locations.cpp:24
bool onPointerLeftRelease(glm::vec4 clickLocation) override
Responds to a full left click by emitting mSigBoardClicked with the clicked location's equivalent gam...
Definition board_locations.hpp:75
ToyMaker::Signal< glm::u8vec2 > mSigBoardClicked
The event emitted signalling to the 3D viewport controller that a location on the board was clicked.
Definition board_locations.hpp:81
static std::shared_ptr< BaseSimObjectAspect > create(const nlohmann::json &jsonAspectProperties)
Constructs this aspect from its JSON description.
Definition board_locations.cpp:19
bool onPointerLeftClick(glm::vec4 clickLocation) override
Responds to left click events by logging them to the console, translating the location of the click t...
Definition board_locations.cpp:6
glm::uvec2 boardPointToGridIndices(glm::vec2 point) const
Given the 2D coordinates of a point relative to the top surface of the board, returns the equivalent ...
Definition board_locations.cpp:28
BoardLocations()
Constructs a new Board Locations object.
Definition board_locations.hpp:104
std::array< uint8_t, 3 > mRowLengths
The lengths of the 3 rows of the game board representing the number of valid houses on it.
Definition board_locations.hpp:110
glm::vec4 gridIndicesToBoardPoint(glm::u8vec2 gridIndices) const
Translates game board data model grid coordinates to their real world 3D coordinates equivalent.
Definition board_locations.cpp:42
The interface used by aspects which wish to respond to mouse left click events (or equivalent).
Definition interface_pointer_callback.hpp:88
A Signal object, designed to emit signals matching some data signature to be received by all the Sign...
Definition signals.hpp:323
An object containing closely related methods and data, and exposing object lifecycle and application ...
Definition sim_system.hpp:956
Contains classes and enums that define a house and describe its state.
Contains classes that serve as interfaces for sim objects that wish to respond to click events.