editor › Globals › SceneEventCollider
Class: SceneEventCollider
Hierarchy
- SceneEventCollider
Index
Methods
- _intersectSceneWithRay
- _intersectSceneWithSphere
- _isInteractable
- _sendRay
- _sendSphereRays
- collideScene
- getDefaultInteractionData
- getIntersectionAndLinkedObjects
Methods
Static Private _intersectSceneWithRay
▸ _intersectSceneWithRay(inputEvent: IInputEvent, interactableObjects: Object3D[]): IInteractionData
Defined in src/input/processing/SceneEventCollider.ts:136
Parameters:
| Name | Type |
|---|---|
inputEvent |
IInputEvent |
interactableObjects |
Object3D[] |
Returns: IInteractionData
Static Private _intersectSceneWithSphere
▸ _intersectSceneWithSphere(inputEvent: any, interactableObjects: Object3D[]): IInteractionData
Defined in src/input/processing/SceneEventCollider.ts:159
Parameters:
| Name | Type |
|---|---|
inputEvent |
any |
interactableObjects |
Object3D[] |
Returns: IInteractionData
Static Private _isInteractable
▸ _isInteractable(physicalObject: PhysicalObject, Class: any, checkInteractable: boolean): boolean
Defined in src/input/processing/SceneEventCollider.ts:120
Parameters:
| Name | Type |
|---|---|
physicalObject |
PhysicalObject |
Class |
any |
checkInteractable |
boolean |
Returns: boolean
Static Private _sendRay
▸ _sendRay(origin: Vector3, direction: Vector3, objects: Object3D[], length: number): object
Defined in src/input/processing/SceneEventCollider.ts:255
Parameters:
| Name | Type |
|---|---|
origin |
Vector3 |
direction |
Vector3 |
objects |
Object3D[] |
length |
number |
Returns: object
-
hint: any
-
intersectionPoint: Vector3‹›
-
intersections: Intersection[]
-
physicalObject: PhysicalObject‹›
Static Private _sendSphereRays
▸ _sendSphereRays(origin: Vector3, direction: Vector3, sphereRadius: number, objectsToIntersect: Object3D[]): object
Defined in src/input/processing/SceneEventCollider.ts:178
Parameters:
| Name | Type |
|---|---|
origin |
Vector3 |
direction |
Vector3 |
sphereRadius |
number |
objectsToIntersect |
Object3D[] |
Returns: object
-
hint: any
-
intersectionPoint: Vector3‹›
-
intersections: Intersection[]
-
physicalObject: PhysicalObject‹›
Static collideScene
▸ collideScene(inputEvent: IInputEvent, interactableObjects: Object3D[]): IInteractionData
Defined in src/input/processing/SceneEventCollider.ts:27
Parameters:
| Name | Type |
|---|---|
inputEvent |
IInputEvent |
interactableObjects |
Object3D[] |
Returns: IInteractionData
Static getDefaultInteractionData
▸ getDefaultInteractionData(inputEvent: IInputEvent): IInteractionData
Defined in src/input/processing/SceneEventCollider.ts:38
Parameters:
| Name | Type |
|---|---|
inputEvent |
IInputEvent |
Returns: IInteractionData
Static getIntersectionAndLinkedObjects
▸ getIntersectionAndLinkedObjects(intersections: Intersection[], Class: any, checkInteractable: boolean): object
Defined in src/input/processing/SceneEventCollider.ts:64
Get intersection and linked objects, such as the PhysicalObject or a Hint. If Class is set, only intersections with objects of the specified class are considered. Only the THREE.Object3D with an attached objectVisualization will be used to calculate the intersection point PhysicalObjects with the hint notInteractable=true will be ignored if checkInteractable is set to true Attention: the returned intersectionPoint is the intersection with the physical object, not with the hint
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
intersections |
Intersection[] | - | relevant intersections |
Class |
any | null | only PhysicalObjects of this class are considered |
checkInteractable |
boolean | true | whether hint 'notInteractable' will be considered or not |
Returns: object
-
hint: any
-
intersectionPoint: Vector3‹›
-
physicalObject: PhysicalObject‹›