Click or drag to resize

TouchDevice Class

Special case of an InputDevice identifying itself as a Touch. Defines convenience methods to access the touch buttons and axes.
Inheritance Hierarchy

Namespace:  Fusee.Engine.Core
Assembly:  Fusee.Engine.Core (in Fusee.Engine.Core.dll) Version: 0.7.0.0 (0.7.0.0)
Syntax
C#
public class TouchDevice : InputDevice

The TouchDevice type exposes the following members.

Constructors
  NameDescription
Public methodTouchDevice
Initializes a new instance of the TouchDevice class.
Top
Properties
  NameDescription
Public propertyActiveTouchpoints
Retrieves the number of currently active touchpoints (e.g. the number of fingers currently touching the screen).
Public propertyAxesCount
Gets number of axes supported by this device.
(Inherited from InputDevice.)
Public propertyAxisDesc
Gets a description of the axis. This value can be used in user setup-dialogs or to match axes of devices of different categories.
(Inherited from InputDevice.)
Public propertyButtonCount
Gets the number of buttons supported by this device.
(Inherited from InputDevice.)
Public propertyButtonDesc
Gets the name of the button. This value can be used in user setup-dialogs or to match buttons of devices of different categories.
(Inherited from InputDevice.)
Public propertyCategory
Gets the category of this device. Device categories define a minimal common set of buttons and axes which are identical across all devices sharing the same category.
(Inherited from InputDevice.)
Public propertyDesc
Gets the human readable description of this device. This parameter can be used in user dialogs to identify devices.
(Inherited from InputDevice.)
Public propertyId
Gets an identifier. Implementors take care that this id is unique across all devices managed by a driver.
(Inherited from InputDevice.)
Public propertyIsConnected
Gets or sets a value indicating whether this device is connected.
(Inherited from InputDevice.)
Public propertyNewAxisID (Inherited from InputDevice.)
Public propertyTwoPoint
Gets a value indicating whether two touchpoints are active.
Public propertyTwoPointAngle
Gets the angle of a line between the first two active touchpoints measured from the positive screen x-axis. Use this value if you want to implement rotation-like actions based on the current absolute angle.
Public propertyTwoPointAngleVel
Gets the angular velocity of a line between the first two active touchpoints measured from the positive screen x-axis. Use this value if you want to implement rotation-like actions based on the current rotation speed of the first two touchpoints.
Public propertyTwoPointDistance
Gets the distance between the first two touchpoints. Use this value if you want to implement pinch-like actions based on the current absolute distance.
Public propertyTwoPointDistanceVel
Gets velocity of the distance between the first two touchpoints. Use this value if you want to implement pinch-like actions based on the current speed of the distance.
Public propertyTwoPointGesture
Gets a value indicating the TwoPointAction currently performed with the highest intensity.
Public propertyTwoPointMidPoint
Gets midpoint between the first two active touch points. Use this value if you want to implement two-finger movement-like actions based on the current averaged absolute position of the first two touchpoints
Public propertyTwoPointMidPointVel
Gets speed of the midpoint between the first two active touch points. Use this value if you want to implement two-finger movement-like actions based on the current averaged speed of the first two touchpoints.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAxis
Gets the value currently present at the given axis.
(Inherited from InputDevice.)
Public methodGetAxisDescription
Retrieves a description for the given axis
(Inherited from InputDevice.)
Public methodGetButton
Gets the current state of the given button.
(Inherited from InputDevice.)
Public methodGetButtonDescription
Retrieves a description for the given button.
(Inherited from InputDevice.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPosition
Returns the current position of the given touchpoint. The returned values are only valid if GetTouchActive(TouchPoints) holds true for the same touchpoint.
Public methodGetTouchActive
Returns a value signalling if the given touchpoint is currently active (if something hits the screen).
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVelocity
Retrieves the current velocity (in pixels per second) of the giben touch point. The returned values are only valid if GetTouchActive(TouchPoints) holds true for the same touchpoint.
Public methodIsButtonDown
Determines whether the button was pressed down right before or during the current frame. This value is true only for one frame even if the button is pressed longer than one frame.
(Inherited from InputDevice.)
Public methodIsButtonUp
Determines whether the button was released right before or during the current frame. This value is true only for one frame even if the button is released longer than one frame.
(Inherited from InputDevice.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPostRender (Inherited from InputDevice.)
Public methodRegisterCalculatedAxis
Registers a calculated axis. Calculated axes behave like axes exposed by the underlying hardware device but can be calculated from one or more existing axes or buttons.
(Inherited from InputDevice.)
Public methodRegisterSingleButtonAxis
Registers a calculated axis from a button. The axis' value changes between 0 and 1 as the user hits the button or releases it. The time it takes to change the value can be set.
(Inherited from InputDevice.)
Protected methodRegisterTtpAngleAxis
Protected methodRegisterTtpDistanceAxis
Protected methodRegisterTtpMidpointAxis
Public methodRegisterTwoButtonAxis
Registers a calculated axis from two buttons. The axis' value changes between -1 and 1 as the user hits the button or releases it. The time it takes to change the value can be set.
(Inherited from InputDevice.)
Public methodRegisterVelocityAxis
Registers a calculated axis exhibiting the derivative after the time (Velocity) of the value on the specified original axis.
(Inherited from InputDevice.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventAxisValueChanged
Occurs when the value of a given axis has changed.
(Inherited from InputDevice.)
Public eventButtonValueChanged
Occurs when the value of a given button has changed.
(Inherited from InputDevice.)
Top
Remarks
A touch device represents input typically performed by fingers or a stylus. Touch devices support simultaneous presence of multiple touchpoints (performed by multiple fingers). Each touchpoint is captured by four axes and one button. The button state (pressed or not pressed) signals the presence of the respective axis. Two positional axes for each touchpoint reveal the position in X/Y screen space and two velocity axes represent the current velocity along X and Y. In Addition to tracking individual touchpoints, this device also tracks the simultaneous movements of the first two active touchpoints and generates derived information, like two-point-move, pinch or rotate.
See Also