Skip to content

KBE3D / KBCore / Cesium / GeometryPipeline / createLineSegmentsForVectors

函数: createLineSegmentsForVectors()

createLineSegmentsForVectors(geometry: Geometry, attributeName?: string, length?: number): Geometry

Creates a new Geometry with <code>LINES</code> representing the provided attribute (<code>attributeName</code>) for the provided geometry. This is used to visualize vector attributes like normals, tangents, and bitangents.

参数

geometry

Geometry

The <code>Geometry</code> instance with the attribute.

attributeName?

string

The name of the attribute.

length?

number

The length of each line segment in meters. This can be negative to point the vector in the opposite direction.

返回

Geometry

A new Geometry instance with line segments for the vector.

示例

ts
const geometry = Cesium.GeometryPipeline.createLineSegmentsForVectors(instance.geometry, 'bitangent', 100000.0);

KBE3D @3.0.0 Copyright © 2024-present KBE3D