editor › Globals › BooleanMeshOperation
Class: BooleanMeshOperation
Hierarchy
↳ BooleanMeshOperation
Index
Constructors
Properties
Methods
- _ensureValidStartingState
- _generateResults
- _getAffectedMeshes
- _getMeshOffStrings
- _meshFromOff
- _meshPointFromAssemblySpace
- _performOperation
- canBeConsolidatedWith
- consolidateWith
- execute
- getBase
- getCandidates
- getId
- getOperationType
- hasBeenStarted
- setBase
- setCandidates
Constructors
constructor
+ new BooleanMeshOperation(base: Mesh, candidates: Mesh[], operationType: CSGOperationType): BooleanMeshOperation
Inherited from CSGMeshOperation.constructor
Overrides MeshOperation.constructor
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:27
Parameters:
| Name | Type |
|---|---|
base |
Mesh |
candidates |
Mesh[] |
operationType |
CSGOperationType |
Returns: BooleanMeshOperation
Properties
Protected base
• base: Mesh = null
Inherited from CSGMeshOperation.base
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:25
Protected candidates
• candidates: Mesh[] = null
Inherited from CSGMeshOperation.candidates
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:26
Protected operationType
• operationType: CSGOperationType
Inherited from CSGMeshOperation.operationType
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:27
Methods
Protected _ensureValidStartingState
▸ _ensureValidStartingState(): void
Inherited from CSGMeshOperation._ensureValidStartingState
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:183
Make sure the meshes are in a valid state to start operations
Returns: void
Protected _generateResults
▸ _generateResults(meshes: MeshAndImplementation[], resultImplementations: IMeshImplementation[], candidatesAreGone: boolean, firstImplementationOnNegativeSide?: boolean): IMeshOperationResult[]
Inherited from CSGMeshOperation._generateResults
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:95
Parameters:
| Name | Type | Default |
|---|---|---|
meshes |
MeshAndImplementation[] | - |
resultImplementations |
IMeshImplementation[] | - |
candidatesAreGone |
boolean | false |
firstImplementationOnNegativeSide? |
boolean | - |
Returns: IMeshOperationResult[]
Protected _getAffectedMeshes
▸ _getAffectedMeshes(): Mesh[]
Inherited from CSGMeshOperation._getAffectedMeshes
Overrides MeshOperation._getAffectedMeshes
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:81
Returns: Mesh[]
Protected _getMeshOffStrings
▸ _getMeshOffStrings(meshes: Mesh[]): string[]
Inherited from CSGMeshOperation._getMeshOffStrings
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:85
Parameters:
| Name | Type |
|---|---|
meshes |
Mesh[] |
Returns: string[]
Protected _meshFromOff
▸ _meshFromOff(offString: string, meshToMapCoordinatesTo: IPositionableElement): IMeshImplementation[]
Inherited from CSGMeshOperation._meshFromOff
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:166
Parameters:
| Name | Type |
|---|---|
offString |
string |
meshToMapCoordinatesTo |
IPositionableElement |
Returns: IMeshImplementation[]
Protected _meshPointFromAssemblySpace
▸ _meshPointFromAssemblySpace(mesh: IPositionableElement, point: Vector3): Vector3
Inherited from CSGMeshOperation._meshPointFromAssemblySpace
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:162
Parameters:
| Name | Type |
|---|---|
mesh |
IPositionableElement |
point |
Vector3 |
Returns: Vector3
Protected _performOperation
▸ _performOperation(meshes: MeshAndImplementation[]): Promise‹IMeshOperationResult[]›
Overrides CSGMeshOperation._performOperation
Defined in src/model/data/Concepts/Mesh/BooleanMeshOperation.ts:37
Parameters:
| Name | Type |
|---|---|
meshes |
MeshAndImplementation[] |
Returns: Promise‹IMeshOperationResult[]›
canBeConsolidatedWith
▸ canBeConsolidatedWith(otherOperation: CSGMeshOperation): boolean
Overrides CSGMeshOperation.canBeConsolidatedWith
Defined in src/model/data/Concepts/Mesh/BooleanMeshOperation.ts:19
Some operations can be consolidated in order to bring up performance. This method determines whether this and the other operation can be consolidated.
Consolidation can be done if the base mesh and operation type are the same.
Parameters:
| Name | Type | Description |
|---|---|---|
otherOperation |
CSGMeshOperation | the other operation to check |
Returns: boolean
consolidateWith
▸ consolidateWith(otherOperation: CSGMeshOperation): void
Overrides CSGMeshOperation.consolidateWith
Defined in src/model/data/Concepts/Mesh/BooleanMeshOperation.ts:31
Consolidates this operation with another one, making the other operation instance obsolete.
Parameters:
| Name | Type | Description |
|---|---|---|
otherOperation |
CSGMeshOperation | - |
Returns: void
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.
getBase
▸ getBase(): Mesh
Inherited from CSGMeshOperation.getBase
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:55
Returns: Mesh
getCandidates
▸ getCandidates(): Mesh[]
Inherited from CSGMeshOperation.getCandidates
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:64
Returns: Mesh[]
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
getOperationType
▸ getOperationType(): CSGOperationType
Inherited from CSGMeshOperation.getOperationType
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:75
Returns: CSGOperationType
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
setBase
▸ setBase(base: Mesh): void
Inherited from CSGMeshOperation.setBase
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:59
Parameters:
| Name | Type |
|---|---|
base |
Mesh |
Returns: void
setCandidates
▸ setCandidates(candidates: Mesh[]): void
Inherited from CSGMeshOperation.setCandidates
Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:68
Parameters:
| Name | Type |
|---|---|
candidates |
Mesh[] |
Returns: void