Last updated

API / geotoolkit3d / util / MeshUtils / MeshUtils

Class: MeshUtils

util.MeshUtils.MeshUtils

Utility class providing utility functions related to meshes (THREE.Mesh)

Table of contents

Constructors
Methods

Contents

Constructors

new MeshUtils()

new MeshUtils()

Methods

getClassName

getClassName(): string

Returns

string


computeMeshOutline

Static computeMeshOutline(mesh): number[]

Compute the pair of points that makes this mesh outline.

Parameters

Name Type Description
meshMesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>the mesh to compute the outline of.

Returns

number[]

the pair of points of each segment in the format: [a.x, a.y, a.z, b.x, b.y, b.z ... ]


generateMeshHighlight

Static generateMeshHighlight(meshes): LineSegments[]

Generate a highlight polyline for the given meshes. Generated highlight polylines are added as each mesh's children, but also returned in a common array to easily enable/disable the highlights. The resulting object array should NOT be added manually in the scene, as it is not updated with the proper transformations.

Parameters

Name Type Description
meshesMesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>[]the mesh array to generate highlights of.

Returns

LineSegments[]

the reference to the highlights as an array of geotoolkit3d.scene.LineSegments


getClassName

Static getClassName(): string

Returns

string