Skip to main content

Class: IWSDKWorldSensingPort

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:78

What an adapter implements. Everything except observe is optional, because every host has a different subset and a missing method is reported rather than thrown.

Implements​

Constructors​

Constructor​

new IWSDKWorldSensingPort(world: World, options?: IWSDKWorldSensingPortOptions): IWSDKWorldSensingPort;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:102

Parameters​

ParameterType
worldWorld
optionsIWSDKWorldSensingPortOptions

Returns​

IWSDKWorldSensingPort

Methods​

createAnchor()​

createAnchor(pose: WorldPose): Promise<string | null>;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:169

IWSDK anchors an ENTITY rather than handing back an anchor object, so this makes one at the requested pose and lets SceneUnderstandingSystem attach it. The id that comes back is the same id the anchor will report with.

Parameters​

ParameterType
poseWorldPose

Returns​

Promise<string | null>

Implementation of​

WorldSensingPort.createAnchor


dispose()​

dispose(): void;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:214

Returns​

void

Implementation of​

WorldSensingPort.dispose


observe()​

observe(host: WorldSensingPortHost): () => void;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:111

Parameters​

ParameterType
hostWorldSensingPortHost

Returns​

() => void

Implementation of​

WorldSensingPort.observe


removeAnchor()​

removeAnchor(id: string): void;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:198

Parameters​

ParameterType
idstring

Returns​

void

Implementation of​

WorldSensingPort.removeAnchor


setDetection()​

setDetection(detection:
| ResolvedWorldDetection
| null): void;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:118

Turn detection on or off. null means stop everything.

Parameters​

ParameterType
detection| ResolvedWorldDetection | null

Returns​

void

Implementation of​

WorldSensingPort.setDetection


startHitTest()​

startHitTest(request: HitTestRequest): void;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:142

Parameters​

ParameterType
requestHitTestRequest

Returns​

void

Implementation of​

WorldSensingPort.startHitTest


stopHitTest()​

stopHitTest(id: string): void;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:157

Parameters​

ParameterType
idstring

Returns​

void

Implementation of​

WorldSensingPort.stopHitTest


update()​

update(): void;

Defined in: packages/iwsdk-environment/src/world-sensing-port.ts:205

Called from the director's update; this is where a port polls its host.

Returns​

void

Implementation of​

WorldSensingPort.update