Skip to content

KBE3D / KBCore / Cesium / GeometryPipeline / projectTo2D

函数: projectTo2D()

projectTo2D(geometry: Geometry, attributeName: string, attributeName3D: string, attributeName2D: string, projection?: any): Geometry

Projects a geometry's 3D <code>position</code> attribute to 2D, replacing the <code>position</code> attribute with separate <code>position3D</code> and <code>position2D</code> attributes. <p> If the geometry does not have a <code>position</code>, this function has no effect. </p>

参数

geometry

Geometry

The geometry to modify.

attributeName

string

The name of the attribute.

attributeName3D

string

The name of the attribute in 3D.

attributeName2D

string

The name of the attribute in 2D.

projection?

any

The projection to use.

返回

Geometry

The modified geometry argument with position3D and position2D attributes.

示例

ts
geometry = Cesium.GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D');

KBE3D @3.0.0 Copyright © 2024-present KBE3D