Skip to content

KBE3D / KBCore / Cesium / createTangentSpaceDebugPrimitive

函数: createTangentSpaceDebugPrimitive()

createTangentSpaceDebugPrimitive(options: { geometry: Geometry; length?: number; modelMatrix?: Matrix4; }): Primitive

Creates a Primitive to visualize well-known vector vertex attributes: <code>normal</code>, <code>tangent</code>, and <code>bitangent</code>. Normal is red; tangent is green; and bitangent is blue. If an attribute is not present, it is not drawn.

参数

options

Object with the following properties:

geometry

Geometry

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

length?

number

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

modelMatrix?

Matrix4

The model matrix that transforms to transform the geometry from model to world coordinates.

返回

Primitive

A new Primitive instance with geometry for the vectors.

示例

ts
scene.primitives.add(Cesium.createTangentSpaceDebugPrimitive({
   geometry : instance.geometry,
   length : 100000.0,
   modelMatrix : instance.modelMatrix
}));

KBE3D @3.0.0 Copyright © 2024-present KBE3D