SLProject  4.3.020
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SENSAndroidOrientation Class Reference

#include <SENSAndroidOrientation.h>

Inheritance diagram for SENSAndroidOrientation:
[legend]

Public Member Functions

 SENSAndroidOrientation ()
 
void init (bool granted)
 
bool start () override
 
void stop () override
 
void updateOrientation (const Quat &orientation)
 
- Public Member Functions inherited from SENSOrientation
virtual ~SENSOrientation ()
 
Quat getOrientation () const
 
bool isRunning ()
 
void registerListener (SENSOrientationListener *listener)
 
void unregisterListener (SENSOrientationListener *listener)
 

Additional Inherited Members

- Protected Member Functions inherited from SENSOrientation
void setOrientation (Quat orientation)
 
- Protected Attributes inherited from SENSOrientation
bool _running = false
 

Detailed Description

Definition at line 7 of file SENSAndroidOrientation.h.

Constructor & Destructor Documentation

◆ SENSAndroidOrientation()

SENSAndroidOrientation::SENSAndroidOrientation ( )
inline

Definition at line 10 of file SENSAndroidOrientation.h.

10 {};

Member Function Documentation

◆ init()

void SENSAndroidOrientation::init ( bool  granted)
inline

Definition at line 11 of file SENSAndroidOrientation.h.

11 {};

◆ start()

bool SENSAndroidOrientation::start ( )
overridevirtual

Implements SENSOrientation.

Definition at line 6 of file SENSAndroidOrientation.cpp.

7 {
8  _running = true;
9  return true;
10 }

◆ stop()

void SENSAndroidOrientation::stop ( )
overridevirtual

Implements SENSOrientation.

Definition at line 12 of file SENSAndroidOrientation.cpp.

13 {
14  if (!_running)
15  return;
16  _running = false;
17 }

◆ updateOrientation()

void SENSAndroidOrientation::updateOrientation ( const Quat orientation)

Definition at line 19 of file SENSAndroidOrientation.cpp.

20 {
21  if (_running)
22  setOrientation(orientation);
23 }
void setOrientation(Quat orientation)

The documentation for this class was generated from the following files: