TouchCollection ClassDelta Engine Documentation
Helper class to keep track of all touches according to their id's. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Input TouchBase
    DeltaEngine.Input.Windows TouchCollection

Namespace: DeltaEngine.Input.Windows
Assembly: DeltaEngine.Input.Windows (in DeltaEngine.Input.Windows.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class TouchCollection : TouchBase

The TouchCollection type exposes the following members.

Constructors

  NameDescription
Public methodTouchCollection
Initializes a new instance of the TouchCollection class
Top
Methods

  NameDescription
Public methodFindIndexByIdOrGetFreeIndex (Inherited from TouchBase.)
Top
Fields

  NameDescription
Public fieldids (Inherited from TouchBase.)
Public fieldlocations (Inherited from TouchBase.)
Public fieldstates (Inherited from TouchBase.)
Top
Remarks

Tests: DeltaEngine.Input.Windows.Tests.TouchCollectionTests
Examples

13 unit tests call DeltaEngine.Input.Windows.TouchCollection
[Test, CloseAfterFirstFrame]
public void FindIndexByIdOrGetFreeIndex()
{
    Assert.AreEqual(0, touchCollection.FindIndexByIdOrGetFreeIndex(478));
}
[Test, CloseAfterFirstFrame]
public void FindIndexByIdWithExistingId()
{
    emptyTouchCollection.ids[5] = 5893;
    Assert.AreEqual(5, emptyTouchCollection.FindIndexByIdOrGetFreeIndex(5893));
}
[Test, CloseAfterFirstFrame]
public void FindFreeIndex()
{
    Assert.AreEqual(0, touchCollection.FindIndexByIdOrGetFreeIndex(456));
}
See Also