# Interface WorkObserver

每个点位的数据

interface WorkObserver {
accessibleNodes: readonly number[];
active: boolean;
derivedId: string | number;
derivedIdStr: string;
floorIndex: number;
images: WorkImage;
index: number;
loadable: boolean;
matrix: Matrix4;
panoId: `${string}[${number}]`;
panoIndex: number;
position: Vector3;
quaternion: Quaternion;
standingPosition: Vector3;
visibleNodes: readonly number[];
work: Work;
cubemapUvToVector(
this: WorkObserver,
cubeFace: CubeFace,
uv: Vector2,
uvOrigin?: "top-left" | "bottom-left",
): Vector3;
equirectangularUvToVector(
this: WorkObserver,
uv: Vector2,
uvOrigin?: "top-left" | "bottom-left",
): Vector3;
getWorldPosition(this: WorkObserver): Vector3;
getWorldStandingPosition(this: WorkObserver): Vector3;
vectorToCubemapUv(
this: WorkObserver,
vector: Vector3,
uvOrigin?: "top-left" | "bottom-left",
): [cubeFace: CubeFace, cubemapUv: Vector2];
vectorToEquirectangularUv(
this: WorkObserver,
vector: Vector3,
uvOrigin?: "top-left" | "bottom-left",
): Vector2;
}

#### Hierarchy (View Summary)

- WorkObserverProto
  - WorkObserver
    - WorkResolvedObserver

- Defined in lib/five/work/work.ts:71

##### Index

### Properties

accessibleNodes
active
derivedId
derivedIdStr
floorIndex
images
index
loadable
matrix
panoId
panoIndex
position
quaternion
standingPosition
visibleNodes
work

### Methods

cubemapUvToVector
equirectangularUvToVector
getWorldPosition
getWorldStandingPosition
vectorToCubemapUv
vectorToEquirectangularUv

## Properties

### accessibleNodes

accessibleNodes: readonly number[]

可以连通的相关点位序号

- Defined in lib/five/work/work.ts:103

### active

active: boolean

点位是否激活可用

- Defined in lib/five/work/work.ts:91

### derivedId

derivedId: string | number

点位 derived_id

- Defined in lib/five/work/work.ts:87

### derivedIdStr

derivedIdStr: string

点位 derived_id_str

- Defined in lib/five/work/work.ts:89

### floorIndex

floorIndex: number

点位所在楼层

- Defined in lib/five/work/work.ts:85

### images

images: WorkImage

点位全景图

- Defined in lib/five/work/work.ts:95

### index

index: number

序号

- Defined in lib/five/work/work.ts:75

### loadable

loadable: boolean

点位是否可加载

- Defined in lib/five/work/work.ts:93

### matrix

matrix: Matrix4

点位和模型的旋转对齐关系矩阵

- Defined in lib/five/work/work.ts:111

### panoId

panoId: `${string}[${number}]`

序号

#### Example

    `${workCode}[${panoIndex}]`

- Defined in lib/five/work/work.ts:83

### panoIndex

panoIndex: number

序号

- Defined in lib/five/work/work.ts:77

### position

position: Vector3

点位和模型的观察点坐标

- Defined in lib/five/work/work.ts:107

### quaternion

quaternion: Quaternion

点位和模型的旋转对齐关系四元数

- Defined in lib/five/work/work.ts:109

### standingPosition

standingPosition: Vector3

点位和模型的地面坐标

- Defined in lib/five/work/work.ts:105

### visibleNodes

visibleNodes: readonly number[]

#### Deprecated

可以看到的相关点位序号 数据和 accessibleNodes 一致，使用 accessibleNodes

- Defined in lib/five/work/work.ts:101

### work

work: Work

work

- Defined in lib/five/work/work.ts:73

## Methods

### cubemapUvToVector

- cubemapUvToVector(
  this: WorkObserver,
  cubeFace: CubeFace,
  uv: Vector2,
  uvOrigin?: "top-left" | "bottom-left",
  ): Vector3

  将六视图 uv 转化为方向向量

  #### Parameters

  - this: WorkObserver
  - cubeFace: CubeFace

    六视图的某一面。

  - uv: Vector2

    uv坐标 取值范围 [0,1]。

  - `Optional` uvOrigin: "top-left" | "bottom-left"

    top-left 原点在左上角，x轴向右，y轴向下[默认]。bottom-left 原点左下角，x轴向右，y轴向上。

  #### Returns Vector3

  全局的方向向量。单位向量。

  Inherited from WorkObserverProto.cubemapUvToVector

  - Defined in lib/five/work/workObserverProto.ts:163

### equirectangularUvToVector

- equirectangularUvToVector(
  this: WorkObserver,
  uv: Vector2,
  uvOrigin?: "top-left" | "bottom-left",
  ): Vector3

  将全景图 uv 转化为方向向量。

  #### Parameters

  - this: WorkObserver
  - uv: Vector2

    uv坐标 取值范围 [0,1]。

  - `Optional` uvOrigin: "top-left" | "bottom-left"

    top-left 原点在左上角，x轴向右，y轴向下[默认]。bottom-left 原点左下角，x轴向右，y轴向上。

  #### Returns Vector3

  全局的方向向量。单位向量。

  Inherited from WorkObserverProto.equirectangularUvToVector

  - Defined in lib/five/work/workObserverProto.ts:153

### getWorldPosition

- getWorldPosition(this: WorkObserver): Vector3

  获取点位的全局坐标

  #### Parameters

  - this: WorkObserver

  #### Returns Vector3

  Inherited from WorkObserverProto.getWorldPosition

  - Defined in lib/five/work/workObserverProto.ts:167

### getWorldStandingPosition

- getWorldStandingPosition(this: WorkObserver): Vector3

  获取点位的全局地面坐标

  #### Parameters

  - this: WorkObserver

  #### Returns Vector3

  Inherited from WorkObserverProto.getWorldStandingPosition

  - Defined in lib/five/work/workObserverProto.ts:170

### vectorToCubemapUv

- vectorToCubemapUv(
  this: WorkObserver,
  vector: Vector3,
  uvOrigin?: "top-left" | "bottom-left",
  ): [cubeFace: CubeFace, cubemapUv: Vector2]

  将方向向量转化为获六视图 uv

  #### Parameters

  - this: WorkObserver
  - vector: Vector3

    全局的方向向量。单位向量。

  - `Optional` uvOrigin: "top-left" | "bottom-left"

    top-left 原点在左上角，x轴向右，y轴向下[默认]。bottom-left 原点左下角，x轴向右，y轴向上。

  #### Returns [cubeFace: CubeFace, cubemapUv: Vector2]

  uv 坐标，取值范围 [0,1]

  Inherited from WorkObserverProto.vectorToCubemapUv

  - Defined in lib/five/work/workObserverProto.ts:145

### vectorToEquirectangularUv

- vectorToEquirectangularUv(
  this: WorkObserver,
  vector: Vector3,
  uvOrigin?: "top-left" | "bottom-left",
  ): Vector2

  将方向向量转化为全景图 uv。

  #### Parameters

  - this: WorkObserver
  - vector: Vector3

    全局的方向向量。单位向量。

  - `Optional` uvOrigin: "top-left" | "bottom-left"

    top-left 原点在左上角，x轴向右，y轴向下[默认]。bottom-left 原点左下角，x轴向右，y轴向上。

  #### Returns Vector2

  uv坐标 取值范围 [0,1]。

  Inherited from WorkObserverProto.vectorToEquirectangularUv

  - Defined in lib/five/work/workObserverProto.ts:137