- 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.
TranslationController
Stay organized with collections
Save and categorize content based on your preferences.
Public Methods
boolean |
|
EnumSet
< Plane.Type
> |
getAllowedPlaneTypes
() Gets a reference to the EnumSet that determines which types of ArCore Planes this
TranslationController is allowed to translate on.
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
Inherited Methods
From class
java.lang.Object
Public Constructors
Parameters
transformableNode |
gestureRecognizer |
Public Methods
public EnumSet
< Plane.Type
>
getAllowedPlaneTypes
()
Gets a reference to the EnumSet that determines which types of ArCore Planes this
TranslationController is allowed to translate on.
public
void
setAllowedPlaneTypes
( EnumSet
< Plane.Type
> allowedPlaneTypes)
Sets which types of ArCore Planes this TranslationController is allowed to translate on.
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\u003eThe \u003ccode\u003eTranslationController\u003c/code\u003e class manages the movement of a \u003ccode\u003eBaseTransformableNode\u003c/code\u003e within an AR scene using drag gestures.\u003c/p\u003e\n"],["\u003cp\u003eIt selects the \u003ccode\u003eBaseTransformableNode\u003c/code\u003e when a drag gesture begins if it's not already selected and then manipulates its position.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can control the allowed plane types for translation using \u003ccode\u003egetAllowedPlaneTypes\u003c/code\u003e and \u003ccode\u003esetAllowedPlaneTypes\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods like \u003ccode\u003ecanStartTransformation\u003c/code\u003e, \u003ccode\u003eonContinueTransformation\u003c/code\u003e, and \u003ccode\u003eonEndTransformation\u003c/code\u003e to manage the transformation lifecycle.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eisTransforming\u003c/code\u003e indicates the current transformation state of the controlled node.\u003c/p\u003e\n"]]],["The `TranslationController` class manages the repositioning of a `BaseTransformableNode` via a `DragGestureRecognizer`. It initiates node selection if unselected when a `DragGesture` begins. Key actions include: constructing with a transformable node and gesture recognizer, determining if a transformation can start, managing allowed ArCore plane types, checking transformation status, handling continuous and ending transformations. Additionally, the controller updates based on node and frame time, and manages plane types on which the node can be translated.\n"],null,[]]