Skip to content

editor › Globals › MeshCache

Class: MeshCache

This is a base class that can cache arbitrary information about a mesh. It is instantiated by the Mesh (@see Mesh.getCache()) and becomes invalid when the Mesh changes.

Hierarchy

  • MeshCache

↳ MeshAnalyzer

↳ SurfaceNormalCache

↳ SurfacePlaneCache

↳ SurfacePointsCache

Index

Constructors

Properties

Methods

Constructors

constructor

+ new MeshCache(mesh: Mesh): MeshCache

Defined in src/model/data/Concepts/Mesh/MeshCache/MeshCache.ts:9

Parameters:

Name Type
mesh Mesh

Returns: MeshCache

Properties

Private destroyed

• destroyed: boolean = false

Defined in src/model/data/Concepts/Mesh/MeshCache/MeshCache.ts:9


Protected Readonly mesh

• mesh: Mesh

Defined in src/model/data/Concepts/Mesh/MeshCache/MeshCache.ts:8

Methods

Private _checkValid

▸ _checkValid(): void

Defined in src/model/data/Concepts/Mesh/MeshCache/MeshCache.ts:28

Throws an exception if this instance is outdated.

Note: Subclasses should call first call this method in order to ensure they do not operate on stale data.

Returns: void


destroy

▸ destroy(): void

Defined in src/model/data/Concepts/Mesh/MeshCache/MeshCache.ts:14

Returns: void


isValid

▸ isValid(): boolean

Defined in src/model/data/Concepts/Mesh/MeshCache/MeshCache.ts:18

Returns: boolean