editor › Globals › PointOnEdgeAnchor
Class: PointOnEdgeAnchor
A mesh edge anchor always points to the (conceptually) same edge in a mesh. It gives a position and rotation that will be aligned relatively to the MeshEdge.
Hierarchy
↳ PointOnEdgeAnchor
Implements
Index
Properties
- additionalElementContext
- changeEventEmitter
- edgeToLocalTransforms
- element
- isDestroyed
- lastMeshAdaptionWasSuccessful
- mesh
- transformsChangeEventEmitter
Methods
- _adaptToChangedMesh
- _applyChangedScale
- _changeSelfToChosenCandidate
- _checkIfAnchorCanBeValid
- _createEvent
- _createSplitOffInstance
- _extractAdditionalElementContextFromCurrentElement
- _extractSignatureFromCurrentElement
- _findByMirror
- _findBySameIdentity
- _findBySameSignature
- _findBySameUID
- _findBySimilarSignature
- _getAssemblyToEdgeTransforms
- _getAssemblyToMeshTransforms
- _getEdgeAxisRotation
- _getInstance
- _isElementValid
- _onMeshChange
- _performInitialLookup
- _reFindElementOnMesh
- _refindSelfAndEmit
- _setElement
- _setMesh
- _setMeshAndElement
- clone
- destroy
- getChangeEventEmitter
- getEdge
- getEdgeToLocalPosition
- getEdgeToLocalRotation
- getEdgeToLocalTransforms
- getInMeshTarget
- getIsValid
- getLocalAngle
- getMesh
- getMeshToEdgeTransforms
- getSignature
- getSurface
- getTargets
- getTransforms
- getTransformsChangeEventEmitter
- getTransformsTargets
- initializeFromElement
- initializeFromElementWithLocalCoordinates
- initializeFromSignature
- reFindElementOnMesh
- rotateAround
- setEdgeToLocalPosition
- setEdgeToLocalRotation
- setFromEdgePoints
- setLocalAngle
- setLocalPosition
- setLocalRotation
- setPosition
- setRotation
- translate
- fromEdge
- fromEdgePoints
Object literals
Properties
Protected additionalElementContext
• additionalElementContext: any
Inherited from MeshElementAnchor.additionalElementContext
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:36
Additional information about the elements current context (not belonging to the elementSignature). Used to keep the anchor's context consistent after a mesh change. Eg a POSA tries to find it's orientation by looking at the direction of edges with the same surface at their twin.
Protected Readonly changeEventEmitter
• changeEventEmitter: EventEmitter‹IMeshAnchorChangeEvent› = new EventEmitter
Inherited from AbstractMeshAnchor.changeEventEmitter
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:33
Private Readonly edgeToLocalTransforms
• edgeToLocalTransforms: Transforms = new Transforms()
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:27
It uses three transforms: 1. assembly -> mesh 2. mesh -> edge (@see _getMeshToEdgeTransforms) 3. edge -> anchor-local (@see edgeToLocalTransforms)
In its interface, it maps from Assembly to Anchor-Local.
Protected element
• element: MeshHalfEdge = null
Inherited from MeshElementAnchor.element
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:42
Last known identity of the element. Only null if the anchor has never been valid in its lifetime yet or is already destroyed.
Protected isDestroyed
• isDestroyed: boolean = false
Inherited from AbstractMeshAnchor.isDestroyed
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:24
Protected lastMeshAdaptionWasSuccessful
• lastMeshAdaptionWasSuccessful: boolean = false
Inherited from AbstractMeshAnchor.lastMeshAdaptionWasSuccessful
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:31
During initialization, subclasses need to take care of setting this value to true, if the anchor became valid before the first meshChangeEvent was fired. Else, the anchor will stay invalid until the first meshChangeEvent is fired.
Protected mesh
• mesh: Mesh | null
Inherited from AbstractMeshAnchor.mesh
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:23
Private Readonly transformsChangeEventEmitter
• transformsChangeEventEmitter: EventEmitter‹ITransformsChangeEvent› = new EventEmitter
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:29
Methods
Protected _adaptToChangedMesh
▸ _adaptToChangedMesh(event: MeshChangeEvent, requiresExactMatch: boolean): object
Inherited from MeshElementAnchor._adaptToChangedMesh
Overrides AbstractMeshAnchor._adaptToChangedMesh
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:263
see AbstractMeshAnchor._adaptToChangedMesh
Parameters:
| Name | Type | Description |
|---|---|---|
event |
MeshChangeEvent | - |
requiresExactMatch |
boolean | if true, will only adapt to elements in the mesh that match the signature perfectly |
Returns: object
-
event? : IMeshAnchorChangeEvent
-
invalid: boolean
Protected _applyChangedScale
▸ _applyChangedScale(scale: number): void
Overrides MeshEdgeAnchor._applyChangedScale
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:291
Parameters:
| Name | Type |
|---|---|
scale |
number |
Returns: void
Protected _changeSelfToChosenCandidate
▸ _changeSelfToChosenCandidate(chosenCandidate: IAbstractElementCandidate‹MeshHalfEdge›, mirror?: IMirrorMapping): boolean
Inherited from MeshElementAnchor._changeSelfToChosenCandidate
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:208
Now that it is decided which candidate this anchor will be pointing to, it should adjust it references to it.
Parameters:
| Name | Type | Description |
|---|---|---|
chosenCandidate |
IAbstractElementCandidate‹MeshHalfEdge› | the candidate the anchor should now point to |
mirror? |
IMirrorMapping | - |
Returns: boolean
whether the anchor is still valid (...or became invalidated)
Protected _checkIfAnchorCanBeValid
▸ _checkIfAnchorCanBeValid(): boolean
Inherited from MeshElementAnchor._checkIfAnchorCanBeValid
Overrides AbstractMeshAnchor._checkIfAnchorCanBeValid
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:194
Returns: boolean
Protected _createEvent
▸ _createEvent(splitAnchors: MeshEdgeAnchor[], previousTarget: Mesh, __namedParameters: object): IMeshAnchorChangeEvent
Inherited from MeshElementAnchor._createEvent
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:224
Creates an appropriate MeshAnchorChangeEvent depending on how many additional anchors have been created
Parameters:
▪ splitAnchors: MeshEdgeAnchor[]
if there are multiple equally good candidates, the rest of them should be split off using an anchor each. In this case, the event will be a MeshAnchorChange.SPLIT.
▪ previousTarget: Mesh
-
▪ __namedParameters: object
| Name | Type | Description |
|---|---|---|
mirror |
IMirrorMapping | - |
scale |
number | - |
Returns: IMeshAnchorChangeEvent
Protected _createSplitOffInstance
▸ _createSplitOffInstance(mesh: Mesh, edge: MeshHalfEdge): MeshEdgeAnchor
Inherited from MeshEdgeAnchor._createSplitOffInstance
Overrides MeshElementAnchor._createSplitOffInstance
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:101
Parameters:
| Name | Type |
|---|---|
mesh |
Mesh |
edge |
MeshHalfEdge |
Returns: MeshEdgeAnchor
Protected _extractAdditionalElementContextFromCurrentElement
▸ _extractAdditionalElementContextFromCurrentElement(): any
Inherited from MeshEdgeAnchor._extractAdditionalElementContextFromCurrentElement
Overrides MeshElementAnchor._extractAdditionalElementContextFromCurrentElement
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:93
Returns: any
Protected _extractSignatureFromCurrentElement
▸ _extractSignatureFromCurrentElement(): IEdgeSignature
Inherited from MeshEdgeAnchor._extractSignatureFromCurrentElement
Overrides MeshElementAnchor._extractSignatureFromCurrentElement
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:85
Returns: IEdgeSignature
Protected _findByMirror
▸ _findByMirror(successor: Mesh, mirror: IMirrorMapping): Array‹IAbstractElementCandidate‹MeshHalfEdge››
Inherited from MeshEdgeAnchor._findByMirror
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:216
Finds the new mirrored surface candidates.
Parameters:
| Name | Type | Description |
|---|---|---|
successor |
Mesh | new mirrored mesh |
mirror |
IMirrorMapping | map of old to mirrored mesh points |
Returns: Array‹IAbstractElementCandidate‹MeshHalfEdge››
Protected _findBySameIdentity
▸ _findBySameIdentity(candidateMesh: Mesh): object[]
Inherited from MeshEdgeAnchor._findBySameIdentity
Overrides MeshElementAnchor._findBySameIdentity
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:112
Parameters:
| Name | Type |
|---|---|
candidateMesh |
Mesh |
Returns: object[]
Protected _findBySameSignature
▸ _findBySameSignature(candidateMesh: Mesh): Array‹IAbstractElementCandidate‹MeshHalfEdge››
Inherited from MeshEdgeAnchor._findBySameSignature
Overrides MeshElementAnchor._findBySameSignature
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:131
Parameters:
| Name | Type |
|---|---|
candidateMesh |
Mesh |
Returns: Array‹IAbstractElementCandidate‹MeshHalfEdge››
Protected _findBySameUID
▸ _findBySameUID(candidateMesh: Mesh): Array‹IAbstractElementCandidate‹MeshHalfEdge››
Inherited from MeshEdgeAnchor._findBySameUID
Overrides MeshElementAnchor._findBySameUID
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:120
Parameters:
| Name | Type |
|---|---|
candidateMesh |
Mesh |
Returns: Array‹IAbstractElementCandidate‹MeshHalfEdge››
Private _findBySimilarSignature
▸ _findBySimilarSignature(candidateMesh: Mesh): Array‹IAbstractElementCandidate‹MeshHalfEdge››
Inherited from MeshEdgeAnchor._findBySimilarSignature
Overrides MeshElementAnchor._findBySimilarSignature
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:160
todo: find cases where this happens and adapt to them
Parameters:
| Name | Type | Description |
|---|---|---|
candidateMesh |
Mesh | - |
Returns: Array‹IAbstractElementCandidate‹MeshHalfEdge››
Private _getAssemblyToEdgeTransforms
▸ _getAssemblyToEdgeTransforms(): Transforms
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:296
Returns: Transforms
Private _getAssemblyToMeshTransforms
▸ _getAssemblyToMeshTransforms(): IReadOnlyTransforms
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:303
Returns: IReadOnlyTransforms
Private _getEdgeAxisRotation
▸ _getEdgeAxisRotation(): Quaternion
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:307
Returns: Quaternion
Protected _getInstance
▸ _getInstance(): MeshEdgeAnchor‹›
Inherited from MeshEdgeAnchor._getInstance
Overrides MeshElementAnchor._getInstance
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:81
Returns: MeshEdgeAnchor‹›
Protected _isElementValid
▸ _isElementValid(): boolean
Inherited from MeshEdgeAnchor._isElementValid
Overrides MeshElementAnchor._isElementValid
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:97
Returns: boolean
Protected _onMeshChange
▸ _onMeshChange(meshEvent: MeshChangeEvent): void
Overrides AbstractMeshAnchor._onMeshChange
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:284
Parameters:
| Name | Type |
|---|---|
meshEvent |
MeshChangeEvent |
Returns: void
Protected _performInitialLookup
▸ _performInitialLookup(): void
Inherited from MeshElementAnchor._performInitialLookup
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:173
When creating the anchor, there is the time span between setting signature/mesh and the first mesh change event where the anchor can already be valid (if the mesh is already filled with the correct data). To not falsely stay invalid, when either the element is set or the mesh is set, this initial lookup function needs to be called.
Afterwards, the anchor will simply evaluate it's validity after each meshChange event.
Returns: void
Protected _reFindElementOnMesh
▸ _reFindElementOnMesh(candidateMesh: Mesh, requiresExactMatch: boolean, mirror?: IMirrorMapping): Array‹IAbstractElementCandidate‹MeshHalfEdge››
Inherited from MeshEdgeAnchor._reFindElementOnMesh
Overrides MeshElementAnchor._reFindElementOnMesh
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:201
Parameters:
| Name | Type |
|---|---|
candidateMesh |
Mesh |
requiresExactMatch |
boolean |
mirror? |
IMirrorMapping |
Returns: Array‹IAbstractElementCandidate‹MeshHalfEdge››
Protected _refindSelfAndEmit
▸ _refindSelfAndEmit(meshEvent: MeshChangeEvent, requiresExactMatch: boolean): void
Inherited from AbstractMeshAnchor._refindSelfAndEmit
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:134
Parameters:
| Name | Type | Default |
|---|---|---|
meshEvent |
MeshChangeEvent | - |
requiresExactMatch |
boolean | false |
Returns: void
Protected _setElement
▸ _setElement(element: MeshHalfEdge): void
Inherited from MeshElementAnchor._setElement
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:363
Sets the (new) element this points to. For data consistency, also extracts the element's signature
Parameters:
| Name | Type |
|---|---|
element |
MeshHalfEdge |
Returns: void
Protected _setMesh
▸ _setMesh(newMesh: Mesh | null): void
Inherited from AbstractMeshAnchor._setMesh
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:115
Updates the mesh reference and event bindings.
This is protected as you should only change the mesh during initialization or updates handled in child classes - users should not be able to arbitrarily change the mesh and thus corrupt state.
Parameters:
| Name | Type |
|---|---|
newMesh |
Mesh | null |
Returns: void
Protected _setMeshAndElement
▸ _setMeshAndElement(mesh: Mesh, element: MeshHalfEdge): void
Inherited from MeshElementAnchor._setMeshAndElement
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:185
Parameters:
| Name | Type |
|---|---|
mesh |
Mesh |
element |
MeshHalfEdge |
Returns: void
clone
▸ clone(): PointOnEdgeAnchor
Implementation of IPositioningAnchor
Overrides MeshElementAnchor.clone
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:258
Returns: PointOnEdgeAnchor
destroy
▸ destroy(): void
Implementation of IPositioningAnchor
Inherited from MeshElementAnchor.destroy
Overrides AbstractMeshAnchor.destroy
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:94
Returns: void
getChangeEventEmitter
▸ getChangeEventEmitter(): IPublicEventEmitterInterface‹IMeshAnchorChangeEvent›
Implementation of IPositioningAnchor
Inherited from AbstractMeshAnchor.getChangeEventEmitter
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:81
Returns: IPublicEventEmitterInterface‹IMeshAnchorChangeEvent›
getEdge
▸ getEdge(): MeshHalfEdge | null
Inherited from MeshEdgeAnchor.getEdge
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:73
Returns: MeshHalfEdge | null
getEdgeToLocalPosition
▸ getEdgeToLocalPosition(): Vector3
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:125
Returns: Vector3
getEdgeToLocalRotation
▸ getEdgeToLocalRotation(): Quaternion
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:143
return rotation from Edge-Space -> Local-Space
Returns: Quaternion
getEdgeToLocalTransforms
▸ getEdgeToLocalTransforms(): IReadOnlyTransforms
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:121
Returns: IReadOnlyTransforms
getInMeshTarget
▸ getInMeshTarget(): MeshHalfEdge
Implementation of IMeshAnchor
Inherited from MeshEdgeAnchor.getInMeshTarget
Overrides AbstractMeshAnchor.getInMeshTarget
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:69
Returns: MeshHalfEdge
getIsValid
▸ getIsValid(): boolean
Implementation of IPositioningAnchor
Inherited from AbstractMeshAnchor.getIsValid
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:62
Returns: boolean
getLocalAngle
▸ getLocalAngle(): number
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:102
Returns the angle between its edge and its coordinate systems x-axis. If the x-axis is not in the plane of the surface (in mesh space), return null. Returns the angle in radians.
Returns: number
getMesh
▸ getMesh(): Mesh‹›
Implementation of IMeshAnchor
Inherited from AbstractMeshAnchor.getMesh
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:47
This should initialize the anchor with the necessary positionable arguments.
Returns: Mesh‹›
getMeshToEdgeTransforms
▸ getMeshToEdgeTransforms(): Transforms
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:277
Maps mesh-local -> edge space. Gives a Transform-Object that has a fitting rotation to align the x-Axis with the edges direction, the z-Axis with the surface normal, the y-Axis in the surface plane going inside the surface. Position is set to the start of the edge.
Returns: Transforms
getSignature
▸ getSignature(): IEdgeSignature
Inherited from MeshEdgeAnchor.getSignature
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:77
Returns: IEdgeSignature
getSurface
▸ getSurface(): MeshSurface
Inherited from MeshEdgeAnchor.getSurface
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:65
Returns: MeshSurface
getTargets
▸ getTargets(): [Mesh] | []
Implementation of IPositioningAnchor
Inherited from AbstractMeshAnchor.getTargets
Defined in src/model/data/Concepts/Anchors/AbstractMeshAnchor.ts:54
Returns: [Mesh] | []
the target mesh this anchor points to or an empty list if the mesh is not set
getTransforms
▸ getTransforms(): Transforms
Implementation of IPositioningAnchor
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:93
Return the transforms of the anchor. Maps assembly-local -> anchor-local.
Returns: Transforms
getTransformsChangeEventEmitter
▸ getTransformsChangeEventEmitter(): IPublicEventEmitterInterface‹ITransformsChangeEvent›
Implementation of IPositioningAnchor
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:246
Returns: IPublicEventEmitterInterface‹ITransformsChangeEvent›
getTransformsTargets
▸ getTransformsTargets(): IPositionableElementTransformsDefiner[]
Implementation of IPositioningAnchor
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:250
Returns: IPositionableElementTransformsDefiner[]
initializeFromElement
▸ initializeFromElement(mesh: Mesh, element: MeshHalfEdge, position?: Vector3, rotation?: Quaternion): this
Overrides MeshElementAnchor.initializeFromElement
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:39
Sets the positionOffset of the anchor according to the position given. The position will still change when the edge is moving, cause the positionOffset to the edge will be kept constant
Parameters:
| Name | Type | Description |
|---|---|---|
mesh |
Mesh | - |
element |
MeshHalfEdge | - |
position? |
Vector3 | the position the anchor should have, in assembly space |
rotation? |
Quaternion | the rotation the anchor should have, in assembly space |
Returns: this
initializeFromElementWithLocalCoordinates
▸ initializeFromElementWithLocalCoordinates(mesh: Mesh, element: MeshHalfEdge, position?: Vector3, rotation?: Quaternion): this
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:59
Sets the positionOffset of the anchor according to the position given. The position will still change when the edge is moving, cause the positionOffset to the edge will be kept constant
Parameters:
| Name | Type | Description |
|---|---|---|
mesh |
Mesh | - |
element |
MeshHalfEdge | - |
position? |
Vector3 | the position the anchor should have, in edge space |
rotation? |
Quaternion | the rotation the anchor should have, in edge space |
Returns: this
initializeFromSignature
▸ initializeFromSignature(mesh: Mesh, signature: IEdgeSignature, positionOffset: Vector3‹›, rotationOffset: Quaternion‹›): this
Overrides MeshElementAnchor.initializeFromSignature
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:75
Parameters:
| Name | Type | Default |
|---|---|---|
mesh |
Mesh | - |
signature |
IEdgeSignature | - |
positionOffset |
Vector3‹› | new Vector3() |
rotationOffset |
Quaternion‹› | new Quaternion() |
Returns: this
reFindElementOnMesh
▸ reFindElementOnMesh(candidateMesh: Mesh, requiresExactMatch: boolean, mirror?: IMirrorMapping): Array‹IAbstractElementCandidate‹MeshHalfEdge››
Inherited from MeshElementAnchor.reFindElementOnMesh
Defined in src/model/data/Concepts/Anchors/MeshElementAnchor.ts:99
Parameters:
| Name | Type |
|---|---|
candidateMesh |
Mesh |
requiresExactMatch |
boolean |
mirror? |
IMirrorMapping |
Returns: Array‹IAbstractElementCandidate‹MeshHalfEdge››
rotateAround
▸ rotateAround(rotationPoint: Vector3, angle: number): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:174
Rotates the PointOnEdgeAnchor around the surface normal with the given rotationPoint and angle
Parameters:
| Name | Type | Description |
|---|---|---|
rotationPoint |
Vector3 | in assembly coordinates |
angle |
number | in radians |
Returns: void
setEdgeToLocalPosition
▸ setEdgeToLocalPosition(offset: Vector3): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:133
Parameters:
| Name | Type | Description |
|---|---|---|
offset |
Vector3 | in edge space |
Returns: void
setEdgeToLocalRotation
▸ setEdgeToLocalRotation(offset: Quaternion): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:151
Parameters:
| Name | Type | Description |
|---|---|---|
offset |
Quaternion | in edge space |
Returns: void
setFromEdgePoints
▸ setFromEdgePoints(mesh: Mesh, startPoint: ReadonlyVector3, endPoint: ReadonlyVector3): void
Inherited from MeshEdgeAnchor.setFromEdgePoints
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:55
Parameters:
| Name | Type |
|---|---|
mesh |
Mesh |
startPoint |
ReadonlyVector3 |
endPoint |
ReadonlyVector3 |
Returns: void
setLocalAngle
▸ setLocalAngle(angle: number, emitEvent: boolean): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:193
Set the rotation in CCW around the surface normal. This overwrites the previous rotational Offset
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
angle |
number | - | in radians |
emitEvent |
boolean | true | - |
Returns: void
setLocalPosition
▸ setLocalPosition(position: ReadonlyVector3, emitEvent: boolean): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:213
Parameters:
| Name | Type | Default |
|---|---|---|
position |
ReadonlyVector3 | - |
emitEvent |
boolean | true |
Returns: void
setLocalRotation
▸ setLocalRotation(localRotation: Quaternion, emitEvent: boolean): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:236
Parameters:
| Name | Type |
|---|---|
localRotation |
Quaternion |
emitEvent |
boolean |
Returns: void
setPosition
▸ setPosition(position: ReadonlyVector3, emitEvent: boolean): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:208
Sets the positionOffset from the edge startPoint of the anchors local coordinate system. When the edge moves, the anchor will follow, leading to a different position.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
position |
ReadonlyVector3 | - | assembly space |
emitEvent |
boolean | true | - |
Returns: void
setRotation
▸ setRotation(rotation: Quaternion, emitEvent: boolean): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:231
Sets the rotation of the anchor in assembly space. Internally: Sets the rotation of the local coordinate system relative to the edge coordinate system. When the edge rotates, the anchor with its offset will follow.
see getTransforms()
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
rotation |
Quaternion | - | in assembly space |
emitEvent |
boolean | true | - |
Returns: void
translate
▸ translate(offset: Vector3): void
Defined in src/model/data/Concepts/Anchors/PointOnEdgeAnchor.ts:162
Parameters:
| Name | Type | Description |
|---|---|---|
offset |
Vector3 | in assembly space |
Returns: void
Static fromEdge
▸ fromEdge(mesh: Mesh, edge: MeshHalfEdge): MeshEdgeAnchor
Inherited from MeshEdgeAnchor.fromEdge
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:43
Parameters:
| Name | Type | Description |
|---|---|---|
mesh |
Mesh | - |
edge |
MeshHalfEdge | - |
Returns: MeshEdgeAnchor
Static fromEdgePoints
▸ fromEdgePoints(mesh: Mesh, startPoint: ReadonlyVector3, endPoint: ReadonlyVector3): MeshEdgeAnchor
Inherited from MeshEdgeAnchor.fromEdgePoints
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:32
Parameters:
| Name | Type | Description |
|---|---|---|
mesh |
Mesh | - |
startPoint |
ReadonlyVector3 | - |
endPoint |
ReadonlyVector3 | - |
Returns: MeshEdgeAnchor
Object literals
Protected elementSignature
▪ elementSignature: object
Inherited from MeshEdgeAnchor.elementSignature
Overrides MeshElementAnchor.elementSignature
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:49
endPoint
• endPoint: null = null
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:50
id
• id: null = null
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:51
startPoint
• startPoint: null = null
Defined in src/model/data/Concepts/Anchors/MeshEdgeAnchor.ts:52