TranslationController

public class TranslationController

使用 DragGestureRecognizer 操控 BaseTransformableNode 的位置。如果未选择,则 BaseTransformableNode 将在 DragGesture 启动时被选中。

公共构造函数

TranslationControllerBaseTransformableNode 可变形节点、DragGestureRecognizer gestureRecognizer)

公共方法

布尔值
EnumSet<Plane.Type>
getAllowedPlaneTypes()
获取对 EnumSet 的引用,用于确定允许此 TranslationController 进行转换的 ArCore 平面类型。
布尔值
无效
无效
无效
onUpdatedNode 节点、FrameTime frameTime)
向监听器发出调用 onUpdate(FrameTime) 的通知。
无效
setAllowedPlaneTypes(EnumSet<Plane.Type>allowedPlaneTypes)
设置允许此 TranslationController 进行转换的 ArCore 平面类型。

继承的方法

公共构造函数

public TranslationController (BaseTransformableNodetransformableNode、DragGestureRecognizer gestureRecognizer)

参数
可变形节点
手势识别器

公共方法

布尔值 canStartTransformation (DragGesture 手势)

参数
手势

public EnumSet<Plane.Type> getAllowedPlaneTypes ()

获取对 EnumSet 的引用,用于确定允许此 TranslationController 进行转换的 ArCore 平面类型。

public boolean isTransforming ()

public void onContinueTransformation (DragGesture 手势)

参数
手势

public void onEndTransformation (DragGesture 手势)

参数
手势

public void onUpdated (Node Node, FrameTime frameTime)

向监听器发出调用 onUpdate(FrameTime) 的通知。

参数
节点 已更新的节点
帧时间 提供当前帧的时间信息

public void setAllowedPlaneTypes (EnumSet<Plane.Type>allowedPlaneTypes)

设置允许此 TranslationController 进行转换的 ArCore 平面类型。

参数
允许平面类型