createLineSegmentsForVectors

fun createLineSegmentsForVectors(geometry: Geometry, attributeName: String? = definedExternally, length: Int? = definedExternally): Geometry(source)

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

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

Return

A new Geometry instance with line segments for the vector.

Parameters

geometry

The Geometry instance with the attribute.

attributeName

The name of the attribute. Default value - 'normal'

length

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

See also