Skip to content

editorGlobalsExternalObject

Class: ExternalObject

An external object is something that is not built with our software, but exists in the scene anyways - e.g. a servo

Hierarchy

PhysicalObject

ExternalObject

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new ExternalObject(options: object): ExternalObject

Overrides PhysicalObject.constructor

Defined in src/model/data/PhysicalObject/ExternalObject.ts:54

Parameters:

Default value options: object= {}

the name of the asset and contained resource that represent the external object. see AssetLoader.loadResource for naming conventions.

Name Type
assetIdAndResourceName? string

Returns: ExternalObject

Properties

Private assetIdAndResourceName

assetIdAndResourceName: string | null = null

Defined in src/model/data/PhysicalObject/ExternalObject.ts:39


Private cachedCollisionShapePoints

cachedCollisionShapePoints: Vector3[] | null = null

Defined in src/model/data/PhysicalObject/ExternalObject.ts:36


Private cachedLocalAABB

cachedLocalAABB: AABB | null = null

Defined in src/model/data/PhysicalObject/ExternalObject.ts:35


Private collisionModel

collisionModel: any = null

Defined in src/model/data/PhysicalObject/ExternalObject.ts:50


Private collisionShapes

collisionShapes: any

Defined in src/model/data/PhysicalObject/ExternalObject.ts:54


Private jointPossibilityData

jointPossibilityData: JointPossibility[] = []

Defined in src/model/data/PhysicalObject/ExternalObject.ts:43


Private Readonly mapJointPossibilityIdsToJoint

mapJointPossibilityIdsToJoint: Record‹string, JointPossibility

Defined in src/model/data/PhysicalObject/ExternalObject.ts:46


Private material

material: any = Config.get("plates.defaultMaterialType", "poplar")

Defined in src/model/data/PhysicalObject/ExternalObject.ts:51


Private renderedModel

renderedModel: any = null

Defined in src/model/data/PhysicalObject/ExternalObject.ts:49


Private resourceLoadingPromise

resourceLoadingPromise: PromiseIResourceData› | null = null

Defined in src/model/data/PhysicalObject/ExternalObject.ts:40


Private Readonly scale

scale: Vector3‹› = new Vector3(1, 1, 1)

Defined in src/model/data/PhysicalObject/ExternalObject.ts:52

Methods

Private _getAllowedEvents

_getAllowedEvents(): string[]

Inherited from PhysicalObject._getAllowedEvents

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:663

Possible events are - 'jointAdd' (physicalObject, joint, ownJointPossibility) - 'jointRemove' (physicalObject, joint) - 'transformsChange' (physicalObject)

Returns: string[]


Private _initializeWithResourceData

_initializeWithResourceData(assetData: IResourceData): void

Defined in src/model/data/PhysicalObject/ExternalObject.ts:361

Parse config and add shape points etc

Parameters:

Name Type
assetData IResourceData

Returns: void


Private _onJointAdd

_onJointAdd(physicalObject: PhysicalObject, addedJoint: Joint, ownJointPossibility: JointPossibility): void

Defined in src/model/data/PhysicalObject/ExternalObject.ts:304

Parameters:

Name Type
physicalObject PhysicalObject
addedJoint Joint
ownJointPossibility JointPossibility

Returns: void


Private _onJointRemove

_onJointRemove(physicalObject: PhysicalObject, removedJoint: Joint): void

Defined in src/model/data/PhysicalObject/ExternalObject.ts:319

Parameters:

Name Type
physicalObject PhysicalObject
removedJoint Joint

Returns: void


Private _preparePointJointPossibility

_preparePointJointPossibility(interactionPoint: any, jointPossibilityData: any, PossibilityClass: any): object

Defined in src/model/data/PhysicalObject/ExternalObject.ts:396

Parameters:

Name Type
interactionPoint any
jointPossibilityData any
PossibilityClass any

Returns: object

  • distance: any

  • jointPossibility: any


Private _resetCache

_resetCache(): void

Defined in src/model/data/PhysicalObject/ExternalObject.ts:434

Returns: void


Private _unwrapResources

_unwrapResources(resource: Resource): IResourceData | null

Defined in src/model/data/PhysicalObject/ExternalObject.ts:336

Remap file names to generic names

Parameters:

Name Type
resource Resource

Returns: IResourceData | null


addJoint

addJoint(joint: Joint, ownJointPossibility: JointPossibility): void

Inherited from PhysicalObject.addJoint

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:289

Add a joint to the physical object. Only to be called from Joint constructor.

Parameters:

Name Type
joint Joint
ownJointPossibility JointPossibility

Returns: void


calculateCollisionShapePoints

calculateCollisionShapePoints(): Vector3[]

Defined in src/model/data/PhysicalObject/ExternalObject.ts:244

Extract the points contained inside the ExternalObject's collision shapes Used to determine object local points instead of using the whole visualized 3D model

Returns: Vector3[]

collision shape points in object-local coordinates


clearAssembly

clearAssembly(): void

Inherited from PhysicalObject.clearAssembly

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:491

Clears the assembly. Only to be called by the composite model upon removal

Returns: void


clearCompositeModel

clearCompositeModel(): void

Inherited from PhysicalObject.clearCompositeModel

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:325

Returns: void


clone

clone(): ExternalObject

Defined in src/model/data/PhysicalObject/ExternalObject.ts:189

Clones this external object with its assetName, position and rotation Does NOT clone joints, compositeModel etc

Returns: ExternalObject


getAllConnectedPhysicalObjects

getAllConnectedPhysicalObjects(onlySameAssembly: boolean): PhysicalObject[]

Inherited from PhysicalObject.getAllConnectedPhysicalObjects

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:280

Finds and returns all connected physical objects

Parameters:

Name Type Default Description
onlySameAssembly boolean true If set to true, joints that span over multiple assemblies (and the associated physical object) will be ignored

Returns: PhysicalObject[]

All connected physical objects


getAssembly

getAssembly(): Assembly

Inherited from PhysicalObject.getAssembly

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:495

Returns: Assembly


getAssemblyAABB

getAssemblyAABB(): AABB

Inherited from PhysicalObject.getAssemblyAABB

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:593

Returns: AABB


getAssemblyLocalPoints

getAssemblyLocalPoints(exact: boolean): Vector3[]

Inherited from PhysicalObject.getAssemblyLocalPoints

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:589

Get points in assembly space roughly representing the shape of this object. This may not be an accurate rendering of all the points.

Parameters:

Name Type Default
exact boolean true

Returns: Vector3[]

The points in assembly space


getAssetIdAndResourceName

getAssetIdAndResourceName(): string

Defined in src/model/data/PhysicalObject/ExternalObject.ts:94

Returns: string


getBoxPreset

getBoxPreset(): Promise‹object›

Defined in src/model/data/PhysicalObject/ExternalObject.ts:287

Returns: Promise‹object›


getCompositeModel

getCompositeModel(): CompositeModel

Inherited from PhysicalObject.getCompositeModel

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:321

Returns: CompositeModel

The composite model this object belongs to


getHint

getHint(key: string, defaultValue: any): any

Inherited from PhysicalObject.getHint

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:535

Retrieve a hint for this object

Parameters:

Name Type Default Description
key string - The name of the hint
defaultValue any null Default value if hint is not defined Used hints: - (plate) passThroughPlate if true, the plate will not be attempted to be merged or joined with other plates upon export - (plate) importedJoints (An array of finger joints for use by the AssembleTool. Only set temporarily during the SVG import.) - (plate) physicsEngineThickness [Float] (Temporary thickness of the physical representation of the plate during push pull (collisionhandling).) - (externalObject) physicsEngineBodyType (One of: Body.DYNAMIC, Body.STATIC and Body.KINEMATIC see http://schteppe.github.io/cannon.js/docs/classes/Body.html) - (externalObject) ignoreWindSimulation [Boolean] (if true this object will be ignored in the wind simulation) - (externalObject) shading ('smooth' or 'flat' which equals with THREE.FlatShading or THREE.SmoothShading see https://threejs.org/docs/#Reference/Materials/MeshPhongMaterial.shading) - (externalObject) backgroundPartSpec the specs of the background part. Used for resetting background parts. - (any) lowQuality A hint for the renderer to render this physical object in lower quality. How this is achieved depends on the implementation of the renderer. - (externalObject) isSizeReferenceObject is used by the SizeReferenceTool. It flags Objects created by it to remove them, when a new SizeReferenceObject is created. - (physicalObject) notInteractable [Boolean] if true, tools cannot interact with this object

Returns: any


getIntersectingPlates

getIntersectingPlates(): Plate[]

Defined in src/model/data/PhysicalObject/ExternalObject.ts:295

Get all the plates that this external overlaps with, as long as they are part of the same assembly.

Returns: Plate[]


getJointPossibilities

getJointPossibilities(interactionPoint: Vector3): Array‹object›

Overrides PhysicalObject.getJointPossibilities

Defined in src/model/data/PhysicalObject/ExternalObject.ts:160

Parameters:

Name Type
interactionPoint Vector3

Returns: Array‹object›


getJoints

getJoints(): Joint[]

Inherited from PhysicalObject.getJoints

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:270

Returns: Joint[]

Array of all joints to other objects


getLocalAABB

getLocalAABB(): AABB

Overrides PhysicalObject.getLocalAABB

Defined in src/model/data/PhysicalObject/ExternalObject.ts:231

Returns: AABB


getLowQualityRendering

getLowQualityRendering(): boolean

Inherited from PhysicalObject.getLowQualityRendering

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:570

Returns: boolean


getNormal

getNormal(space: "assembly" | "world", target: Vector3‹›): Vector3

Inherited from PhysicalObject.getNormal

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:452

Parameters:

Name Type Default Description
space "assembly" | "world" "assembly" Defines the result coordinate system
target Vector3‹› new Vector3() (optional) Vector that will receive the calculation result

Returns: Vector3

The vector (0, 0, 1) transformed to assembly or world space


getObjectLocalPoints

getObjectLocalPoints(): Vector3[]

Overrides PhysicalObject.getObjectLocalPoints

Defined in src/model/data/PhysicalObject/ExternalObject.ts:196

Returns: Vector3[]


getParent

getParent(): ITransformable

Implementation of ITransformable

Inherited from PhysicalObject.getParent

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:90

Returns: ITransformable


getPhysEngineBody

getPhysEngineBody(): any

Inherited from PhysicalObject.getPhysEngineBody

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:179

Returns: any

The physics simulation body associated with this physical object


getPhysicsMaterial

getPhysicsMaterial(): CANNONMaterial

Defined in src/model/data/PhysicalObject/ExternalObject.ts:143

Returns the material of the external object sync (may be null).

Returns: CANNONMaterial


getPhysicsMaterialAsync

getPhysicsMaterialAsync(): PromiseCANNONMaterial

Defined in src/model/data/PhysicalObject/ExternalObject.ts:136

Returns: PromiseCANNONMaterial


getPhysicsShapeDirty

getPhysicsShapeDirty(): boolean

Inherited from PhysicalObject.getPhysicsShapeDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:250

Returns: boolean

Whether this object's shape should be considered dirty regarding its physics representation


getPhysicsTransformsDirty

getPhysicsTransformsDirty(): boolean

Inherited from PhysicalObject.getPhysicsTransformsDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:257

Returns: boolean

Whether this object's transforms should be considered dirty regarding its physics representation


getPosition

getPosition(target: Vector3‹›): Vector3‹›

Inherited from PhysicalObject.getPosition

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:137

Parameters:

Name Type Default
target Vector3‹› new Vector3()

Returns: Vector3‹›

Position of the object, in assembly space. If the object does not have an assembly assigned the position is in world space.


getRealizer

getRealizer(): IModelElementRealizerIModelElement› | IModelElementRealizerMesh

Inherited from PhysicalObject.getRealizer

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:82

Returns: IModelElementRealizerIModelElement› | IModelElementRealizerMesh


getResources

getResources(): PromiseIResourceData

Defined in src/model/data/PhysicalObject/ExternalObject.ts:77

Returns a promise that will resolve to the resources associated with this external object When this promise resolves, the object is fully loaded and ready to be used

Returns: PromiseIResourceData


getResourcesSync

getResourcesSync(): IResourceData

Defined in src/model/data/PhysicalObject/ExternalObject.ts:88

Returns: IResourceData


getRotation

getRotation(target: Quaternion): Quaternion

Inherited from PhysicalObject.getRotation

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:158

Parameters:

Name Type Default
target Quaternion new Quaternion()

Returns: Quaternion

Rotation of the object, in assembly-local space


getScale

getScale(): Vector3

Defined in src/model/data/PhysicalObject/ExternalObject.ts:147

Returns: Vector3


getTransforms

getTransforms(): IReadOnlyTransforms

Implementation of ITransformable

Inherited from PhysicalObject.getTransforms

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:86

Returns: IReadOnlyTransforms


getUid

getUid(): string

Inherited from PhysicalObject.getUid

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:74

Returns: string


getVisualizationShapeDirty

getVisualizationShapeDirty(): boolean

Inherited from PhysicalObject.getVisualizationShapeDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:236

Returns: boolean

Whether this object's shape should be considered dirty regarding its visualization


getVisualizationTransformsDirty

getVisualizationTransformsDirty(): boolean

Inherited from PhysicalObject.getVisualizationTransformsDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:243

Returns: boolean

Whether this object's transforms should be considered dirty regarding its visualization


getWorldAABB

getWorldAABB(): AABB

Inherited from PhysicalObject.getWorldAABB

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:630

This may not take into account all points, but only yields a rough representation.

Returns: AABB

This object's AABB in world space


getWorldPoints

getWorldPoints(exact: boolean): Vector3[]

Inherited from PhysicalObject.getWorldPoints

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:607

Get points in world space roughly representing the shape of this object. This may not be an accurate rendering of all the points. Note: This is currently used by: - WaterSimulationAddOn to determine the submerged volume - PositionHintFilterStrategy to determine overlap of hints with objects in the scene - CameraMotion to detect view frustum fitting

Parameters:

Name Type Default
exact boolean true

Returns: Vector3[]

The points in world space


getWorldPosition

getWorldPosition(): Vector3

Inherited from PhysicalObject.getWorldPosition

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:502

Maps the value of #getPosition through the assembly back to world, if an assembly is present.

Returns: Vector3


isConnectedToPhysicalObject

isConnectedToPhysicalObject(physicalObject: PhysicalObject): boolean

Inherited from PhysicalObject.isConnectedToPhysicalObject

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:461

Parameters:

Name Type
physicalObject PhysicalObject

Returns: boolean


isVisible

isVisible(): boolean

Inherited from PhysicalObject.isVisible

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:639

Returns: boolean


isolate

isolate(onlyDestroyJointsTo: any[], keepJointsTo: any[]): void

Inherited from PhysicalObject.isolate

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:105

Isolates the object within its assembly. Destroys all joints, further logic has to be implemented in subclasses

Parameters:

Name Type Default Description
onlyDestroyJointsTo any[] [] (optional) [Array] If set, only joints that connect this physical object to objects of the specified classes are getting destroyed
keepJointsTo any[] [] (optional) [Array] If set, joints that connect this physical object to objects of the specified classes are not deleted

Returns: void


mapAssemblyAxisToLocal

mapAssemblyAxisToLocal(assemblyAxis: ReadonlyVector3, target?: Vector3): Vector3

Inherited from PhysicalObject.mapAssemblyAxisToLocal

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:422

Deprecated: Use getTransforms().mapGlobalDirectionToLocal instead

deprecated

Parameters:

Name Type
assemblyAxis ReadonlyVector3
target? Vector3

Returns: Vector3


mapAssemblyToLocal

mapAssemblyToLocal(assemblyPointOrQuaternion: Quaternion, targetPointOrQuaternion?: Quaternion): Quaternion

Inherited from PhysicalObject.mapAssemblyToLocal

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:344

Deprecated: Use getTransforms().mapGlobalPositionToLocal or getTransforms().mapGlobalRotationToLocal instead

Maps a point/quaternion from the assembly coordinate system into the object local coordinate system (undo rotation and translation)

deprecated

Parameters:

Name Type
assemblyPointOrQuaternion Quaternion
targetPointOrQuaternion? Quaternion

Returns: Quaternion

mapAssemblyToLocal(assemblyPointOrQuaternion: Vector3, targetPointOrQuaternion?: Vector3): Vector3

Inherited from PhysicalObject.mapAssemblyToLocal

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:346

deprecated

Parameters:

Name Type
assemblyPointOrQuaternion Vector3
targetPointOrQuaternion? Vector3

Returns: Vector3


mapLocalAxisToAssembly

mapLocalAxisToAssembly(localAxis: Vector3, target?: Vector3): Vector3

Inherited from PhysicalObject.mapLocalAxisToAssembly

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:430

Deprecated: Use getTransforms().mapLocalDirectionToGlobal instead

deprecated

Parameters:

Name Type
localAxis Vector3
target? Vector3

Returns: Vector3


mapLocalAxisToWorld

mapLocalAxisToWorld(localAxis: Vector3, target?: Vector3): Vector3

Inherited from PhysicalObject.mapLocalAxisToWorld

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:434

Parameters:

Name Type
localAxis Vector3
target? Vector3

Returns: Vector3


mapLocalToAssembly

mapLocalToAssembly(localPointOrQuaternion: Quaternion, targetPointOrQuaternion?: Quaternion): Quaternion

Inherited from PhysicalObject.mapLocalToAssembly

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:366

Deprecated: Use getTransforms().mapLocalPositionToGlobal or getTransforms().mapLocalRotationToGlobal instead

Maps a point/quaternion from the local coordinate system into the assembly system (applies rotation and translation)

deprecated

Parameters:

Name Type Description
localPointOrQuaternion Quaternion -
targetPointOrQuaternion? Quaternion -

Returns: Quaternion

mapLocalToAssembly(localPointOrQuaternion: Vector3, targetPointOrQuaternion?: Vector3): Vector3

Inherited from PhysicalObject.mapLocalToAssembly

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:368

deprecated

Parameters:

Name Type
localPointOrQuaternion Vector3
targetPointOrQuaternion? Vector3

Returns: Vector3


mapLocalToWorld

mapLocalToWorld(localPointOrQuaternion: Quaternion, targetPointOrQuaternion?: Quaternion): Quaternion

Inherited from PhysicalObject.mapLocalToWorld

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:397

Maps a point/quaternion from the object local coordinate system into the world system (using the assembly if set)

Parameters:

Name Type
localPointOrQuaternion Quaternion
targetPointOrQuaternion? Quaternion

Returns: Quaternion

mapLocalToWorld(localPointOrQuaternion: Vector3, targetPointOrQuaternion?: Vector3): Vector3

Inherited from PhysicalObject.mapLocalToWorld

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:398

Parameters:

Name Type
localPointOrQuaternion Vector3
targetPointOrQuaternion? Vector3

Returns: Vector3


mapWorldAxisToLocal

mapWorldAxisToLocal(worldAxis: ReadonlyVector3, target?: Vector3): Vector3

Inherited from PhysicalObject.mapWorldAxisToLocal

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:412

Parameters:

Name Type
worldAxis ReadonlyVector3
target? Vector3

Returns: Vector3


mapWorldToLocal

mapWorldToLocal(worldPointOrQuaternion: ReadonlyQuaternion, targetPointOrQuaternion?: Quaternion): Quaternion

Inherited from PhysicalObject.mapWorldToLocal

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:381

Maps a point/quaternion from the world coordinate system into the object local system (using the assembly if set)

Parameters:

Name Type
worldPointOrQuaternion ReadonlyQuaternion
targetPointOrQuaternion? Quaternion

Returns: Quaternion

mapWorldToLocal(worldPointOrQuaternion: ReadonlyVector3, targetPointOrQuaternion?: Vector3): Vector3

Inherited from PhysicalObject.mapWorldToLocal

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:382

Parameters:

Name Type
worldPointOrQuaternion ReadonlyVector3
targetPointOrQuaternion? Vector3

Returns: Vector3


markPhysicsTransformsDirty

markPhysicsTransformsDirty(): void

Inherited from PhysicalObject.markPhysicsTransformsDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:189

Returns: void


markShapeHasChanged

markShapeHasChanged(): void

Inherited from PhysicalObject.markShapeHasChanged

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:261

Returns: void


markTransformsHaveChanged

markTransformsHaveChanged(): void

Inherited from PhysicalObject.markTransformsHaveChanged

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:183

Returns: void


prepareForTransforms

prepareForTransforms(): any

Inherited from PhysicalObject.prepareForTransforms

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:644

Returns: any


removeJoint

removeJoint(joint: Joint): void

Inherited from PhysicalObject.removeJoint

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:302

Removes a joint from the physical object. Only to be called from Joint.destroy()

Parameters:

Name Type
joint Joint

Returns: void


resetPhysicsShapeDirty

resetPhysicsShapeDirty(): boolean

Inherited from PhysicalObject.resetPhysicsShapeDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:227

Resets the physicsTransformsDirty flag.

Returns: boolean

The state of the flag before reset


resetPhysicsTransformsDirty

resetPhysicsTransformsDirty(): boolean

Inherited from PhysicalObject.resetPhysicsTransformsDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:217

Resets the physicsShapeDirty flag.

Returns: boolean

The state of the flag before reset


resetVisualizationShapeDirty

resetVisualizationShapeDirty(): boolean

Inherited from PhysicalObject.resetVisualizationShapeDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:207

Resets the visualizationTransformsDirty flag.

Returns: boolean

The state of the flag before reset


resetVisualizationTransformsDirty

resetVisualizationTransformsDirty(): boolean

Inherited from PhysicalObject.resetVisualizationTransformsDirty

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:197

Resets the visualizationShapeDirty flag.

Returns: boolean

The state of the flag before reset


rotate

rotate(rotation: Quaternion): void

Inherited from PhysicalObject.rotate

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:172

Rotates this object around the local origin.

Parameters:

Name Type
rotation Quaternion

Returns: void


setAssembly

setAssembly(newAssembly: Assembly, dueToMerge: boolean): void

Inherited from PhysicalObject.setAssembly

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:475

Sets the assembly the object belongs to

Parameters:

Name Type Default Description
newAssembly Assembly - _ the new assembly the object belongs to
dueToMerge boolean false Indicates if this object is being re-assigned due to merging two assemblies

Returns: void


setAssetIdAndResourceName

setAssetIdAndResourceName(assetIdAndResourceName: string): void

Defined in src/model/data/PhysicalObject/ExternalObject.ts:101

Reload resources and trigger update of visualization

Parameters:

Name Type
assetIdAndResourceName string

Returns: void


setCompositeModel

setCompositeModel(compositeModel: CompositeModel): void

Inherited from PhysicalObject.setCompositeModel

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:332

Parameters:

Name Type Description
compositeModel CompositeModel The composite model this object belongs to

Returns: void


setHint

setHint(key: string, value: any): void

Inherited from PhysicalObject.setHint

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:547

Sets a hint for this object

Parameters:

Name Type Description
key string The name of the hint
value any The value for this hint

Returns: void


setLowQualityRendering

setLowQualityRendering(newValue: boolean): void

Inherited from PhysicalObject.setLowQualityRendering

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:556

Sets a hint for low res rendering. If this value differs from the previous value, markShapeHasChanged will be called automatically for you.

Parameters:

Name Type Description
newValue boolean The value to set for the lowQuality hint

Returns: void


setPosition

setPosition(position: Vector3): void

Inherited from PhysicalObject.setPosition

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:144

Parameters:

Name Type Description
position Vector3 New assembly-local position of the object

Returns: void


setRealizer

setRealizer(realizer: IModelElementRealizerIModelElement›): void

Inherited from PhysicalObject.setRealizer

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:78

Parameters:

Name Type
realizer IModelElementRealizerIModelElement

Returns: void


setRotation

setRotation(rotation: Quaternion): void

Inherited from PhysicalObject.setRotation

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:165

Parameters:

Name Type Description
rotation Quaternion New rotation quaternion in assembly-local space

Returns: void


setScale

setScale(scale: ReadonlyVector3): void

Defined in src/model/data/PhysicalObject/ExternalObject.ts:151

Parameters:

Name Type
scale ReadonlyVector3

Returns: void


setVisible

setVisible(visibility: boolean): void

Inherited from PhysicalObject.setVisible

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:635

Parameters:

Name Type
visibility boolean

Returns: void


toString

toString(): string

Overrides PhysicalObject.toString

Defined in src/model/data/PhysicalObject/ExternalObject.ts:300

Returns: string


translate

translate(translation: Vector3): void

Inherited from PhysicalObject.translate

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:151

Parameters:

Name Type Description
translation Vector3 Translates the object's position by translation

Returns: void


unprepareFromTransforms

unprepareFromTransforms(params: any): any

Inherited from PhysicalObject.unprepareFromTransforms

Defined in src/model/data/PhysicalObject/PhysicalObject.ts:648

Parameters:

Name Type
params any

Returns: any