@twinfinity/core
    Preparing search index...

    Class Html2CanvasPoint

    Base class for tracked 3D points. Point coordinates can be applied in both local and world space.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _localX: number = 0
    _localY: number = 0
    _localZ: number = 0
    _recalculateLocalCoords: boolean = false
    _recalculateWorldCoords: boolean = false
    _worldX: number
    _worldY: number
    _worldZ: number
    isEnabled: boolean = true

    When true then DynamicPolygon.onPointTrackableScreen will trigger for this instance. Otherwise it will not

    plane: Plane

    Plane that this point lies on.

    Accessors

    • get localX(): number

      X coordinate of point in local space.

      Returns number

    • get localY(): number

      Y coordinate of point in local space.

      Returns number

    • get localZ(): number

      Z coordinate of point in local space.

      Returns number

    • get x(): number

      X coordinate of point in world space.

      Returns number

    • set x(val: number): void

      Set the X coordinate of point in world space.

      Parameters

      • val: number

      Returns void

    • get y(): number

      Y coordinate of point in world space.

      Returns number

    • set y(val: number): void

      Set the Y coordinate of point in world space.

      Parameters

      • val: number

      Returns void

    • get z(): number

      Z coordinate of point in world space.

      Returns number

    • set z(val: number): void

      Set the Z coordinate of point in world space.

      Parameters

      • val: number

      Returns void

    Methods

    • Attempt to move a point to a new location on Plane. To find the location, a ray is shot from camera through canvasCoordinate and then an intersection test is performed. If the ray intersects Plane, the point is moved to the coordinates of the intersection. Otherwise nothing happens. The point is assigned the same x,y,z values as the coordinate where the ray intersects the plane.

      Parameters

      Returns PointMoveResult

      a DynamicPolygonPointMoveResult.

    • Returns void

    • Parameters

      • retainAspectRatio: boolean = true

      Returns void

    • Set coordinates in local space.

      Parameters

      • x: number

        X coordinate in local space.

      • y: number

        Y coordinate in local space.

      • z: number

        Z coordinate in local space.

      Returns void

    • Returns void