editor › Globals › AssemblyRepresentation
Class: AssemblyRepresentation ‹RepresentationWrapper›
Base class for representations of assemblies that are based on representing a compound of multiple ObjectRepresentations.
Type parameters
▪ RepresentationWrapper
Hierarchy
- AssemblyRepresentation
↳ AssemblyPhysicsRepresentation
Index
Constructors
Properties
Methods
- _createObjectRepresentations
- _destroyObjectRepresentation
- _getObjectRepresentationDirty
- _getObjectRepresentationTransformsDirty
- _preUpdateCallback
- _resetObjectRepresentationDirty
- _resetObjectRepresentationTransformsDirty
- _updateObjectRepresentations
- _updateObjectTransformations
- destroy
- getAssembly
- getObjectRepresentation
- getRepresentationFinishedPromise
- reset
- updateAssemblyRepresentation
- updateAssemblyTransformations
Constructors
constructor
+ new AssemblyRepresentation(assembly: Assembly): AssemblyRepresentation
Defined in src/model/AssemblyRepresentation.ts:13
Parameters:
| Name | Type |
|---|---|
assembly |
Assembly |
Returns: AssemblyRepresentation
Properties
Protected assembly
• assembly: Assembly
Defined in src/model/AssemblyRepresentation.ts:9
Protected objectToRepresentationsWrapper
• objectToRepresentationsWrapper: Map‹PhysicalObject, RepresentationWrapper› = new Map< PhysicalObject, RepresentationWrapper
()
Defined in src/model/AssemblyRepresentation.ts:10
Methods
Protected Abstract _createObjectRepresentations
▸ _createObjectRepresentations(physicalObject: PhysicalObject): RepresentationWrapper
Defined in src/model/AssemblyRepresentation.ts:122
Creates the appropriate representations for this object
Parameters:
| Name | Type | Description |
|---|---|---|
physicalObject |
PhysicalObject | The PhysicalObject to create representations for |
Returns: RepresentationWrapper
an object containing the object's representation(s), this is later called 'representationsWrapper' Subclasses can either return a wrapper object or the ObjectRepresentation itself
Protected Abstract _destroyObjectRepresentation
▸ _destroyObjectRepresentation(representationsWrapper: RepresentationWrapper): void
Defined in src/model/AssemblyRepresentation.ts:135
Remove the representations in the representationsWrapper
Parameters:
| Name | Type |
|---|---|
representationsWrapper |
RepresentationWrapper |
Returns: void
Protected Abstract _getObjectRepresentationDirty
▸ _getObjectRepresentationDirty(physicalObject: PhysicalObject): boolean
Defined in src/model/AssemblyRepresentation.ts:140
Parameters:
| Name | Type |
|---|---|
physicalObject |
PhysicalObject |
Returns: boolean
whether the representations for this physicalObject need to be updated
Protected Abstract _getObjectRepresentationTransformsDirty
▸ _getObjectRepresentationTransformsDirty(physicalObject: PhysicalObject): boolean
Defined in src/model/AssemblyRepresentation.ts:155
Parameters:
| Name | Type |
|---|---|
physicalObject |
PhysicalObject |
Returns: boolean
whether the transforms of representations for this physicalObject need to be updated
Protected _preUpdateCallback
▸ _preUpdateCallback(addedObjects: Set‹PhysicalObject›, changedObjects: Set‹PhysicalObject›): Set‹PhysicalObject›
Defined in src/model/AssemblyRepresentation.ts:178
This callback can be used to work on all objects that changed since the last update and optionally change the set of changedObjects.
Parameters:
| Name | Type |
|---|---|
addedObjects |
Set‹PhysicalObject› |
changedObjects |
Set‹PhysicalObject› |
Returns: Set‹PhysicalObject›
Protected Abstract _resetObjectRepresentationDirty
▸ _resetObjectRepresentationDirty(physicalObject: PhysicalObject): any
Defined in src/model/AssemblyRepresentation.ts:145
Resets the dirty flag, so that _getObjectRepresentationDirty(physicalObject) will return false again.
Parameters:
| Name | Type |
|---|---|
physicalObject |
PhysicalObject |
Returns: any
Protected Abstract _resetObjectRepresentationTransformsDirty
▸ _resetObjectRepresentationTransformsDirty(physicalObject: PhysicalObject): any
Defined in src/model/AssemblyRepresentation.ts:150
Resets the dirty flag, so that _getObjectRepresentationTransformsDirty(physicalObject) will return false again.
Parameters:
| Name | Type |
|---|---|
physicalObject |
PhysicalObject |
Returns: any
Protected _updateObjectRepresentations
▸ _updateObjectRepresentations(representationsWrapper: RepresentationWrapper, physicalObject: PhysicalObject): RepresentationWrapper
Defined in src/model/AssemblyRepresentation.ts:161
Updates the representations contained in the representationsWrapper Default behavior is to recreate the representation.
Parameters:
| Name | Type |
|---|---|
representationsWrapper |
RepresentationWrapper |
physicalObject |
PhysicalObject |
Returns: RepresentationWrapper
Protected Abstract _updateObjectTransformations
▸ _updateObjectTransformations(representationsWrapper: RepresentationWrapper, physicalObject: PhysicalObject): any
Defined in src/model/AssemblyRepresentation.ts:127
Updates the representations' transformations contained in the representationsWrapper.
Parameters:
| Name | Type |
|---|---|
representationsWrapper |
RepresentationWrapper |
physicalObject |
PhysicalObject |
Returns: any
destroy
▸ destroy(): void
Defined in src/model/AssemblyRepresentation.ts:112
Returns: void
getAssembly
▸ getAssembly(): Assembly
Defined in src/model/AssemblyRepresentation.ts:99
Returns: Assembly
getObjectRepresentation
▸ getObjectRepresentation(physicalObject: PhysicalObject): RepresentationWrapper
Defined in src/model/AssemblyRepresentation.ts:103
Parameters:
| Name | Type |
|---|---|
physicalObject |
PhysicalObject |
Returns: RepresentationWrapper
getRepresentationFinishedPromise
▸ getRepresentationFinishedPromise(): Promise‹void›
Defined in src/model/AssemblyRepresentation.ts:95
Returns: Promise‹void›
reset
▸ reset(): void
Defined in src/model/AssemblyRepresentation.ts:107
Returns: void
updateAssemblyRepresentation
▸ updateAssemblyRepresentation(): boolean
Defined in src/model/AssemblyRepresentation.ts:27
Returns: boolean
whether anything changed
Abstract updateAssemblyTransformations
▸ updateAssemblyTransformations(): void
Defined in src/model/AssemblyRepresentation.ts:22
Updates the transformations of this assembly's representation
Returns: void