/*
* @author Valentin Simonov / http://va.lent.in/
*/
using TouchScript.InputSources;
namespace TouchScript.Pointers
{
///
/// A pointer of type .
///
public class TouchPointer : Pointer
{
#region Public consts
///
/// Default pressure value when device doesn't provide it.
///
public const float DEFAULT_PRESSURE = 0.5f;
///
/// Default rotation value when device doesn't provide it.
///
public const float DEFAULT_ROTATION = 0f;
#endregion
#region Public properties
///
/// Gets or sets the touch's rotation.
///
/// Rotation in radians.
public float Rotation { get; set; }
///
/// Gets or sets the touch's pressure.
///
/// Pressure in range [0, 1].
public float Pressure { get; set; }
#endregion
#region Constructor
///
/// Initializes a new instance of the class.
///
public TouchPointer(IInputSource input) : base(input)
{
Type = PointerType.Touch;
}
#endregion
#region Internal functions
///
internal override void INTERNAL_Reset()
{
base.INTERNAL_Reset();
Rotation = DEFAULT_ROTATION;
Pressure = DEFAULT_PRESSURE;
}
#endregion
}
}