Skip to main content
←API Reference ←com.nianticspatial.nsdk.playback

PlaybackCamera


Declaration​

class PlaybackCamera

Summary​

Camera representation for playback, built from frame [metadata]. Exposes transform, intrinsics, resolution, tracking state, and orientation. Use [toArCorePose] to build a [Pose] for [FrameData.cameraPose]. Use [getViewMatrix] and [getProjectionMatrix] to drive a virtual camera for playback rendering.


Properties​

NameTypeSummary
imageResolutionPair<Int, Int>
Image resolution (width, height) in pixels.
intrinsicsCameraIntrinsics
Camera intrinsics (focal length, principal point, dimensions).
metadataFrameMetadata
-
orientationOrientation
Screen orientation from metadata.
trackingStateTrackingState
ARCore tracking state for this frame.
transformFloatArray
Camera-to-world 4×4 transform (column-major) as FloatArray of 16 elements.

Functions​

NameTypeSummary
displayOrientedTransformFloatArray
Display-oriented camera-to-world transform with Z rotation applied for the given orientation.
Sensor frame is landscape-right; portrait adds π/2, portrait-upside-down adds -π/2, landscape-left adds π.
Use for rendering so the camera matches on-screen orientation.
getDisplayOrientedPosePose
Display-oriented camera pose (Z rotation applied for the given orientation).
Use for VPS2 and UI that need heading aligned with the display.
getProjectionMatrixFloatArray
OpenGL-style projection matrix (column-major) from intrinsics for the given viewport and near/far.
Use with [getViewMatrix] to render 3D content aligned with the playback camera.
getViewMatrixFloatArray
World-to-camera view matrix (column-major) for the given display orientation.
Inverse of [displayOrientedTransform]. Pass to OpenGL/GLES as the view matrix.
toArCorePosePose
Builds an ARCore [Pose] from this frame's 4×4 transform (column-major).
Use for [FrameData.cameraPose] when building frame data from playback.