Lens Scripting API

    Class TrackedPlane

    A representation for plane detected by native tracking. Can be used with TrackedPoint.

    // @input Component.RenderMeshVisual renderMeshVisual

    script.createEvent("WorldTrackingPlanesAddedEvent").bind(function (eventData) {
    var eventPlanes = eventData.getPlanes();

    for (var i = 0; i < eventPlanes.length; i++) {
    var eventPlane = eventPlanes[i];

    script.renderMeshVisual.mesh = eventPlane.mesh;
    }
    });

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    isValid: boolean

    Whether the detected plane is still available to utilize

    A coarse mesh describing the shape of the tracked plane. Can be displayed by RenderMeshVisual

    Returns the orientation of the detected plane, either vertical or horizontal.

    pivot: vec3

    The center point of the detected plane

    size: vec3

    The size of the detected plane, where it is described as width, 0, depth

    transform: mat4

    The position, rotation, and scale of the detected plane

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR