# Class ArbitraryShapePoint

Represents a control point in a DynamicPolygonWithArbitraryPoints. Inherit from this class if additional functionality is required.

#### Hierarchy (View Summary)

- DynamicPolygonPoint
  - ArbitraryShapePoint

##### Index

### Constructors

constructor

### Properties

_api
_id
_isVirtual
_localX
_localY
_localZ
_recalculateLocalCoords
_recalculateWorldCoords
_worldX
_worldY
_worldZ
isEnabled
plane
_tmp

### Accessors

isDeletable
localX
localY
localZ
x
y
z

### Methods

apply
delete
insertVirtualPointAfter
move
moveToMiddleBetweenPointsToRef
points
recalculateOrGetLocalCoords
recalculateOrGetWorldCoords
remove
setLocals
virtual
IsNotVirtual

## Constructors

### constructor

- new ArbitraryShapePoint(
  _api: BimCoreApi,
  plane: Plane,
  isVirtual: boolean,
  ): ArbitraryShapePoint

  #### Parameters

  - _api: BimCoreApi

    BimCoreApi API.

  - plane: Plane

    Plane that this point lies on.

  - isVirtual: boolean

    whether point is virtual or not.

  #### Returns ArbitraryShapePoint

  Overrides DynamicPolygonPoint.constructor

## Properties

### `Protected` `Readonly`_api

_api: BimCoreApi

BimCoreApi API.

Inherited from DynamicPolygonPoint._api

### `Protected`_id

_id: number = ...

Inherited from DynamicPolygonPoint._id

### `Protected`_isVirtual

_isVirtual: boolean

Inherited from DynamicPolygonPoint._isVirtual

### `Protected`_localX

_localX: number = 0

Inherited from DynamicPolygonPoint._localX

### `Protected`_localY

_localY: number = 0

Inherited from DynamicPolygonPoint._localY

### `Protected`_localZ

_localZ: number = 0

Inherited from DynamicPolygonPoint._localZ

### `Protected`_recalculateLocalCoords

_recalculateLocalCoords: boolean = false

Inherited from DynamicPolygonPoint._recalculateLocalCoords

### `Protected`_recalculateWorldCoords

_recalculateWorldCoords: boolean = false

Inherited from DynamicPolygonPoint._recalculateWorldCoords

### `Protected`_worldX

_worldX: number

Inherited from DynamicPolygonPoint._worldX

### `Protected`_worldY

_worldY: number

Inherited from DynamicPolygonPoint._worldY

### `Protected`_worldZ

_worldZ: number

Inherited from DynamicPolygonPoint._worldZ

### isEnabled

isEnabled: boolean = true

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

Inherited from DynamicPolygonPoint.isEnabled

### `Readonly` plane

plane: Plane

Plane that this point lies on.

Inherited from DynamicPolygonPoint.plane

### `Protected` `Static` `Readonly`_tmp

_tmp: {
counter: number;
identityMatrix: Matrix;
rayA: Ray;
vector3A: Vector3;
vector3B: Vector3;
} = ...

Inherited from DynamicPolygonPoint._tmp

## Accessors

### isDeletable

- get isDeletable(): DynamicPolygonPointDeleteResult

  Check if `this` point can be deleted or not.

  #### Returns DynamicPolygonPointDeleteResult

  a DynamicPolygonPointDeleteResult.

  Inherited from DynamicPolygonPoint.isDeletable

### localX

- get localX(): number

  X coordinate of point in local space.

  #### Returns number

  Inherited from DynamicPolygonPoint.localX

### localY

- get localY(): number

  Y coordinate of point in local space.

  #### Returns number

  Inherited from DynamicPolygonPoint.localY

### localZ

- get localZ(): number

  Z coordinate of point in local space.

  #### Returns number

  Inherited from DynamicPolygonPoint.localZ

### x

- get x(): number

  X coordinate of point in world space.

  #### Returns number

  Inherited from DynamicPolygonPoint.x

- set x(val: number): void

  Set the X coordinate of point in world space.

  #### Parameters

  - val: number

  #### Returns void

  Inherited from DynamicPolygonPoint.x

### y

- get y(): number

  Y coordinate of point in world space.

  #### Returns number

  Inherited from DynamicPolygonPoint.y

- set y(val: number): void

  Set the Y coordinate of point in world space.

  #### Parameters

  - val: number

  #### Returns void

  Inherited from DynamicPolygonPoint.y

### z

- get z(): number

  Z coordinate of point in world space.

  #### Returns number

  Inherited from DynamicPolygonPoint.z

- set z(val: number): void

  Set the Z coordinate of point in world space.

  #### Parameters

  - val: number

  #### Returns void

  Inherited from DynamicPolygonPoint.z

## Methods

### apply

- apply(): void

  Same as calling DynamicPolygon.apply.

  #### Returns void

  Inherited from DynamicPolygonPoint.apply

### delete

- delete(): DynamicPolygonPointDeleteResult

  Deletes `this` point from the parent DynamicPolygon. It is possible to use isDeletable to check if point can be deleted beforehand.

  #### Returns DynamicPolygonPointDeleteResult

  a DynamicPolygonPointMoveResult.

  Overrides DynamicPolygonPoint.delete

### `Protected` insertVirtualPointAfter

- insertVirtualPointAfter(p: DynamicPolygonPoint): DynamicPolygonPoint

  #### Parameters

  - p: DynamicPolygonPoint

  #### Returns DynamicPolygonPoint

  Inherited from DynamicPolygonPoint.insertVirtualPointAfter

### move

- move(canvasCoordinate: Vertex2): DynamicPolygonPointMoveResult

  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. It is also not possible to move a point if it results in a complex polygon. The point is assigned the same x,y,z values as the coordinate where the ray intersects the plane.

  #### Parameters

  - canvasCoordinate: Vertex2

  #### Returns DynamicPolygonPointMoveResult

  a DynamicPolygonPointMoveResult.

  Inherited from DynamicPolygonPoint.move

### `Protected` moveToMiddleBetweenPointsToRef

- moveToMiddleBetweenPointsToRef(
  start: DynamicPolygonPoint,
  end: DynamicPolygonPoint,
  dst: DynamicPolygonPoint,
  ): DynamicPolygonPoint

  #### Parameters

  - start: DynamicPolygonPoint
  - end: DynamicPolygonPoint
  - dst: DynamicPolygonPoint

  #### Returns DynamicPolygonPoint

  Inherited from DynamicPolygonPoint.moveToMiddleBetweenPointsToRef

### points

- points(
  predicate?: (p: ArbitraryShapePoint) => boolean,
  ): Generator<ArbitraryShapePoint, void, unknown>

  Enables iteration of all points in the polygon.

  #### Parameters

  - `Optional` predicate: (p: ArbitraryShapePoint) => boolean

    Optional predicate. If specified only points where the predicate returns `true` will be returned.

  #### Returns Generator<ArbitraryShapePoint, void, unknown>

  generator.

  Overrides DynamicPolygonPoint.points

### `Protected` recalculateOrGetLocalCoords

- recalculateOrGetLocalCoords(force?: boolean): Vertex3

  #### Parameters

  - force: boolean = false

  #### Returns Vertex3

  Inherited from DynamicPolygonPoint.recalculateOrGetLocalCoords

### `Protected` recalculateOrGetWorldCoords

- recalculateOrGetWorldCoords(force?: boolean): Vertex3

  #### Parameters

  - force: boolean = false

  #### Returns Vertex3

  Inherited from DynamicPolygonPoint.recalculateOrGetWorldCoords

### `Protected` remove

- remove(p: DynamicPolygonPoint): void

  #### Parameters

  - p: DynamicPolygonPoint

  #### Returns void

  Overrides DynamicPolygonPoint.remove

### 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 DynamicPolygonPoint.setLocals

### virtual

- virtual(v?: boolean): boolean

  This method has two purposes.

  1. Check if `this` point is virtual or not (if `v` is undefined). This is very useful in a UI where a different visualization for a 'virtual drag point' and a 'real drag point' may be required..

  2. Convert `this` point to/from virtual by specifying `v`.

  #### Parameters

  - `Optional` v: boolean

    Optional. If not specified function only returns current state. If specified then point is converted to either a virtual point (v = `true`) or a non virtual point (`v = false`).

  #### Returns boolean

  If `v` was not specified then `true` if point is virtual, otherwise `false`. If `v` was specified it returns `true` if point was successfully converted. Otherwise `false`. A point cannot be converted from non virtual to virtual if there are 3 or less non virtual points in the polygon.

  Overrides DynamicPolygonPoint.virtual

### `Static` IsNotVirtual

- IsNotVirtual(p: DynamicPolygonPoint): boolean

  Predicate to check if a point is virtual or not.

  #### Parameters

  - p: DynamicPolygonPoint

    Point to check

  #### Returns boolean

  `true` if point is not virtual, otherwise `false`.

  Inherited from DynamicPolygonPoint.IsNotVirtual