# Class Html2CanvasPoint

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

#### Hierarchy (View Summary)

- BimPointBase
  - Html2CanvasPoint

##### Index

### Constructors

constructor

### Properties

_api
_localX
_localY
_localZ
_parent
_recalculateLocalCoords
_recalculateWorldCoords
_worldX
_worldY
_worldZ
isEnabled
plane

### Accessors

localX
localY
localZ
x
y
z

### Methods

move
recalculateOrGetLocalCoords
recalculateOrGetWorldCoords
rotate
scale
setLocals
tranlate

## Constructors

### constructor

- new Html2CanvasPoint(_api: BimCoreApi, plane: Plane): Html2CanvasPoint

  #### Parameters

  - _api: BimCoreApi

    BimCoreApi API.

  - plane: Plane

    Plane that this point lies on.

  #### Returns Html2CanvasPoint

  Overrides BimPointBase.constructor

## Properties

### `Protected` `Readonly`_api

_api: BimCoreApi

BimCoreApi API.

### `Protected`_localX

_localX: number = 0

Inherited from BimPointBase._localX

### `Protected`_localY

_localY: number = 0

Inherited from BimPointBase._localY

### `Protected`_localZ

_localZ: number = 0

Inherited from BimPointBase._localZ

### _parent

_parent: HtmlPointParent<Html2CanvasPoint>

### `Protected`_recalculateLocalCoords

_recalculateLocalCoords: boolean = false

Inherited from BimPointBase._recalculateLocalCoords

### `Protected`_recalculateWorldCoords

_recalculateWorldCoords: boolean = false

Inherited from BimPointBase._recalculateWorldCoords

### `Protected`_worldX

_worldX: number

Inherited from BimPointBase._worldX

### `Protected`_worldY

_worldY: number

Inherited from BimPointBase._worldY

### `Protected`_worldZ

_worldZ: number

Inherited from BimPointBase._worldZ

### isEnabled

isEnabled: boolean = true

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

### `Readonly` plane

plane: Plane

Plane that this point lies on.

## Accessors

### localX

- get localX(): number

  X coordinate of point in local space.

  #### Returns number

  Inherited from BimPointBase.localX

### localY

- get localY(): number

  Y coordinate of point in local space.

  #### Returns number

  Inherited from BimPointBase.localY

### localZ

- get localZ(): number

  Z coordinate of point in local space.

  #### Returns number

  Inherited from BimPointBase.localZ

### x

- get x(): number

  X coordinate of point in world space.

  #### Returns number

  Inherited from BimPointBase.x

- set x(val: number): void

  Set the X coordinate of point in world space.

  #### Parameters

  - val: number

  #### Returns void

  Inherited from BimPointBase.x

### y

- get y(): number

  Y coordinate of point in world space.

  #### Returns number

  Inherited from BimPointBase.y

- set y(val: number): void

  Set the Y coordinate of point in world space.

  #### Parameters

  - val: number

  #### Returns void

  Inherited from BimPointBase.y

### z

- get z(): number

  Z coordinate of point in world space.

  #### Returns number

  Inherited from BimPointBase.z

- set z(val: number): void

  Set the Z coordinate of point in world space.

  #### Parameters

  - val: number

  #### Returns void

  Inherited from BimPointBase.z

## Methods

### move

- move(canvasCoordinate: Vertex2): PointMoveResult

  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

  - canvasCoordinate: Vertex2

  #### Returns PointMoveResult

  a DynamicPolygonPointMoveResult.

### `Protected` recalculateOrGetLocalCoords

- recalculateOrGetLocalCoords(force?: boolean): Vertex3

  #### Parameters

  - force: boolean = false

  #### Returns Vertex3

  Overrides BimPointBase.recalculateOrGetLocalCoords

### `Protected` recalculateOrGetWorldCoords

- recalculateOrGetWorldCoords(force?: boolean): Vertex3

  #### Parameters

  - force: boolean = false

  #### Returns Vertex3

  Overrides BimPointBase.recalculateOrGetWorldCoords

### rotate

- rotate(): void

  #### Returns void

### scale

- scale(retainAspectRatio?: boolean): void

  #### Parameters

  - retainAspectRatio: boolean = true

  #### Returns void

### setLocals

- setLocals(x: number, y: number, z: number): 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

  Inherited from BimPointBase.setLocals

### tranlate

- tranlate(): void

  #### Returns void