Table of Contents

Class Compass

Namespace
MonoGame.Framework.Devices.Sensors
Assembly
MonoGame.Framework.dll

Provides Desktop applications access to the device's compass sensor. Currently stubs, for cross-platform development.

public sealed class Compass : SensorBase<CompassReading>, IDisposable
Inheritance
Compass
Implements
Inherited Members

Constructors

Compass()

Creates a new instance of the Compass object.

public Compass()

Properties

IsSupported

Gets whether the device on which the application is running supports the compass sensor.

public static bool IsSupported { get; }

Property Value

bool

State

Gets the current state of the compass. The value is a member of the SensorState enumeration.

public SensorState State { get; }

Property Value

SensorState

Methods

Dispose(bool)

Derived classes override this method to dispose of managed and unmanaged resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

True if unmanaged resources are to be disposed.

Start()

Starts data acquisition from the compass.

public override void Start()

Stop()

Stops data acquisition from the compass.

public override void Stop()