editor › Globals › HintPositionProvider
Class: HintPositionProvider
Base class for hint position providers, defining basic interface.
Hierarchy
↳ HintPositionProvider
↳ DirectionalHintPositionProvider
Index
Methods
- calculate
- destroy
- getCanvasPoints
- 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[]
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 getPosition
▸ getPosition(): Vector3
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
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
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
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