Find the closest intersection between a ray and a set of collider.
The set of colliders taking part in this pipeline.
The ray to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the length of the ray to ray.dir.norm() * maxToi
.
If false
then the ray will attempt to hit the boundary of a shape, even if its
origin already lies inside of a shape. In other terms, true
implies that all shapes are plain,
whereas false
implies that all shapes are hollow for this ray-cast.
Used to filter the colliders that can or cannot be hit by the ray.
Find the closest intersection between a ray and a set of collider.
The set of colliders taking part in this pipeline.
The ray to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the length of the ray to ray.dir.norm() * maxToi
.
If false
then the ray will attempt to hit the boundary of a shape, even if its
origin already lies inside of a shape. In other terms, true
implies that all shapes are plain,
whereas false
implies that all shapes are hollow for this ray-cast.
Used to filter the colliders that can or cannot be hit by the ray.
Find the closest intersection between a ray and a set of collider.
This also computes the normal at the hit point.
The set of colliders taking part in this pipeline.
The ray to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the length of the ray to ray.dir.norm() * maxToi
.
If false
then the ray will attempt to hit the boundary of a shape, even if its
origin already lies inside of a shape. In other terms, true
implies that all shapes are plain,
whereas false
implies that all shapes are hollow for this ray-cast.
Used to filter the colliders that can or cannot be hit by the ray.
Find the closest intersection between a ray and a set of collider.
This also computes the normal at the hit point.
The set of colliders taking part in this pipeline.
The ray to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the length of the ray to ray.dir.norm() * maxToi
.
If false
then the ray will attempt to hit the boundary of a shape, even if its
origin already lies inside of a shape. In other terms, true
implies that all shapes are plain,
whereas false
implies that all shapes are hollow for this ray-cast.
Used to filter the colliders that can or cannot be hit by the ray.
Casts a shape at a constant linear velocity and retrieve the first collider it hits. This is similar to ray-casting except that we are casting a whole shape instead of just a point (the ray origin).
The set of colliders taking part in this pipeline.
The initial position of the shape to cast.
The initial rotation of the shape to cast.
The constant velocity of the shape to cast (i.e. the cast direction).
The shape to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the distance traveled by the shape to shapeVel.norm() * maxToi
.
The bit groups and filter associated to the shape to cast, in order to only test on colliders with collision groups compatible with this group.
Casts a shape at a constant linear velocity and retrieve the first collider it hits. This is similar to ray-casting except that we are casting a whole shape instead of just a point (the ray origin).
The set of colliders taking part in this pipeline.
The initial position of the shape to cast.
The initial rotation of the shape to cast.
The constant velocity of the shape to cast (i.e. the cast direction).
The shape to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the distance traveled by the shape to shapeVel.norm() * maxToi
.
The bit groups and filter associated to the shape to cast, in order to only test on colliders with collision groups compatible with this group.
Finds the handles of all the colliders with an AABB intersecting the given AABB.
The center of the AABB to test.
The half-extents of the AABB to test.
The callback that will be called with the handles of all the colliders currently intersecting the given AABB.
Finds the handles of all the colliders with an AABB intersecting the given AABB.
The center of the AABB to test.
The half-extents of the AABB to test.
The callback that will be called with the handles of all the colliders currently intersecting the given AABB.
Release the WASM memory occupied by this query pipeline.
Release the WASM memory occupied by this query pipeline.
Gets the handle of up to one collider intersecting the given shape.
The set of colliders taking part in this pipeline.
The position of the shape used for the intersection test.
The orientation of the shape used for the intersection test.
The shape used for the intersection test.
The bit groups and filter associated to the ray, in order to only hit the colliders with collision groups compatible with the ray's group.
Gets the handle of up to one collider intersecting the given shape.
The set of colliders taking part in this pipeline.
The position of the shape used for the intersection test.
The orientation of the shape used for the intersection test.
The shape used for the intersection test.
The bit groups and filter associated to the ray, in order to only hit the colliders with collision groups compatible with the ray's group.
Find all the colliders containing the given point.
The set of colliders taking part in this pipeline.
The point used for the containment test.
The bit groups and filter associated to the point to test, in order to only test on colliders with collision groups compatible with the ray's group.
A function called with the handles of each collider with a shape
containing the point
.
Find all the colliders containing the given point.
The set of colliders taking part in this pipeline.
The point used for the containment test.
The bit groups and filter associated to the point to test, in order to only test on colliders with collision groups compatible with the ray's group.
A function called with the handles of each collider with a shape
containing the point
.
Cast a ray and collects all the intersections between a ray and the scene.
The set of colliders taking part in this pipeline.
The ray to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the length of the ray to ray.dir.norm() * maxToi
.
If false
then the ray will attempt to hit the boundary of a shape, even if its
origin already lies inside of a shape. In other terms, true
implies that all shapes are plain,
whereas false
implies that all shapes are hollow for this ray-cast.
Used to filter the colliders that can or cannot be hit by the ray.
The callback called once per hit (in no particular order) between a ray and a collider.
If this callback returns false
, then the cast will stop and no further hits will be detected/reported.
Cast a ray and collects all the intersections between a ray and the scene.
The set of colliders taking part in this pipeline.
The ray to cast.
The maximum time-of-impact that can be reported by this cast. This effectively
limits the length of the ray to ray.dir.norm() * maxToi
.
If false
then the ray will attempt to hit the boundary of a shape, even if its
origin already lies inside of a shape. In other terms, true
implies that all shapes are plain,
whereas false
implies that all shapes are hollow for this ray-cast.
Used to filter the colliders that can or cannot be hit by the ray.
The callback called once per hit (in no particular order) between a ray and a collider.
If this callback returns false
, then the cast will stop and no further hits will be detected/reported.
Retrieve all the colliders intersecting the given shape.
The set of colliders taking part in this pipeline.
The position of the shape to test.
The orientation of the shape to test.
The shape to test.
The bit groups and filter associated to the shape to test, in order to only test on colliders with collision groups compatible with this group.
A function called with the handles of each collider intersecting the shape
.
Retrieve all the colliders intersecting the given shape.
The set of colliders taking part in this pipeline.
The position of the shape to test.
The orientation of the shape to test.
The shape to test.
The bit groups and filter associated to the shape to test, in order to only test on colliders with collision groups compatible with this group.
A function called with the handles of each collider intersecting the shape
.
Find the projection of a point on the closest collider.
The set of colliders taking part in this pipeline.
The point to project.
If this is set to true
then the collider shapes are considered to
be plain (if the point is located inside of a plain shape, its projection is the point
itself). If it is set to false
the collider shapes are considered to be hollow
(if the point is located inside of an hollow shape, it is projected on the shape's
boundary).
The bit groups and filter associated to the point to project, in order to only project on colliders with collision groups compatible with the ray's group.
Find the projection of a point on the closest collider.
The set of colliders taking part in this pipeline.
The point to project.
If this is set to true
then the collider shapes are considered to
be plain (if the point is located inside of a plain shape, its projection is the point
itself). If it is set to false
the collider shapes are considered to be hollow
(if the point is located inside of an hollow shape, it is projected on the shape's
boundary).
The bit groups and filter associated to the point to project, in order to only project on colliders with collision groups compatible with the ray's group.
Updates the acceleration structure of the query pipeline.
The set of rigid-bodies taking part in this pipeline.
The set of colliders taking part in this pipeline.
Updates the acceleration structure of the query pipeline.
The set of rigid-bodies taking part in this pipeline.
The set of colliders taking part in this pipeline.
Generated using TypeDoc
A pipeline for performing queries on all the colliders of a scene. A pipeline for performing queries on all the colliders of a scene.
To avoid leaking WASM resources, this MUST be freed manually with
queryPipeline.free()
once you are done using it (and all the rigid-bodies it created).To avoid leaking WASM resources, this MUST be freed manually with
queryPipeline.free()
once you are done using it (and all the rigid-bodies it created).