50#ifndef _SO_TOUCH_EVENT_
51#define _SO_TOUCH_EVENT_
124 #ifndef HIDDEN_FROM_DOC
239 static void initClass();
240 static void exitClass();
244 unsigned long m_fingerId;
254 SbTime m_firstContactTime;
#define SO_EVENT_HEADER()
Class for representation of a time.
Base class for all events.
Base class for touch events.
SbVec2f getAcceleration() const
Gets the acceleration vector (in pixels per second squared) between the previous event and the curren...
SbVec2f getFirstPosition() const
Gets the first position (in pixels).
virtual void setPosition(const SbVec2s &p)
Sets the window pixel location of the cursor when the event occurred.
SoTouchEvent()
Constructor.
SbVec2f getDisplacement() const
Gets the deplacement vector (in pixels) between the previous event and the current one.
SbVec2f getSpeed() const
Gets the speed (in pixels per second) between the previous event and the current one.
SbTime getPreviousEventTime() const
Gets the time of previous event of the finger identified by getFingerId().
State
The different states a touch event can have.
@ DOWN
Down state : The finger is on the screen.
@ MOVE
Move state : The finger is moving on the screen.
@ UP
Up state : The finger is off the screen.
SbVec2f getPreviousPosition() const
Gets the previous position of the same finger (in pixels).
SbTime getElapsedTimeUntilPreviousEvent() const
Gets the elapsed time between the first contact and previous event, for the finger identified by getF...
SbTime getElapsedTimeSincePreviousEvent() const
Gets the elapsed time since previous event, triggered by the same finger, in seconds.
virtual void setPosition(const SbVec2f &p)
Sets the current position (in pixels) and the displacement vector.
virtual void setTime(SbTime t)
Sets the time at which the event occurred.
void setPreviousSpeed()
Sets the previous speed in pixels per second.
void setFingerId(unsigned long idFinger)
Sets the id of the finger triggering this event.
void setTouchManager(SoTouchManager *manager)
Sets the TouchManager for this event.
SbTime getFirstContactTime() const
Gets the time of first contact in seconds of the finger identified by getFingerId().
unsigned long getFingerId() const
Gets the id of the finger triggering this event.
void setFirstPosition(SbVec2f)
Sets the first position (in pixels).
SbVec2f getPreviousSpeed() const
Gets the previous speed (in pixels per second).
State getState() const
Gets the touch event state (Up, Down, Move or Unknown).
void setState(SoTouchEvent::State b)
Sets the state of the touch event.
SoTouchManager * getTouchManager() const
Gets the corresponding TouchManager for this event.
Class for managing events from touch screen input devices.