HitResultNode

open class HitResultNode(engine: Engine, val hitTest: HitResultNode.(Frame) -> HitResult?) : TrackableNode<Trackable>

AR real time AR HitTest positioned node.

This PoseNode follows the actual ARCore detected orientation and position at the provided relative X, Y location in the ARSceneView

Performs a ray cast from the user's device in the direction of the given location in the camera view. Intersections with detected scene geometry are returned, sorted by distance from the device; the nearest intersection is returned first.

Constructors

Link copied to clipboard
constructor(engine: Engine, xPx: Float, yPx: Float, planeTypes: Set<Plane.Type> = Plane.Type.values().toSet(), point: Boolean = true, depthPoint: Boolean = true, instantPlacementPoint: Boolean = true, trackingStates: Set<TrackingState> = setOf(TrackingState.TRACKING), pointOrientationModes: Set<Point.OrientationMode> = setOf(Point.OrientationMode.ESTIMATED_SURFACE_NORMAL), planePoseInPolygon: Boolean = true, minCameraDistance: Pair<Camera, Float>? = null, predicate: (HitResult) -> Boolean? = null)

Contruct an HitResultNode based on View coordinate hit test location

constructor(engine: Engine, hitTest: HitResultNode.(Frame) -> HitResult?)

Properties

Link copied to clipboard
val anchors: Collection<Anchor>

Gets the Anchors attached to this node trackable.

Link copied to clipboard
open var cameraTrackingState: TrackingState

Is the AR camera tracking.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val engine: Engine
Link copied to clipboard
Link copied to clipboard
var frame: Frame?
Link copied to clipboard
open var hitResult: HitResult?
Link copied to clipboard
val hitTest: HitResultNode.(Frame) -> HitResult?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var isRotationEditable: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var isVisible: Boolean
Link copied to clipboard
var Node.localPosition: Float3
Link copied to clipboard
var Node.localRotation: Float3
Link copied to clipboard
var Node.localScale: Float3
Link copied to clipboard
var moveHitTest: PoseNode.(Frame, MotionEvent) -> HitResult?
Link copied to clipboard
open var name: String?
Link copied to clipboard
var onAddedToScene: (scene: Scene) -> Unit?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var onDown: (e: MotionEvent) -> Boolean?
Link copied to clipboard
var onEditingChanged: (editingTransforms: Set<KProperty1<Node, Any>?>) -> Unit?
Link copied to clipboard
var onFling: (e1: MotionEvent?, e2: MotionEvent, velocity: Float2) -> Boolean?
Link copied to clipboard
var onFrame: (frameTimeNanos: Long) -> Unit?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var onPoseChanged: (Pose) -> Unit?
Link copied to clipboard
var onRemovedFromScene: (scene: Scene) -> Unit?
Link copied to clipboard
var onRotate: (detector: RotateGestureDetector, e: MotionEvent, rotationDelta: Quaternion) -> Boolean?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var onScale: (detector: ScaleGestureDetector, e: MotionEvent, scaleFactor: Float) -> Boolean?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var onScroll: (e1: MotionEvent?, e2: MotionEvent, distance: Float2) -> Boolean?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var onSmoothEnd: (node: Node) -> Unit?
Link copied to clipboard
var onTouch: (e: MotionEvent, hitResult: HitResult) -> Boolean?
Link copied to clipboard
var onTrackingStateChanged: (TrackingState) -> Unit?
Link copied to clipboard
var onUpdated: (Trackable) -> Unit?
Link copied to clipboard
open var parent: Node?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var pose: Pose

The position of the intersection between a ray and detected real-world geometry.

Link copied to clipboard
open var position: Position
Link copied to clipboard
open var quaternion: Quaternion
Link copied to clipboard
open var rotation: Rotation
Link copied to clipboard
open var scale: Scale
Link copied to clipboard
var session: Session?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var trackable: Trackable?

The node world positioned trackable

Link copied to clipboard
var trackingState: TrackingState

The TrackingState of this Node.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val transformManager: TransformManager
Link copied to clipboard

Make the node follow the camera/screen matching real world positions

Link copied to clipboard
var visibleCameraTrackingStates: Set<TrackingState>

Set the node to be visible only on those camera tracking states

Link copied to clipboard
val visibleTrackingStates: Set<TrackingState>

Set the node to be visible only on those tracking states

Link copied to clipboard
Link copied to clipboard
open var worldQuaternion: Quaternion
Link copied to clipboard
Link copied to clipboard
open var worldScale: Scale
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addChildNode(node: Node): Node
Link copied to clipboard
fun addChildNodes(nodes: Set<Node>): Node
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun animatePositions(vararg positions: Position): ObjectAnimator
Link copied to clipboard
fun animateQuaternions(vararg quaternions: Quaternion): ObjectAnimator
Link copied to clipboard
fun animateRotations(vararg rotations: Rotation): ObjectAnimator
Link copied to clipboard
fun animateScales(vararg scales: Scale): ObjectAnimator
Link copied to clipboard
fun animateTransforms(vararg transforms: Transform): AnimatorSet
Link copied to clipboard
Link copied to clipboard
open override fun createAnchor(): Anchor?

Creates an anchor that is attached to this trackable, using the given initial pose in the world coordinate space.

Link copied to clipboard
open override fun createAnchorNode(): AnchorNode?

Creates an AnchorNode that is attached to this trackable, using the given initial pose in the world coordinate space.

Link copied to clipboard
open fun destroy()
Link copied to clipboard
fun getLocalPosition(worldPosition: Position): Float3
Link copied to clipboard
fun getLocalQuaternion(worldQuaternion: Quaternion): Quaternion
Link copied to clipboard
fun getLocalRotation(worldRotation: Rotation): Float3
Link copied to clipboard
fun getLocalScale(worldScale: Scale): Float3
Link copied to clipboard
fun getLocalTransform(worldTransform: Transform): Mat4
fun getLocalTransform(node: Node): Mat4
Link copied to clipboard
open override fun getTransformationMatrix(): Matrix
Link copied to clipboard
fun getWorldPosition(localPosition: Position): Float3
Link copied to clipboard
fun getWorldQuaternion(quaternion: Quaternion): Quaternion
Link copied to clipboard
fun getWorldRotation(rotation: Rotation): Float3
Link copied to clipboard
fun getWorldScale(scale: Scale): Float3
Link copied to clipboard
fun getWorldTransform(localTransform: Transform): Mat4
fun getWorldTransform(node: Node): Mat4
Link copied to clipboard
fun lookAt(targetWorldPosition: Position, upDirection: Direction, smooth: Boolean, smoothSpeed: Float): Node
fun lookAt(targetNode: Node, upDirection: Direction, smooth: Boolean, smoothSpeed: Float): Node
Link copied to clipboard
fun lookTowards(lookDirection: Direction, upDirection: Direction, smooth: Boolean, smoothSpeed: Float): Node
Link copied to clipboard
open fun onAddedToScene(scene: Scene)
Link copied to clipboard
open fun onCameraTrackingChanged(trackingState: TrackingState)
Link copied to clipboard
open override fun onContextClick(e: MotionEvent): Boolean
Link copied to clipboard
open override fun onDoubleTap(e: MotionEvent): Boolean
Link copied to clipboard
open override fun onDoubleTapEvent(e: MotionEvent): Boolean
Link copied to clipboard
open override fun onDown(e: MotionEvent): Boolean
Link copied to clipboard
open override fun onFling(e1: MotionEvent?, e2: MotionEvent, velocityX: Float, velocityY: Float): Boolean
Link copied to clipboard
open fun onFrame(frameTimeNanos: Long)
Link copied to clipboard
open override fun onLongPress(e: MotionEvent)
Link copied to clipboard
open override fun onMove(detector: MoveGestureDetector, e: MotionEvent): Boolean
open fun onMove(detector: MoveGestureDetector, e: MotionEvent, pose: Pose): Boolean
open fun onMove(detector: MoveGestureDetector, e: MotionEvent, worldPosition: Position): Boolean
Link copied to clipboard
open override fun onMoveBegin(detector: MoveGestureDetector, e: MotionEvent): Boolean
Link copied to clipboard
open override fun onMoveEnd(detector: MoveGestureDetector, e: MotionEvent)
Link copied to clipboard
open fun onPoseChanged(pose: Pose)
Link copied to clipboard
open fun onRemovedFromScene(scene: Scene)
Link copied to clipboard
open override fun onRotate(detector: RotateGestureDetector, e: MotionEvent): Boolean
open fun onRotate(detector: RotateGestureDetector, e: MotionEvent, rotationDelta: Quaternion): Boolean
Link copied to clipboard
open override fun onRotateBegin(detector: RotateGestureDetector, e: MotionEvent): Boolean
Link copied to clipboard
open override fun onRotateEnd(detector: RotateGestureDetector, e: MotionEvent)
Link copied to clipboard
open override fun onScale(detector: ScaleGestureDetector, e: MotionEvent): Boolean
open fun onScale(detector: ScaleGestureDetector, e: MotionEvent, scaleFactor: Float): Boolean
Link copied to clipboard
open override fun onScaleBegin(detector: ScaleGestureDetector, e: MotionEvent): Boolean
Link copied to clipboard
open override fun onScaleEnd(detector: ScaleGestureDetector, e: MotionEvent)
Link copied to clipboard
open override fun onScroll(e1: MotionEvent?, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean
Link copied to clipboard
open override fun onShowPress(e: MotionEvent)
Link copied to clipboard
Link copied to clipboard
open override fun onSingleTapUp(e: MotionEvent): Boolean
Link copied to clipboard
open fun onTouchEvent(e: MotionEvent, hitResult: HitResult): Boolean
Link copied to clipboard
Link copied to clipboard
fun Node.onUpdated(node: Node, frameTime: Long): Nothing?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setScale(scale: Float)
Link copied to clipboard
open fun transform(transform: Transform, smooth: Boolean, smoothSpeed: Float): Node
fun transform(position: Position, rotation: Rotation, scale: Scale, smooth: Boolean, smoothSpeed: Float): Node
fun transform(position: Position, quaternion: Quaternion, scale: Scale, smooth: Boolean, smoothSpeed: Float): Node
Link copied to clipboard
open override fun update(session: Session, frame: Frame)
open fun update(trackable: Trackable?)
Link copied to clipboard
open fun worldTransform(worldTransform: Transform, smooth: Boolean, smoothSpeed: Float): Node
fun worldTransform(position: Position, rotation: Rotation, scale: Scale, smooth: Boolean, smoothSpeed: Float): Node
fun worldTransform(position: Position, quaternion: Quaternion, scale: Scale, smooth: Boolean, smoothSpeed: Float): Node