The ITouchArea graph node interface. More...
#include "murl_graph_i_touch_area.h"
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual ITransform * | GetTransformInterface ()=0 |
Get the mutable Graph::ITransform interface. More... | |
virtual const ITransform * | GetTransformInterface () const =0 |
Get the constant Graph::ITransform interface. More... | |
virtual IFrameBufferNodeTarget * | GetFrameBufferNodeTarget ()=0 |
Get the mutable IFrameBufferNodeTarget container. More... | |
virtual const IFrameBufferNodeTarget * | GetFrameBufferNodeTarget () const =0 |
Get the constant IFrameBufferNodeTarget container. More... | |
virtual Bool | SetStateNodeId (IEnums::ButtonState state, const String &nodeId)=0 |
Set the touch area's active node ID for a given state. More... | |
virtual const String & | GetStateNodeId (IEnums::ButtonState state) const =0 |
Get the ID of the touch area's active node for a given state. More... | |
virtual Bool | SetStateChildIndex (IEnums::ButtonState state, SInt32 childIndex)=0 |
Set the touch area's active child for a given state. More... | |
virtual SInt32 | GetStateChildIndex (IEnums::ButtonState state) const =0 |
Get the index of the touch area's active child for a given state. More... | |
virtual Bool | SetStateAnimationTime (IEnums::ButtonState state, Real time)=0 |
Set the target time value for a given state. More... | |
virtual Real | GetStateAnimationTime (IEnums::ButtonState state) const =0 |
Get the target time value set for a given state. More... | |
virtual Bool | ResetStateAnimationTime (IEnums::ButtonState state)=0 |
Reset the target time value for a given state to 0. More... | |
virtual Bool | IsStateAnimationTimeSet (IEnums::ButtonState state) const =0 |
Query if a target time value was set for a given state. More... | |
virtual Bool | SetTimelineNodeId (const String &nodeId)=0 |
Define a timeline node from within the current graph namespace. More... | |
virtual const String & | GetTimelineNodeId () const =0 |
Query the node ID of an assigned timeline child. More... | |
virtual Bool | SetTimelineChildIndex (SInt32 nodeIndex)=0 |
Define a timeline node among the touch area's children. More... | |
virtual SInt32 | GetTimelineChildIndex () const =0 |
Query the child index of an assigned timeline child. More... | |
Public Member Functions inherited from Murl::Graph::ITouchable | |
virtual Bool | SetEnabled (Bool enabled)=0 |
Enable or disable the button. More... | |
virtual Bool | IsEnabled () const =0 |
Check if the button is enabled. More... | |
virtual Bool | SetActiveFaces (IEnums::PolygonFaces faces)=0 |
Set which faces of the button are active. More... | |
virtual IEnums::PolygonFaces | GetActiveFaces () const =0 |
Check which faces of the button are active. More... | |
virtual Bool | SetOutCoordSize (Real sizeX, Real sizeY)=0 |
Set the output coordinate reference size. More... | |
virtual Bool | SetOutCoordSizeX (Real sizeX)=0 |
Set the horizontal output coordinate reference size. More... | |
virtual Bool | SetOutCoordSizeY (Real sizeY)=0 |
Set the vertical output coordinate reference size. More... | |
virtual Real | GetOutCoordSizeX () const =0 |
Get the horizontal output coordinate reference size. More... | |
virtual Real | GetOutCoordSizeY () const =0 |
Get the vertical output coordinate reference size. More... | |
virtual Bool | SetOutCoord (Real x1, Real y1, Real x2, Real y2)=0 |
Set the button's output coordinate range. More... | |
virtual Bool | SetOutCoord1 (Real x1, Real y1)=0 |
Set the button's output coordinate start. More... | |
virtual Bool | SetOutCoord2 (Real x2, Real y2)=0 |
Set the button's output coordinate end. More... | |
virtual Bool | SetOutCoordX1 (Real x1)=0 |
Set the button's horizontal start output coordinate. More... | |
virtual Bool | SetOutCoordY1 (Real y1)=0 |
Set the button's vertical start output coordinates. More... | |
virtual Bool | SetOutCoordX2 (Real x2)=0 |
Set the button's horizontal end output coordinate. More... | |
virtual Bool | SetOutCoordY2 (Real y2)=0 |
Set the button's vertical end output coordinates. More... | |
virtual Real | GetOutCoordX1 () const =0 |
Get the button's horizontal start output coordinate. More... | |
virtual Real | GetOutCoordY1 () const =0 |
Get the button's vertical start output coordinate. More... | |
virtual Real | GetOutCoordX2 () const =0 |
Get the button's horizontal end output coordinate. More... | |
virtual Real | GetOutCoordY2 () const =0 |
Get the button's vertical end output coordinate. More... | |
virtual Bool | SetOutCoordClippingEnabled (Bool enable)=0 |
Enable or disable output coordinate clipping. More... | |
virtual Bool | IsOutCoordClippingEnabled () const =0 |
Check if output coordinate clipping is enabled. More... | |
virtual Bool | SetResponseButton (IEnums::MouseButton button)=0 |
Set the mouse button this button responds to. More... | |
virtual IEnums::MouseButton | GetResponseButton () const =0 |
Get the mouse button this button responds to. More... | |
virtual Bool | SetPassEventsEnabled (Bool enable)=0 |
Enable or disable event pass through. More... | |
virtual Bool | IsPassEventsEnabled () const =0 |
Check event pass through is enabled. More... | |
virtual Bool | SetMaxNumberOfEvents (UInt32 value)=0 |
Set the maximum number of simultaneous touch events. More... | |
virtual UInt32 | GetMaxNumberOfEvents () const =0 |
Get the maximum number of simultaneous touch events. More... | |
virtual Bool | ResetEvents ()=0 |
Reset the tracking of all current events. More... | |
virtual UInt32 | GetNumberOfActiveEvents () const =0 |
Get the total number of active events. More... | |
virtual UInt32 | GetActiveEventId (UInt32 activeEventIndex) const =0 |
Get the unique ID of a specific active event. More... | |
virtual UInt32 | GetNumberOfTrackedEvents () const =0 |
Get the number of currently tracked events. More... | |
virtual UInt32 | GetTrackedEventId (UInt32 trackedEventIndex) const =0 |
Get the unique ID of a specific tracked event. More... | |
virtual Bool | HasEventUpdate (UInt32 id) const =0 |
Check if a given event has received updates from any input device during the most recent logic tick. More... | |
virtual IEnums::InputDeviceType | GetEventDeviceType (UInt32 id) const =0 |
Get the type of input device that reported the event with a given ID. More... | |
virtual const Vector & | GetEventOutCoord (UInt32 id) const =0 |
Get the output coordinate of an event with a given ID, in 2D space. More... | |
virtual const Vector & | GetLocalEventPosition (UInt32 id) const =0 |
Get the position of an event with a given ID, in 3D object space. More... | |
virtual const Vector & | GetLocalEventDelta (UInt32 id) const =0 |
Get the current position delta of an event with a given ID, in object space. More... | |
virtual Bool | IsEventTracked (UInt32 id) const =0 |
Check if a given event is in the "tracked" state. More... | |
virtual Bool | IsEventInside (UInt32 id) const =0 |
Check if a given event's incidence point is within the button's bounds. More... | |
virtual Bool | IsEventPressed (UInt32 id) const =0 |
Check if a given event is in the pressed state. More... | |
virtual Bool | WasPressed () const =0 |
Check if the button was pressed. More... | |
virtual Bool | WasReleasedInside () const =0 |
Check if the button was released inside. More... | |
virtual Bool | WasReleasedOutside () const =0 |
Check if the button was released outside. More... | |
virtual const Vector & | GetEventPosition () const =0 |
Get the position of the current button event, in object space. More... | |
virtual IEnums::ButtonState | GetButtonState () const =0 |
Get the current button state. More... | |
Detailed Description
The ITouchArea graph node interface.
This interface represents an input object in world space (i.e. a "button").
A touch area by itself does not actually have any renderable geometry; instead, it only holds a specific surface shape on which any pointing events are evaluated in 3D space.
In general, a touch area can be in one of 3 available states: "Up", "Down" or "Disabled". For devices that provide a point input method other than a touch screen, such as a mouse, there also exists an additional "Hover" state. Internally, a touch area node acts similar to a Graph::ISwitch node, managing visibility of a subset of its child nodes that are assigned to these states. Depending on the actual state the touch area is in, the respective child node gets activated, and all other ones deactivated. If a child node is not assigned to one of these states, it is left unmanaged.
In addition, it is possible to define a single child node implementing the Graph::ITimeline interface to react on state changes. The assigned timeline will then be started to run up to a given time value set for that state.
Member Function Documentation
◆ GetNodeInterface() [1/2]
|
pure virtual |
Get the mutable Graph::INode interface.
This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.
- Returns
- The mutable Graph::INode interface, or null if not available
◆ GetNodeInterface() [2/2]
|
pure virtual |
Get the constant Graph::INode interface.
This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.
- Returns
- The constant Graph::INode interface, or null if not available
◆ GetTransformInterface() [1/2]
|
pure virtual |
Get the mutable Graph::ITransform interface.
This method returns a mutable pointer to the node's Graph::ITransform interface, to be able to query or modify the node's transformation matrix and depth order.
- Returns
- The mutable Graph::ITransform interface, or null if not available
◆ GetTransformInterface() [2/2]
|
pure virtual |
Get the constant Graph::ITransform interface.
This method returns a constant pointer to the node's Graph::ITransform interface, to be able to query the node's transformation matrix and depth order.
- Returns
- The constant Graph::ITransform interface, or null if not available
◆ GetFrameBufferNodeTarget() [1/2]
|
pure virtual |
Get the mutable IFrameBufferNodeTarget container.
This method returns a mutable pointer to the node's IFrameBufferNodeTarget container, which allows to set or query the frame buffer object the touch area object delegates its input to.
- Returns
- The mutable IFrameBufferNodeTarget container, or null if not available
◆ GetFrameBufferNodeTarget() [2/2]
|
pure virtual |
Get the constant IFrameBufferNodeTarget container.
This method returns a constant pointer to the node's IFrameBufferNodeTarget container, which allows to query the frame buffer object the touch area object delegates its input to.
- Returns
- The constant IFrameBufferNodeTarget container, or null if not available
◆ SetStateNodeId()
|
pure virtual |
Set the touch area's active node ID for a given state.
Calling this method assigns one of the touch area's nodes to a given internal state. If done so, that node will be activated whenever the touch area changes to this state, and deactivated when it changes to a different state.
- Parameters
-
state The internal state to which the given node will be assigned. nodeId The node ID of the node to assign.
- Returns
- true if successful.
◆ GetStateNodeId()
|
pure virtual |
Get the ID of the touch area's active node for a given state.
- Parameters
-
state The internal state for which to query the assigned node.
- Returns
- The ID of the assigned node, or an empty string if there is no present assignment for the givent state.
◆ SetStateChildIndex()
|
pure virtual |
Set the touch area's active child for a given state.
Calling this method assigns one of the touch area's children to a given internal state. If done so, that child will be activated whenever the touch area changes to this state, and deactivated when it changes to a different state. All children that are not assigned to a specific state behave normally.
As an example, a touch area may have four Graph::IParametersState children representing different colors, each assigned to one of the four possible internal states, and a Graph::PlaneGeometry as an additional fifth child without state assignment. Depending on the touch area's current state, one of these parameter sets will be selected, and the plane geometry will be rendered in different colors.
- Parameters
-
state The internal state to which the given child will be assigned. childIndex The zero-based index of the child node to assign.
- Returns
- true if successful.
◆ GetStateChildIndex()
|
pure virtual |
Get the index of the touch area's active child for a given state.
- Parameters
-
state The internal state for which to query the assigned child.
- Returns
- The zero-based index into the touch area's array of children, or -1 if there is no present assignment for the givent state.
◆ SetStateAnimationTime()
|
pure virtual |
Set the target time value for a given state.
When a timeline child node is defined via SetTimelineNodeId() or SetTimelineChildIndex(), this method sets the target time value to run to when the touch area is entering the given state.
- Parameters
-
state The state for which to set the target time value. time The target time value.
- Returns
- true if successful.
◆ GetStateAnimationTime()
|
pure virtual |
Get the target time value set for a given state.
- Parameters
-
state The state for which to query the target time.
- Returns
- The target time value.
◆ ResetStateAnimationTime()
|
pure virtual |
Reset the target time value for a given state to 0.
- Parameters
-
state The state for which to reset the target time value.
- Returns
- true if successful.
◆ IsStateAnimationTimeSet()
|
pure virtual |
Query if a target time value was set for a given state.
- Parameters
-
state The state to query.
- Returns
- true if a target time value was set for the given state.
◆ SetTimelineNodeId()
Define a timeline node from within the current graph namespace.
- Parameters
-
nodeId The node ID of the timeline to assign.
- Returns
- true if successful.
◆ GetTimelineNodeId()
|
pure virtual |
Query the node ID of an assigned timeline child.
- Returns
- The node id of the assigned timeline child, or an empty string if no timeline was assigned or a child was explicitly assigned by its child index.
◆ SetTimelineChildIndex()
Define a timeline node among the touch area's children.
- Parameters
-
nodeIndex The zero-based child index of the timeline child to assign.
- Returns
- true if successful.
◆ GetTimelineChildIndex()
|
pure virtual |
Query the child index of an assigned timeline child.
- Returns
- The zero-based child index of the assigned timeline child, or -1 if no explicit child was assigned or a different timeline node was used from the current namespace via SetTimelineNodeId().
The documentation for this interface was generated from the following file:
- murl_graph_i_touch_area.h