System.Sensors.TCustomOrientationSensor
Delphi
TCustomOrientationSensor = class(TCustomSensor)
C++
class PASCALIMPLEMENTATION TCustomOrientationSensor : public TCustomSensor
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.Sensors.pas System.Sensors.hpp |
System.Sensors | System.Sensors |
Description
Gives information about the device inclination, distance and compass heading.
The TCustomOrientationSensor class acts like a gyroscope or a compass.
The orientation sensor uses the DoStart method to initiate the underlying reception of orientation change notifications, and the DoStop method to stop the underlying reception of orientation change notifications.
The public Start and Stop methods are used to start and stop the reception of motion change notifications.
The TCustomOrientationSensor class offers information about the inclinometer x-axis, y-axis, and z-axis angle, expressed in degrees, through the TiltX, TiltY, and TiltZ properties.
The DistanceX, DistanceY, and DistanceZ properties are getters for the distance on the axis, expressed in meters.
MagHeading, TrueHeading, CompMagHeading, and CompTrueHeading return the compass heading relative to magnetic and true north, uncompensated and compensated.
Platform Support
This class supports the following platforms:
Platform | Details |
---|---|
Android provides different types of orientation sensors. Each type of sensor supports a different set of properties: | |
iOS provides different types of orientation sensors. Each type of sensor supports a different set of properties: | |
Complete support. |
See Also
- System.Sensors.TCustomSensor.DoStart
- System.Sensors.TCustomSensor.DoStop
- System.Sensors.TCustomSensor.Start
- System.Sensors.TCustomSensor.Stop
- System.Sensors.TCustomOrientationSensor.TiltX
- System.Sensors.TCustomOrientationSensor.TiltY
- System.Sensors.TCustomOrientationSensor.TiltZ
- System.Sensors.TCustomOrientationSensor.DistanceX
- System.Sensors.TCustomOrientationSensor.DistanceY
- System.Sensors.TCustomOrientationSensor.DistanceZ
- System.Sensors.TCustomOrientationSensor.MagHeading
- System.Sensors.TCustomOrientationSensor.TrueHeading
- System.Sensors.TCustomOrientationSensor.CompMagHeading
- System.Sensors.TCustomOrientationSensor.CompTrueHeading
- Mobile Code Snippets
Samples
- FireMonkey Sensor Info sample
- FireMonkey Orientation Sensor sample