editor › Globals › SingleMeshOperation
Class: SingleMeshOperation
Convenience class that performs an operation on a single mesh, which has to be defined in the constructor
Hierarchy
↳ SingleMeshOperation
Index
Constructors
Properties
Methods
Constructors
constructor
+ new SingleMeshOperation(mesh: Mesh): SingleMeshOperation
Overrides MeshOperation.constructor
Defined in src/model/data/Concepts/Mesh/SingleMeshOperation.ts:9
Parameters:
| Name | Type |
|---|---|
mesh |
Mesh |
Returns: SingleMeshOperation
Properties
Protected mesh
• mesh: Mesh
Defined in src/model/data/Concepts/Mesh/SingleMeshOperation.ts:9
Methods
Protected _getAffectedMeshes
▸ _getAffectedMeshes(): Mesh[]
Overrides MeshOperation._getAffectedMeshes
Defined in src/model/data/Concepts/Mesh/SingleMeshOperation.ts:16
Returns: Mesh[]
Protected _getSingleMesh
▸ _getSingleMesh(meshes: MeshAndImplementation[]): MeshAndImplementation
Defined in src/model/data/Concepts/Mesh/SingleMeshOperation.ts:20
Parameters:
| Name | Type |
|---|---|
meshes |
MeshAndImplementation[] |
Returns: MeshAndImplementation
Protected Abstract _performOperation
▸ _performOperation(meshes: MeshAndImplementation[]): IMeshOperationResult[] | Promise‹IMeshOperationResult[]›
Inherited from MeshOperation._performOperation
Defined in src/model/data/Concepts/Mesh/MeshOperation.ts:102
Perform the actual operation. The operation should most likely work with the meshImplementation directly.
Parameters:
| Name | Type | Description |
|---|---|---|
meshes |
MeshAndImplementation[] | list of meshes and their implementations in the same order as _getAffectedMeshes() specified them |
Returns: IMeshOperationResult[] | Promise‹IMeshOperationResult[]›
Either an array (if operation is synchronous) or a Promise resolving to an array of IMeshOperationResult has to be returned - one IMeshOperationResult per mesh, as provided in the meshes paramter
execute
▸ execute(): Promise‹IMeshOperationResult[]›
Inherited from MeshOperation.execute
Defined in src/model/data/Concepts/Mesh/MeshOperation.ts:47
Performs the operation.
Returns: Promise‹IMeshOperationResult[]›
Promise that will resolve to an array of IMeshOperationResults, each result being related to one of the affected meshes.
getId
▸ getId(): string
Inherited from MeshOperation.getId
Defined in src/model/data/Concepts/Mesh/MeshOperation.ts:30
this is used to identify for which operation a UI progress bar is being shown, collisions are unlikely and have no severe consequences.
Returns: string
a random string-identifier that should be unique across all MeshOperations
hasBeenStarted
▸ hasBeenStarted(): boolean
Inherited from MeshOperation.hasBeenStarted
Defined in src/model/data/Concepts/Mesh/MeshOperation.ts:37
Returns: boolean
true, if this operation has been started execution