HKAnnotation

@objc
public class HKAnnotation : NSObject

The HKAnnotation object represents an object annotation in the scene

  • objectID of the annotated object this is required, all annotations must be connected to an object

    Declaration

    Swift

    @objc
    public var objectId: String
  • annotation title

    Declaration

    Swift

    @objc
    public var title: String
  • annotation description text

    Declaration

    Swift

    @objc
    public var text: String
  • annotation ID for reference

    Declaration

    Swift

    @objc
    public var annotationId: String
  • world position [x,y,z]

    Declaration

    Swift

    @objc
    public var position: [Double]
  • screen position [x,y] of the annotation

    Declaration

    Swift

    @objc
    public var canvasPosition: [Double]
  • label offset [x,y] from the object can be used to enhance visibility

    Declaration

    Swift

    @objc
    public var labelOffset: [Double]
  • whether or not the annotation is currently visible this will get set to false if the annotation moves off screen or is occluded

    Declaration

    Swift

    @objc
    public var shown: Bool
  • whether or not the annotation is occludable

    Declaration

    Swift

    @objc
    public var occludable: Bool
  • Create an HKAnnotation with the ID of its object

    Declaration

    Swift

    @objc
    public init(objectId: String)

    Parameters

    objectId

    Id of the attached object