My Project
Public Member Functions | Public Attributes | List of all members
ParaEngine::AccelerometerEvent Struct Reference

the total 3d vector of force that is currently on the device, including gravity. More...

#include <EventClasses.h>

Inheritance diagram for ParaEngine::AccelerometerEvent:
ParaEngine::IEvent

Public Member Functions

 AccelerometerEvent (double x=0, double y=0, double z=0, double timestamp=0)
 
virtual int GetEventType () const
 get event type
 
std::string ToScriptCode () const
 build script code and return. More...
 
- Public Member Functions inherited from ParaEngine::IEvent
virtual bool IsAsyncMode () const
 return true, if firing event does not immediately invoke the handler. More...
 
virtual int GetEventID () const
 get event id
 

Public Attributes

int m_nType
 
std::string m_sCode
 
double m_x
 
double m_y
 
double m_z
 
double m_timestamp
 

Detailed Description

the total 3d vector of force that is currently on the device, including gravity.

we can use this to decide current roll and pitch of the device(usually mobile phone) in its own reference frame, and it can also detect sudden movement like shaking. Some device provides other sensors like eletro-magnetometer and gyroscope, which provides additional info to device motion.

Member Function Documentation

§ ToScriptCode()

std::string ParaEngine::AccelerometerEvent::ToScriptCode ( ) const
virtual

build script code and return.

it does not cache the script code. Use GetScriptCode() instead for performance reason.

Reimplemented from ParaEngine::IEvent.


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