-
Notifications
You must be signed in to change notification settings - Fork 11
RenderIsect
The isect module provides an interface for performing intersection testing on the scene.
Found in "dmz/components/isect"
- FirstPoint
- ClosestPoint
- AllPoints
Object[] {} doIsect (Object {start: Vector startPos, end: Vector endPos | direction: Vector dir, [callback: Function f (Object {} value)] }) Object[] {} doIsect (Object[] {start: Vector startPos, end: Vector endPos | direction: Vector dir, [callback: Function f (Object {} value)] })
-
The function takes as an argument either a single object or an array of objects.
-
The argument Object(s) take the following fields:
- start: Vector startPos
- end: Vector endPos
- direction: Vector dir
- callback: Function f (Object {} value)
-
The argument object requires start, either end or direction, and optionally callback. The type of intersection testing depends on whether end or direction is specified. The function specified by callback is called on each result.
-
This function always returns an array of results that is the same size as the number of objects uses for arguments. The returned objects (and the object used as an argument to the callback function, have the following fields:
- id
- type
- point
- normal
- object
- distance