Angel 3.2
A 2D Game Prototyping Engine
Public Member Functions | Static Public Member Functions | List of all members
Accelerometer Class Reference

A class to read the data from a hardware accelerometer. More...

#include <MultiTouch.h>

Public Member Functions

const Vector3 GetData ()
void NewAcceleration (Vector3 data)

Static Public Member Functions

static AccelerometerGetInstance ()

Detailed Description

This class facilitates reading data from the hardware accelerometer on iOS devices. Note that it performs some simple averaging of values over time – if you want to access the data more immediately, you can tune the defined values in AngelAppDelegate.m

Definition at line 167 of file MultiTouch.h.

Member Function Documentation

Accelerometer & Accelerometer::GetInstance ( )

Used to access the singleton instance of this class.

The singleton

Definition at line 107 of file MultiTouch.cpp.

const Vector3 Accelerometer::GetData ( )

Read the current value or the detected accelerometer values.

The X, Y, and Z parameters being detected. Values are in Gs.

Definition at line 116 of file MultiTouch.cpp.

void Accelerometer::NewAcceleration ( Vector3  data)

Push a new accelerometer value into the object. No need to call this directly – it's either called by the iOS framework or the MobileSimulator class.

dataA 3D vector representing the current acceleration

Definition at line 134 of file MultiTouch.cpp.

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