如视 Five SDK
    Preparing search index...

    Interface WorkObserverProto

    interface WorkObserverProto {
        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)

    Index

    Methods

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

      Parameters

      • this: WorkObserver
      • cubeFace: CubeFace

        六视图的某一面。

      • uv: Vector2

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

      • OptionaluvOrigin: "top-left" | "bottom-left"

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

      Returns Vector3

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

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

      Parameters

      • this: WorkObserver
      • uv: Vector2

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

      • OptionaluvOrigin: "top-left" | "bottom-left"

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

      Returns Vector3

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

    • 获取点位的全局坐标

      Parameters

      Returns Vector3

    • 获取点位的全局地面坐标

      Parameters

      Returns Vector3

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

      Parameters

      • this: WorkObserver
      • vector: Vector3

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

      • OptionaluvOrigin: "top-left" | "bottom-left"

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

      Returns [cubeFace: CubeFace, cubemapUv: Vector2]

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

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

      Parameters

      • this: WorkObserver
      • vector: Vector3

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

      • OptionaluvOrigin: "top-left" | "bottom-left"

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

      Returns Vector2

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