OIS  1.5
Object-oriented Input System
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OIS::MultiTouch Class Reference

#include <OISMultiTouch.h>

Inheritance diagram for OIS::MultiTouch:
OIS::Object

Public Member Functions

virtual ~MultiTouch ()
 
virtual void setEventCallback (MultiTouchListener *touchListener)
 
MultiTouchListenergetEventCallback ()
 
void clearStates (void)
 
std::vector< MultiTouchStategetMultiTouchStates () const
 
const std::vector< MultiTouchStategetFirstNTouchStates (int n)
 
const std::vector< MultiTouchStategetMultiTouchStatesOfType (MultiTypeEventTypeID type)
 
- Public Member Functions inherited from OIS::Object
virtual ~Object ()
 
Type type () const
 
const std::string & vendor () const
 
virtual bool buffered () const
 
InputManagergetCreator () const
 
virtual void setBuffered (bool buffered)=0
 
virtual void capture ()=0
 
virtual int getID () const
 
virtual InterfacequeryInterface (Interface::IType type)=0
 
virtual void _initialize ()=0
 

Protected Member Functions

 MultiTouch (const std::string &vendor, bool buffered, int devID, InputManager *creator)
 
- Protected Member Functions inherited from OIS::Object
 Object (const std::string &vendor, Type iType, bool buffered, int devID, InputManager *creator)
 

Protected Attributes

std::vector< MultiTouchStatemStates
 The state of the touch device, implemented in a vector to store the state from each finger touch. More...
 
MultiTouchListenermListener
 Used for buffered/actionmapping callback. More...
 
- Protected Attributes inherited from OIS::Object
std::string mVendor
 Vendor name if applicable/known. More...
 
Type mType
 Type of controller object. More...
 
bool mBuffered
 Buffered flag. More...
 
int mDevID
 Not fully implemented yet. More...
 
InputManagermCreator
 The creator who created this object. More...
 

Detailed Description

MultiTouch base class. To be implemented by specific system (ie. iPhone UITouch) This class is useful as you remain OS independent using this common interface.

Constructor & Destructor Documentation

◆ ~MultiTouch()

virtual OIS::MultiTouch::~MultiTouch ( )
inlinevirtual

◆ MultiTouch()

OIS::MultiTouch::MultiTouch ( const std::string &  vendor,
bool  buffered,
int  devID,
InputManager creator 
)
inlineprotected

Member Function Documentation

◆ clearStates()

void OIS::MultiTouch::clearStates ( void  )
inline
Remarks
Clear out the set of input states. Should be called after input has been processed by the application

◆ getEventCallback()

MultiTouchListener* OIS::MultiTouch::getEventCallback ( )
inline
Remarks
Returns currently set callback.. or 0

◆ getFirstNTouchStates()

const std::vector<MultiTouchState> OIS::MultiTouch::getFirstNTouchStates ( int  n)
inline
Remarks
Returns the first n touch states. Useful if you know your app only needs to process n touches. The return value is a vector to allow random access

◆ getMultiTouchStates()

std::vector<MultiTouchState> OIS::MultiTouch::getMultiTouchStates ( ) const
inline
Remarks
Returns the state of the touch - is valid for both buffered and non buffered mode

◆ getMultiTouchStatesOfType()

const std::vector<MultiTouchState> OIS::MultiTouch::getMultiTouchStatesOfType ( MultiTypeEventTypeID  type)
inline
Remarks
Returns the first n touch states. Useful if you know your app only needs to process n touches. The return value is a vector to allow random access

◆ setEventCallback()

virtual void OIS::MultiTouch::setEventCallback ( MultiTouchListener touchListener)
inlinevirtual
Remarks
Register/unregister a MultiTouch Listener - Only one allowed for simplicity. If broadcasting is necessary, just broadcast from the callback you registered.
Parameters
touchListenerSend a pointer to a class derived from MultiTouchListener or 0 to clear the callback

Member Data Documentation

◆ mListener

MultiTouchListener* OIS::MultiTouch::mListener
protected

Used for buffered/actionmapping callback.

◆ mStates

std::vector<MultiTouchState> OIS::MultiTouch::mStates
protected

The state of the touch device, implemented in a vector to store the state from each finger touch.


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