Skip to content

editorGlobalsIPositionableElementTransformsDefiner

Interface: IPositionableElementTransformsDefiner

A IPositionableElementTransformsDefiner defines a coordinate system that can be used by IPositionableElement as their local coordinate system. It also offers methods to uncover coordinate system / transforms dependencies between IPositionableElements:

this (local) coordinate system may depend on either - another IModelElement, in this case, the list returned by getTargets() has to contain it (also recursively) - solely on other self-sustainable transform-defining anchors, thus getTransformsTargets() - on nothing if this anchor can define its coordinate system without external dependencies (self-sustainable).

If not explicitly stated otherwise, the coordinate system lies in the assembly's coordinate system, so no more than two layers of indirection (assembly-space and transforms-definer-local-space) should exist in any configuration.

Hierarchy

IPositionableElementTransformsDefiner

IPositioningAnchor

Index

Methods

Methods

getIsValid

getIsValid(): boolean

Inherited from IAnchor.getIsValid

Defined in src/model/data/Concepts/Anchors/IAnchor.ts:68

Whether this instance is valid, a.k.a. has a valid target assigned and points to something useful within that target. IModelElementDependencyDefiner might invalidate if the target changes.

If the IModelElementDependencyDefiner does not need a target, it can be valid even without having one defined.

Validity should be lazily evaluated and not destructive action should be (automatically) taken if the anchor is invalid. Only high level control classes (Realizers, Tools, BoxelCSG) should clean up invalid anchors and model elements. An anchor becoming invalid should not trigger any events.

Returns: boolean


getTargets

getTargets(): IModelElement[]

Inherited from IAnchor.getTargets

Defined in src/model/data/Concepts/Anchors/IAnchor.ts:55

The targets this IModelElementDependencyDefiner points to. This means that the IModelElementDependencyDefiner itself depends on some specifics of the target IModelElements.

Usually, there will be one target. Some implementations, however, may define zero or multiple targets.

Returns: IModelElement[]


getTransforms

getTransforms(): IReadOnlyTransforms

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:85

Use the transforms to read out the current alignment in space.

The "local" part of the transforms should always be understood as a the object-local coordinate system of the IPositionableElement that uses this anchor to position itself, while the "global" part (and getPosition()/getRotation()) should be understood as assembly space coordinates.

Returns: IReadOnlyTransforms


getTransformsTargets

getTransformsTargets(): IPositionableElementTransformsDefiner[]

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:75

Similar to IModelElementDependencyDefiner.getTargets(), the transforms targets are those transformsDefiner that influence this transformsDefiner's transforms.

If the transformsDefiner's target element is an IPositionableElement, it probably also influences the transforms. Thus, in this case, target.getTransformsDefiner() must be contained in the returned list.

Only direct dependencies should be returned, so if you have a chain A -> B -> C and call A.getTransformsTargets() this method only returns [B]. For a complete list of all transitive dependencies @see ModelElementGraphAnalyzer.getAllModelElementThisDependsOn.

If the transformsDefiner does not define any transforms targets and has no IModelElement as a target, it is considered self-sustainable, i.e. being able of defining a coordinate system on its own without external input.

Returns: IPositionableElementTransformsDefiner[]