11#ifndef ZOAPPQUERYCLICK_H
12#define ZOAPPQUERYCLICK_H
54 std::shared_ptr<BaseSimObjectAspect>
clone()
const override;
62 static std::shared_ptr<BaseSimObjectAspect>
create(
const nlohmann::json& jsonAspectProperties);
119 return this->
onLeftClick(actionData, actionDefinition);
Contains headers for the system and structs used by the engine's camera system.
std::weak_ptr< FixedActionBinding > declareFixedActionBinding(const std::string &context, const std::string &action, std::function< bool(const ActionData &, const ActionDefinition &)>)
Binds some method (or any function) present on this object to an action generated by the InputManager...
Definition sim_system.cpp:219
The interface used by aspects, objects, which cast pointer rays to interact with objects present in t...
Definition interface_pointer_callback.hpp:36
bool onLeftClick(const ToyMaker::ActionData &actionData, const ToyMaker::ActionDefinition &actionDefinition)
Method responsible for calling left mouse button press callbacks on eligible objects when a pointer c...
Definition query_click.cpp:67
bool onLeftRelease(const ToyMaker::ActionData &actionData, const ToyMaker::ActionDefinition &actionDefinition)
Method responsible for calling left mouse button release callbacks on eligible objects when a pointer...
Definition query_click.cpp:102
std::weak_ptr< ToyMaker::FixedActionBinding > handlerLeftClick
The binding connecting the pointer left click action to its handler method on this object.
Definition query_click.hpp:114
std::weak_ptr< ToyMaker::FixedActionBinding > handlerLeftRelease
The binding connecting the pointer left release action to its handler method on this object.
Definition query_click.hpp:128
bool onPointerMove(const ToyMaker::ActionData &actionData, const ToyMaker::ActionDefinition &actionDefinition)
Method responsible for calling hover callbacks when a pointer move event is received.
Definition query_click.cpp:136
QueryClick()
Constructs a new Query Click aspect.
Definition query_click.hpp:143
static std::shared_ptr< BaseSimObjectAspect > create(const nlohmann::json &jsonAspectProperties)
Creates a query click object based on its description in JSON.
Definition query_click.cpp:62
static std::string getSimObjectAspectTypeName()
Gets the aspect type string associated with this class.
Definition query_click.hpp:47
std::shared_ptr< BaseSimObjectAspect > clone() const override
Creates a new query click aspect using this one as its blueprint.
Definition query_click.cpp:58
std::vector< std::shared_ptr< ToyMaker::SceneNodeCore > > mPreviousQueryResults
A list of results from previous pointer queries.
Definition query_click.hpp:161
ToyMaker::Ray rayFromClickCoordinates(glm::vec2 clickCoordinates)
Converts the location of a pointer event from its normalized viewport coordinates to a camera relativ...
Definition query_click.cpp:10
std::weak_ptr< ToyMaker::FixedActionBinding > handlerPointerMove
The binding connecting the pointer move action to its handler method on this object.
Definition query_click.hpp:100
An object containing closely related methods and data, and exposing object lifecycle and application ...
Definition sim_system.hpp:956
Contains classes that serve as interfaces for sim objects that wish to respond to click events.
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition application.hpp:24
Classes and structs relating to the SimSystem, the system responsible for providing some level of gen...
The definition of a single action, including whether it represents state or change,...
Definition input_data.hpp:511
A set of numbers describing a ray with its source at some finite point in the world,...
Definition spatial_query_basic_types.hpp:374
A union that may contain any one of SimpleActionData, OneAxisActionData, TwoAxisActionData,...
Definition input_data.hpp:721