CameraManager

public class CameraManager : PNDelegate

A helper class that takes the pose output from the LibPlacenote mapping/localization module and transform the ARKit camera to align the inertial map frame while maintaining high frame rate.

  • Constructor of the camera manager. Removes the camera node from its parent, and insert an intermediate SCNNode between the scene’s rootnode and the camera node, so that we can rotate the ARKit frame to the LibPlacenote map frame

    Declaration

    Swift

    public init(scene: SCNScene, cam: SCNNode)

    Parameters

    scene

    The scene we wish the LibPlacenote camera to exist

    cam

    camera node that is controlled by ARKit

  • Callback to subscribe to pose measurements from LibPlacenote

    Declaration

    Swift

    public func onPose(_ outputPose: matrix_float4x4, _ arkitPose: matrix_float4x4)

    Parameters

    outputPose

    Inertial pose with respect to the map LibPlacenote is tracking against.

    arkitPose

    Odometry pose with respect to the ARKit coordinate frame that corresponds with ‘outputPose’ in time.

  • Callback to subscribe to mapping session status changes.

    Declaration

    Swift

    public func onStatusChange(_ prevStatus: LibPlacenote.MappingStatus, _ currStatus: LibPlacenote.MappingStatus)

    Parameters

    prevStatus

    Status before the status change

    currStatus

    Current status of the mapping engine

  • Callback to subscribe to the first localization event for loading assets

    Declaration

    Swift

    public func onLocalized()