![]() |
VR-Forces 4.8 Class Documentation
|
DtPinchGesture represents a Pinch Multitouch Gesture. More...
Public Types | |
| enum | PinchGestureState { PinchGestureStateUnspecified, PinchGestureStateBegin, PinchGestureStateUpdate, PinchGestureStateEnd } |
| Enumeration used to express the current pinch gesture state. More... | |
| typedef DtVector2< float32 > | DtVector2f |
| Typedefs for templated vectors used throughout. More... | |
| typedef DtLine2D< float32 > | DtLine2f |
Public Member Functions | |
| DtPinchGesture () | |
| CTOR. More... | |
| DtPinchGesture (const DtPinchGesture &orig) | |
| Copy CTOR. More... | |
| DtPinchGesture & | operator= (const DtPinchGesture &rhs) |
| Assignment Operator. More... | |
| virtual | ~DtPinchGesture () |
| DTOR. More... | |
| virtual PinchGestureState | gestureState () const |
| Get the current gesture state. More... | |
| virtual void | setGestureState (PinchGestureState gestureState) |
| Set the gesture state; this method allows the gesture state to be modified without actually processing a touch event. More... | |
| virtual float | scaleFactor () const |
| Get the current scale factor. More... | |
| virtual float | lastScaleFactor () const |
| Get the last scale factor. More... | |
| virtual float | totalScaleFactor () const |
| Get the total scale factor. More... | |
| virtual float | rotationAngle () const |
| Get the rotation angle. More... | |
| virtual float | lastRotationAngle () const |
| Get the last rotation angle. More... | |
| virtual float | totalRotationAngle () const |
| Get the total rotation angle. More... | |
| virtual DtVector2f | startCenterPoint () const |
| Get the start center point. More... | |
| virtual DtVector2f | centerPoint () const |
| Get the center point. More... | |
| virtual DtVector2f | lastCenterPoint () const |
| Get the last center point. More... | |
| virtual void | processTouchEvent (PinchGestureState gestureState, const DtVector2f &p0, const DtVector2f &p1) |
| Process a touch event. More... | |
Protected Member Functions | |
| virtual void | computeCurrentScaleFactor (PinchGestureState gestureState, const DtVector2f &p0, const DtVector2f &p1) |
| This method initializes the gesture if it hasn't been already and then does all the actual computation. More... | |
Protected Attributes | |
| bool | myInitialized |
| PinchGestureState | myGestureState |
| DtLine2f | myStartLine |
| DtLine2f | myLastLine |
| float | myScaleFactor |
| float | myLastScaleFactor |
| float | myTotalScaleFactor |
| float | myRotationAngle |
| float | myLastRotationAngle |
| float | myTotalRotationAngle |
| DtVector2f | myCenterPoint |
| DtVector2f | myStartCenterPoint |
| DtVector2f | myLastCenterPoint |
DtPinchGesture represents a Pinch Multitouch Gesture.
Instances of the DtPinchGesture class are used to manage multitouch events involving 2 touch points representing a classic 'pinch' gesture. It provides a scaleFactor based on the relative distances between touches, as well as a rotation angle based on the angle between the lines connecting subsequent touches
Typedefs for templated vectors used throughout.
float32 is sufficient precision for widget coordinates
| makVrv::DtPinchGesture::DtPinchGesture | ( | ) |
CTOR.
| makVrv::DtPinchGesture::DtPinchGesture | ( | const DtPinchGesture & | orig | ) |
Copy CTOR.
|
virtual |
DTOR.
| DtPinchGesture& makVrv::DtPinchGesture::operator= | ( | const DtPinchGesture & | rhs | ) |
Assignment Operator.
|
virtual |
Get the current gesture state.
|
virtual |
Set the gesture state; this method allows the gesture state to be modified without actually processing a touch event.
|
virtual |
Get the current scale factor.
This is the ratio of the distances between the last touch points and the current touch points
|
virtual |
Get the last scale factor.
This is the scaleFactor from the previous touch event
|
virtual |
Get the total scale factor.
This is the ratio of the distances between the first touch points and the current touch points
|
virtual |
Get the rotation angle.
This is the difference between the angles of the last line between the touch points and the current line
|
virtual |
Get the last rotation angle.
This is the value of rotationAngle from the last touch event
|
virtual |
Get the total rotation angle.
This is the difference between the angles of the last line between the touch points and the first touch points
|
virtual |
Get the start center point.
This is the point in between the first two touch points (in channel coordinates)
|
virtual |
Get the center point.
This is the point in between the two current touch points (in channel coordinates)
|
virtual |
Get the last center point.
This is the value of centerPoint from the previous touch event (in channel coordinates)
|
virtual |
Process a touch event.
This sets the gesture state and then calls computeCurrentScaleFactor().
|
protectedvirtual |
This method initializes the gesture if it hasn't been already and then does all the actual computation.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |