ARCameraNode

open class ARCameraNode(engine: Engine) : CameraNode

Represents a virtual camera, which determines the perspective through which the scene is viewed.

If the camera is part of an ARSceneView, then the camera automatically tracks the camera pose from ARCore.

The following methods will throw [ ] when called:

  • parent - CameraNode's parent cannot be changed, it is always the scene.

  • position - CameraNode's position cannot be changed, it is controlled by the ARCore camera pose.

  • rotation - CameraNode's rotation cannot be changed, it is controlled by the ARCore camera pose.

All other functionality in Node is supported. You can access the position and rotation of the camera, assign a collision shape to the camera, or add children to the camera. Disabling the camera turns off rendering.

Inheritors

Constructors

Link copied to clipboard
constructor(engine: Engine)

Properties

Link copied to clipboard
open val aperture: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val cullingFar: Float
Link copied to clipboard
Link copied to clipboard
val engine: Engine
Link copied to clipboard
Link copied to clipboard
open override var far: Float
Link copied to clipboard
open override var focalLength: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var frame: Frame?
Link copied to clipboard
open override var isEditable: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var isTouchable: Boolean
Link copied to clipboard
open var isVisible: Boolean
Link copied to clipboard
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
Link copied to clipboard
open var name: String?
Link copied to clipboard
open override var near: Float
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 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
open var parent: Node?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var pose: Pose?

The virtual camera pose in world space for rendering AR content onto the latest frame.

Link copied to clipboard
open var position: Position
Link copied to clipboard
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
open val scaling: Float4
Link copied to clipboard
open val sensitivity: Float
Link copied to clipboard
var session: Session?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open 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
Link copied to clipboard
var view: View?
Link copied to clipboard
val viewport: Viewport?
Link copied to clipboard
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 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 hitTest(motionEvent: MotionEvent): List<HitResult>
fun hitTest(xPx: Float, yPx: Float): List<HitResult>
Link copied to clipboard
fun hitTestView(xViewPercent: Float, yViewPercent: Float): List<HitResult>
Link copied to clipboard
open fun lookAt(eye: Position, center: Position, up: Direction)
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
fun motionEventToRay(motionEvent: MotionEvent): Ray
Link copied to clipboard
open fun onAddedToScene(scene: Scene)
Link copied to clipboard
open fun onCameraUpdated(camera: Camera)

Updates the current projection and pose of the camera in world space.

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, 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 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
open fun onTrackingStateChanged(trackingState: TrackingState)
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
Link copied to clipboard
open fun setCustomProjection(inProjection: Transform, near: Double, far: Double, inProjectionForCulling: Transform)
Link copied to clipboard
open fun setExposure(exposure: Float)
open fun setExposure(aperture: Float, shutterSpeed: Float, sensitivity: Float)
Link copied to clipboard
open fun setLensProjection(focalLength: Double, aspect: Double, near: Double, far: Double)
Link copied to clipboard
open fun setProjection(fovInDegrees: Double, aspect: Double, near: Double, far: Double, direction: Camera.Fov)
open fun setProjection(projection: Camera.Projection, left: Double, right: Double, bottom: Double, top: Double, near: Double, far: Double)
fun setProjection(fovInDegrees: Double, near: Float, far: Float, direction: Camera.Fov, aspect: Double)
Link copied to clipboard
fun setScale(scale: Float)
Link copied to clipboard
open fun setScaling(scaling: Float2)
Link copied to clipboard
open fun setShift(xShift: Double, yShift: Double)
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 fun update(session: Session, frame: Frame)
Link copied to clipboard
open fun updateProjection(focalLength: Double, near: Float, far: Float, aspect: Double)
Link copied to clipboard
open fun viewToRay(viewPosition: Float2): Ray
Link copied to clipboard
open fun viewToWorld(viewPosition: Float2, z: Float): Position
Link copied to clipboard
Link copied to clipboard
open fun worldToView(worldPosition: Position): Float2
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