Skip to content

editor › Globals › CrossJoint

Class: CrossJoint

Hierarchy

↳ CrossJoint

Index

Constructors

Properties

Methods

Constructors

constructor

+ new CrossJoint(jointPossibilityA?: JointPossibility, jointPossibilityB?: JointPossibility): CrossJoint

Inherited from Joint.constructor

Defined in src/model/data/Joints/Joints/Joint.ts:72

Either supply joint possibilities in constructor, or defer it and do it later with assign()

Parameters:

Name Type
jointPossibilityA? JointPossibility
jointPossibilityB? JointPossibility

Returns: CrossJoint

Properties

Protected Readonly destroyEventEmitter

• destroyEventEmitter: EventEmitter‹void› = new EventEmitter()

Inherited from Joint.destroyEventEmitter

Defined in src/model/data/Joints/Joints/Joint.ts:72


Private end

• end: Vector3

Defined in src/model/data/Joints/Joints/CrossJoint.ts:105


Protected isDestroyed

• isDestroyed: boolean = false

Inherited from Joint.isDestroyed

Defined in src/model/data/Joints/Joints/Joint.ts:71


Protected objectA

• objectA: PhysicalObject

Inherited from Joint.objectA

Defined in src/model/data/Joints/Joints/Joint.ts:69


Protected objectB

• objectB: PhysicalObject

Inherited from Joint.objectB

Defined in src/model/data/Joints/Joints/Joint.ts:70


Private start

• start: Vector3

Defined in src/model/data/Joints/Joints/CrossJoint.ts:104

Methods

_ensureAssigned

▸ _ensureAssigned(): void | never

Inherited from Joint._ensureAssigned

Defined in src/model/data/Joints/Joints/Joint.ts:122

Returns: void | never


Protected _onObjectShapeChange

▸ _onObjectShapeChange(changedObject: PhysicalObject): void

Inherited from Joint._onObjectShapeChange

Defined in src/model/data/Joints/Joints/Joint.ts:219

Method that is called when the shapes of one of the joined objects change. Can be overwritten in subclass.

Parameters:

Name Type
changedObject PhysicalObject

Returns: void


Protected _onObjectTransformsChange

▸ _onObjectTransformsChange(): void

Overrides Joint._onObjectTransformsChange

Defined in src/model/data/Joints/Joints/CrossJoint.ts:139

Returns: void


assign

▸ assign(jointPossibilityA: SurfaceJointPossibility, jointPossibilityB: SurfaceJointPossibility): void

Overrides Joint.assign

Defined in src/model/data/Joints/Joints/CrossJoint.ts:107

Parameters:

Name Type
jointPossibilityA SurfaceJointPossibility
jointPossibilityB SurfaceJointPossibility

Returns: void


createTemporaryClone

▸ createTemporaryClone(): Joint

Inherited from Joint.createTemporaryClone

Defined in src/model/data/Joints/Joints/Joint.ts:183

This method creates a new Joint with the two physicalObjects of this joint instance. This is useful for operations where you need a temporary joint to keep an assembly from falling apart (e.g. Joint.recreate).

Returns: Joint

the temporary joint


destroy

▸ destroy(): void | never

Inherited from Joint.destroy

Defined in src/model/data/Joints/Joints/Joint.ts:158

Removes itself from the attached PhysicalObjects. The instance is invalid afterwards.

Returns: void | never


flipPlateAssignment

▸ flipPlateAssignment(): void | never

Defined in src/model/data/Joints/Joints/CrossJoint.ts:134

Flips which plate is objectA and which one is objectB, as this is interchangeable within a crossJoint and should only change the position of the cross joint slot in each plate

Returns: void | never


getCenter

▸ getCenter(target?: Vector3): Vector3

Defined in src/model/data/Joints/Joints/CrossJoint.ts:126

Parameters:

Name Type
target? Vector3

Returns: Vector3


getDestroyEventEmitter

▸ getDestroyEventEmitter(): IPublicEventEmitterInterface‹void›

Inherited from Joint.getDestroyEventEmitter

Defined in src/model/data/Joints/Joints/Joint.ts:86

Returns: IPublicEventEmitterInterface‹void›


getEnd

▸ getEnd(): Vector3

Defined in src/model/data/Joints/Joints/CrossJoint.ts:122

Returns: Vector3


getIsAssigned

▸ getIsAssigned(): boolean

Inherited from Joint.getIsAssigned

Defined in src/model/data/Joints/Joints/Joint.ts:118

Returns: boolean

true, if the joint has been assigned to two objects


getOtherPhysicalObject

▸ getOtherPhysicalObject(thisPhysicalObject: PhysicalObject): PhysicalObject | never

Inherited from Joint.getOtherPhysicalObject

Defined in src/model/data/Joints/Joints/Joint.ts:131

Convenience function to get the 'other' physical object that is connected to this joint

Parameters:

Name Type
thisPhysicalObject PhysicalObject

Returns: PhysicalObject | never


getPhysicalObjects

▸ getPhysicalObjects(): [PhysicalObject, PhysicalObject]

Inherited from Joint.getPhysicalObjects

Defined in src/model/data/Joints/Joints/Joint.ts:146

Returns: [PhysicalObject, PhysicalObject]


getStart

▸ getStart(): Vector3

Defined in src/model/data/Joints/Joints/CrossJoint.ts:118

Returns: Vector3


isPhysicallyConnected

▸ isPhysicallyConnected(outlineA: Outline, outlineB: Outline): boolean

Overrides Joint.isPhysicallyConnected

Defined in src/model/data/Joints/Joints/CrossJoint.ts:114

Parameters:

Name Type
outlineA Outline
outlineB Outline

Returns: boolean


recreate

▸ recreate(): void

Inherited from Joint.recreate

Defined in src/model/data/Joints/Joints/Joint.ts:194

This method creates a new instance of this joint while destroying the old instance. The new instance is created with the same parameters as this one. This is used in cases where the underlying data changes, but the references are still valid. E.g. an outline section moves between physicalObjects and the joint needs to be recreated with the new objects. However the referenced outline section is still valid.

Returns: void


Static assignFromPhysicalObjects

▸ assignFromPhysicalObjects(objectA: Plate, objectB: Plate, jointInstance: CrossJoint, start?: Vector3, end?: Vector3): void

Defined in src/model/data/Joints/Joints/CrossJoint.ts:64

Parameters:

Name Type
objectA Plate
objectB Plate
jointInstance CrossJoint
start? Vector3
end? Vector3

Returns: void


Static canBeJoined

▸ canBeJoined(objectA: PhysicalObject, objectB: PhysicalObject): boolean

Overrides Joint.canBeJoined

Defined in src/model/data/Joints/Joints/CrossJoint.ts:17

Parameters:

Name Type
objectA PhysicalObject
objectB PhysicalObject

Returns: boolean


Static createFromPhysicalObjects

▸ createFromPhysicalObjects(objectA: Plate, objectB: Plate, JointClass?: undefined, start?: Vector3, end?: Vector3): CrossJoint[]

Overrides Joint.createFromPhysicalObjects

Defined in src/model/data/Joints/Joints/CrossJoint.ts:39

Parameters:

Name Type
objectA Plate
objectB Plate
JointClass? undefined
start? Vector3
end? Vector3

Returns: CrossJoint[]


Static getJointsBetween

▸ getJointsBetween‹T›(plateA: Plate, plateB: Plate, type: Constructor‹T›): T[]

Inherited from Joint.getJointsBetween

Defined in src/model/data/Joints/Joints/Joint.ts:11

Type parameters:

▪ T: Joint

Parameters:

Name Type
plateA Plate
plateB Plate
type Constructor‹T›

Returns: T[]


Static getRequiredPossibilities

▸ getRequiredPossibilities(): [any, any]

Overrides Joint.getRequiredPossibilities

Defined in src/model/data/Joints/Joints/CrossJoint.ts:53

Returns: [any, any]


Static getSpansAcrossAssemblies

▸ getSpansAcrossAssemblies(): boolean

Inherited from Joint.getSpansAcrossAssemblies

Defined in src/model/data/Joints/Joints/Joint.ts:65

Returns: boolean

whether joints of this class span across assemblies. In that case, physical objects will be linked with physics constraints rather than merging assemblies during joining


Static performPreJoinTransformation

▸ performPreJoinTransformation(): void

Overrides Joint.performPreJoinTransformation

Defined in src/model/data/Joints/Joints/CrossJoint.ts:60

Translates the objects in order to make sure they can be joined.

Returns: void