Table of Contents

Struct PointerState

Namespace
Xui.Core.UI.Input
Assembly
Core.dll

Describes the physical state of a pointer at a specific moment in time, including position, pressure, tilt, and button information.

public readonly struct PointerState
Inherited Members

Constructors

PointerState(Point, Size, NFloat, NFloat, Vector, NFloat, NFloat, NFloat, PointerType, PointerButton, PointerButtons)

Initializes a new instance of the PointerState struct.

public PointerState(Point position, Size contactSize, NFloat pressure, NFloat tangentialPressure, Vector tilt, NFloat twist, NFloat altitudeAngle, NFloat azimuthAngle, PointerType pointerType, PointerButton button, PointerButtons buttons)

Parameters

position Point

The global position of the pointer.

contactSize Size

The size of the contact area.

pressure NFloat

The normalized pressure applied.

tangentialPressure NFloat

The normalized tangential (barrel) pressure applied.

tilt Vector

The tilt vector of the pointer.

twist NFloat

The clockwise twist rotation of the pointer.

altitudeAngle NFloat

The altitude angle relative to the surface.

azimuthAngle NFloat

The azimuth angle (compass direction).

pointerType PointerType

The type of input device.

button PointerButton

The button that triggered the event.

buttons PointerButtons

The set of currently pressed buttons.

Fields

AltitudeAngle

Gets the altitude angle of the pointer relative to the surface (0 = horizontal, π/2 = vertical), in radians.

public readonly NFloat AltitudeAngle

Field Value

NFloat

AzimuthAngle

Gets the azimuth angle (compass direction) of the pointer around the vertical axis, in radians.

public readonly NFloat AzimuthAngle

Field Value

NFloat

Button

Gets which button was responsible for triggering this pointer state change (left, right, middle, eraser, etc.).

public readonly PointerButton Button

Field Value

PointerButton

Buttons

Gets the set of all currently pressed buttons on the device.

public readonly PointerButtons Buttons

Field Value

PointerButtons

ContactSize

Gets the size of the pointer's contact geometry, such as the area covered by a finger or stylus tip.

public readonly Size ContactSize

Field Value

Size

PointerType

Gets the type of device generating the pointer input (mouse, touch, pen, etc.).

public readonly PointerType PointerType

Field Value

PointerType

Position

Gets the position of the pointer in global (window) coordinates.

public readonly Point Position

Field Value

Point

Pressure

Gets the normalized pressure applied by the pointer (range: 0.0 to 1.0).

public readonly NFloat Pressure

Field Value

NFloat

TangentialPressure

Gets the normalized tangential (barrel) pressure applied by the pointer (range: -1.0 to 1.0).

public readonly NFloat TangentialPressure

Field Value

NFloat

Tilt

Gets the tilt of the pointer relative to the X and Y axes (in degrees).

public readonly Vector Tilt

Field Value

Vector

Twist

Gets the clockwise twist (rotation) of the pointer around its major axis, in degrees (0.0 to 359.9).

public readonly NFloat Twist

Field Value

NFloat