My Project
|
the total 3d vector of force that is currently on the device, including gravity. More...
#include <EventClasses.h>
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... | |
![]() | |
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 |
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.
|
virtual |
build script code and return.
it does not cache the script code. Use GetScriptCode() instead for performance reason.
Reimplemented from ParaEngine::IEvent.