AttitudeSensor Class

This type is an EasyAR Sense API in C#: AttitudeSensor . Some descriptions may not apply to Unity environment on this page.

Some parts of the Sense API may have already been wrapped into Unity components, and directly usages may not be necessary.

Methods

isAvailable

C#

public virtual bool isAvailable()

Checks if the component is available. It returns true only on Android or iOS with supported hardware. On other operating systems, it is not supported.

output

C#

public virtual AttitudeSensorResultSource output()

Output port.

open

C#

public virtual bool open()

Opens the device. Sampling period is defined by implementation. If failed, it will return false.

openWithSamplingPeriod

C#

public virtual bool openWithSamplingPeriod(int samplingPeriodMilliseconds)

Opens the device with a specific sampling period. Sampling period is limited by hardware and may not reach the specified value. If failed, it will return false.

close

C#

public virtual void close()

Closes. It shall not be used after calling close.

getCurrentResult

C#

public virtual Optional< AttitudeSensorResult > getCurrentResult()

Gets the most recent result. If there is no result, it returns empty.