Show / Hide Table of Contents

Class TouchDeviceImp

Touch input device implementation for the Android platform using a View's Touch events .

Inheritance
System.Object
TouchDeviceImp
Implements
IInputDeviceImp
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Fusee.Engine.Imp.Graphics.Android
Assembly: Fusee.Engine.Imp.Graphics.Android.dll
Syntax
public class TouchDeviceImp : IInputDeviceImp

Constructors

TouchDeviceImp(View)

Initializes a new instance of the TouchDeviceImp class.

Declaration
public TouchDeviceImp(View view)
Parameters
Type Name Description
Android.Views.View view

The game window to hook on to revive WM_POINTER messages.

Properties

AxesCount

Returns the number of axes. Up to five touchpoints (with two axes (X and Y) per Touchpoint plus one axis carrying the number of currently touched touchpoints plus four axes describing the minimum and maximum X and Y values.

Declaration
public int AxesCount { get; }
Property Value
Type Description
System.Int32

The axes count.

AxisImpDesc

Returns description information for all axes.

Declaration
public IEnumerable<AxisImpDescription> AxisImpDesc { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<AxisImpDescription>

ButtonCount

Retrieves the button count. One button for each of the up to five supported touchpoints signaling that the touchpoint currently has contact.

Declaration
public int ButtonCount { get; }
Property Value
Type Description
System.Int32

The button count.

ButtonImpDesc

Retrieve a description for each button.

Declaration
public IEnumerable<ButtonImpDescription> ButtonImpDesc { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ButtonImpDescription>

The button imp description.

Category

Returns Touch, just because it's a touch device :-).

Declaration
public DeviceCategory Category { get; }
Property Value
Type Description
DeviceCategory

Desc

Short description string for this device to be used in dialogs.

Declaration
public string Desc { get; }
Property Value
Type Description
System.String

Id

Returns a (hopefully) unique ID for this driver. Uniqueness is granted by using the full class name (including namespace).

Declaration
public string Id { get; }
Property Value
Type Description
System.String

Methods

GetAxis(Int32)

Retrieves values for the number of currently active touchpoints and the touches min and max values. The touchpoint X and Y axes themselves are event-based axes. Do not query them here.

Declaration
public float GetAxis(int iAxisId)
Parameters
Type Name Description
System.Int32 iAxisId

The axis to retrieve information for.

Returns
Type Description
System.Single

The value at the given axis.

GetButton(Int32)

Gets the button state. This device's buttons signal that a finger (nose, elbow, knee...) currently has contact with the scree surface.

Declaration
public bool GetButton(int iButtonId)
Parameters
Type Name Description
System.Int32 iButtonId

The button identifier.

Returns
Type Description
System.Boolean

true if the button is hit, else false

Events

AxisValueChanged

Occurs on value changes of axes exhibited by this device. Only applies for axes where the PollAxis is set to false.

Declaration
public event EventHandler<AxisValueChangedArgs> AxisValueChanged
Event Type
Type Description
System.EventHandler<AxisValueChangedArgs>

ButtonValueChanged

A touchpoint's contact state is communicated by a button.

Declaration
public event EventHandler<ButtonValueChangedArgs> ButtonValueChanged
Event Type
Type Description
System.EventHandler<ButtonValueChangedArgs>

Implements

IInputDeviceImp
Generated by DocFX
GitHub Repo
Back to top