- Sceneform SDK for Android
was open sourced and archived ( github.com/google-ar/sceneform-android-sdk
) with version 1.16.0.
- This site ( developers.google.com/sceneform
) serves as the documentation archive for the previous version, Sceneform SDK for Android
1.15.0.
- Do not use version 1.17.0 of the Sceneform Maven artifacts
.
- The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
TwistGesture
Stay organized with collections
Save and categorize content based on your preferences.
Gesture for when the user performs a two-finger twist motion on the touch screen.
Nested Classes
interface
Interface definition for callbacks to be invoked by a TwistGesture
.
Inherited Methods
From class
java.lang.Object
Public Constructors
public
TwistGesture
( GesturePointersUtility
gesturePointersUtility, MotionEvent
motionEvent, int pointerId2)
Parameters
gesturePointersUtility |
motionEvent |
pointerId2 |
Public Methods
public
float
getDeltaRotationDegrees
()
Protected Methods
protected
void
onCancel
()
protected
void
onFinish
()
protected
boolean
updateGesture
( HitTestResult
hitTestResult, MotionEvent
motionEvent)
Parameters
hitTestResult |
motionEvent |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eTwistGesture\u003c/code\u003e detects and tracks two-finger twist motions on a touchscreen.\u003c/p\u003e\n"],["\u003cp\u003eIt provides \u003ccode\u003egetDeltaRotationDegrees()\u003c/code\u003e to measure the rotation change in degrees.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eOnGestureEventListener\u003c/code\u003e to receive callbacks for twist gesture events (start, finish, cancel).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTwistGesture\u003c/code\u003e inherits functionality from \u003ccode\u003eBaseGesture\u003c/code\u003e for gesture management.\u003c/p\u003e\n"],["\u003cp\u003eThe gesture can be targeted to a specific \u003ccode\u003eNode\u003c/code\u003e in the scene.\u003c/p\u003e\n"]]],["The `TwistGesture` class detects two-finger twist motions on a touchscreen. It utilizes `GesturePointersUtility` and `MotionEvent` to track touch input and a `HitTestResult`. Key actions include determining if a twist can start (`canStart`), initiating the twist (`onStart`), updating the twist's progress (`updateGesture`), canceling (`onCancel`), and finishing (`onFinish`). The `getDeltaRotationDegrees` method provides the degree of rotation of the gesture, and `getSelf` returns the instance of the gesture.\n"],null,[]]