editor › Globals › HintPositionOffsetProvider
Class: HintPositionOffsetProvider
Base class for hint position providers that provide a position and a offset, used for annotation hints.
Hierarchy
↳ HintPositionOffsetProvider
↳ PositionablePositionProvider
Index
Methods
- calculate
- destroy
- getCanvasPoints
- getOrthogonalOffset
- getPosition
- getWorldPosition
- isValid
- setCanvasSizeGetter
- setConversionMethod
Methods
Abstract calculate
▸ calculate(): void
Inherited from HintDataProvider.calculate
Defined in src/renderContext/hints/HintDataProvider.ts:15
Trigger recalculation of internally stored values
Returns: void
destroy
▸ destroy(): void
Inherited from HintDataProvider.destroy
Defined in src/renderContext/hints/HintDataProvider.ts:20
Called when the hint that uses this provider is destroyed. You want to do cleanup here.
Returns: void
getCanvasPoints
▸ getCanvasPoints(): Vector3[]
Inherited from HintPositionProvider.getCanvasPoints
Defined in src/renderContext/hints/HintPositionProviders/HintPositionProvider.ts:37
Return the edge points of the hint on the screen. Used for filtering hints
Returns: Vector3[]
Abstract getOrthogonalOffset
▸ getOrthogonalOffset(): Vector3
Defined in src/renderContext/hints/HintPositionProviders/HintPositionOffsetProvider.ts:11
Get the internally stored offset that was calculated.
Returns: Vector3
Abstract getPosition
▸ getPosition(): Vector3
Inherited from HintPositionProvider.getPosition
Defined in src/renderContext/hints/HintPositionProviders/HintPositionProvider.ts:11
Get internally stored position in canvas space. Will get updated with calculate().
Returns: Vector3
Abstract getWorldPosition
▸ getWorldPosition(): Vector3
Inherited from HintPositionProvider.getWorldPosition
Defined in src/renderContext/hints/HintPositionProviders/HintPositionProvider.ts:16
Get internally stored position in 3D world space. Will get updated with calculate().
Returns: Vector3
Abstract isValid
▸ isValid(): boolean
Inherited from HintDataProvider.isValid
Defined in src/renderContext/hints/HintDataProvider.ts:10
Checks whether this hint is still valid (e.g. edge it annotates still exists)
Returns: boolean
setCanvasSizeGetter
▸ setCanvasSizeGetter(getCanvasSize: function): void
Inherited from HintPositionProvider.setCanvasSizeGetter
Defined in src/renderContext/hints/HintPositionProviders/HintPositionProvider.ts:29
Called by the hint when it's added to the hintManager. The hintManager will provide a function to get the canvas size to the hint, which will foward it to the provider. Override if needed.
Parameters:
▪ getCanvasSize: function
▸ (): IDimensions2
Returns: void
setConversionMethod
▸ setConversionMethod(worldToCanvas: function): void
Inherited from HintPositionProvider.setConversionMethod
Defined in src/renderContext/hints/HintPositionProviders/HintPositionProvider.ts:22
Called by the hint when it's added to the hintManager. The hintManager will give a worldToCanvas conversion method to the hint, which will forward it to the provider. Override if needed.
Parameters:
▪ worldToCanvas: function
▸ (Vector3: any): Vector3
Parameters:
| Name | Type |
|---|---|
Vector3 |
any |
Returns: void