The interface used by aspects, objects, which cast pointer rays to interact with objects present in the world.
More...
#include <interface_pointer_callback.hpp>
|
| ~IUsePointer ()=default |
| Virtual IUsePointer destructor, so that subclasses can use their own.
|
|
|
bool | leftClickOn (ILeftClickable &clickable, glm::vec4 clickLocation) |
| Calls the left mouse button press (or equivalent) callback on an object.
|
|
bool | leftReleaseOn (ILeftClickable &clickable, glm::vec4 clickLocation) |
| Calls the left mouse button release (or equivalent) callback on an object.
|
|
bool | pointerEnter (IHoverable &hoverable, glm::vec4 hoverLocation) |
| Callback for when a pointer enters a region containing an object.
|
|
bool | pointerLeave (IHoverable &hoverable) |
| Callback for when a pointer leaves a region containing an object.
|
|
The interface used by aspects, objects, which cast pointer rays to interact with objects present in the world.
This interface will usually be attached to an aspect associated with a camera object.
Contains methods to invoke pointer event callbacks on objects that implement IRightClickable, ILeftClickable, and IHoverable.
The responsibility of actually conducting the raycast falls on the aspect implementing this interface itself.
◆ leftClickOn()
bool IUsePointer::leftClickOn |
( |
ILeftClickable & | clickable, |
|
|
glm::vec4 | clickLocation ) |
|
inlineprotected |
Calls the left mouse button press (or equivalent) callback on an object.
- Parameters
-
clickable | The aspect with a left click callback. |
clickLocation | The 3D world coordinates where the object was clicked. |
- Return values
-
true | The object handled the left mouse button press. |
false | The object did not handle the left mouse button press. |
◆ leftReleaseOn()
bool IUsePointer::leftReleaseOn |
( |
ILeftClickable & | clickable, |
|
|
glm::vec4 | clickLocation ) |
|
inlineprotected |
Calls the left mouse button release (or equivalent) callback on an object.
- Parameters
-
clickable | The aspect with the left click callback. |
clickLocation | The 3D world coordinates where the object was clicked. |
- Return values
-
true | The object handled the left mouse button release. |
false | The object did nothing with the left mouse button release. |
◆ pointerEnter()
bool IUsePointer::pointerEnter |
( |
IHoverable & | hoverable, |
|
|
glm::vec4 | hoverLocation ) |
|
inlineprotected |
Callback for when a pointer enters a region containing an object.
- Parameters
-
hoverable | The aspect with the hover callback. |
hoverLocation | The location at which the pointer entered the object's region. |
- Return values
-
true | The object handled the pointer enter event. |
false | The object did nothing with the pointer enter event. |
◆ pointerLeave()
bool IUsePointer::pointerLeave |
( |
IHoverable & | hoverable | ) |
|
|
inlineprotected |
Callback for when a pointer leaves a region containing an object.
- Parameters
-
hoverable | The aspect with the hover callback. |
- Return values
-
true | The object handled the pointer leave event. |
false | The object did nothing with the pointer leaving event. |
The documentation for this class was generated from the following file: