Skip to content

editorGlobalsAlignmentSystem

Class: AlignmentSystem

Holds an array of alignments, calls the appropriate solver and checks integrity/sanity of the stored alignments

Hierarchy

  • AlignmentSystem

Index

Constructors

Properties

Methods

Constructors

constructor

+ new AlignmentSystem(alignmentArray: Alignment[]): AlignmentSystem

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:19

Parameters:

Name Type
alignmentArray Alignment[]

Returns: AlignmentSystem

Properties

Private Readonly alignmentArray

alignmentArray: Alignment[]

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:18


Private intendedTarget

intendedTarget: any

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:19

Methods

addAlignment

addAlignment(alignment: Alignment): void

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:39

Parameters:

Name Type
alignment Alignment

Returns: void


getAlignments

getAlignments(): Alignment[]

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:50

Returns: Alignment[]


getIntendedTarget

getIntendedTarget(): any

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:35

Returns: any


removeAlignment

removeAlignment(alignment: Alignment): void

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:43

Parameters:

Name Type
alignment Alignment

Returns: void


resolveAlignments

resolveAlignments(): object

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:61

Checks whether the alignment system is over- oder under-specified Then calls the appropriate constraint solver method to resolve the existing constraints

Returns: object

position that fulfills constraints. Returns null if no position that fulfills the constraints can be found. ToDo: Come up with a proper system for constraint solving, clean up and refactor ToDo: (get all constraints and let the constraint solver figure out how to make something out of the constraints)

  • position: Vector3

  • rotation: Quaternion


setIntendedTarget

setIntendedTarget(object: any): void

Defined in src/model/data/aligning/Alignments/AlignmentSystem.ts:31

Sets the intended target object that is supposed to be aligned with this system.

Parameters:

Name Type Description
object any - The object to be aligned. Optional, will produce warnings if the actually aligned object and intended object mismatch. Checking needs to be done by the users of the alignment system.

Returns: void