Skip to main content

Module distance

Module distance 

Source

Structs§

CastOutput
Low level ray cast or shape-cast output data. (b3CastOutput)
DistanceInput
Input for shape_distance. (b3DistanceInput)
DistanceOutput
Output for shape_distance. (b3DistanceOutput)
ShapeCastPairInput
Input parameters for shape_cast. (b3ShapeCastPairInput)
ShapeProxy
A shape proxy is used by the GJK algorithm. It can represent a convex shape.
Simplex
Simplex from the GJK algorithm. (b3Simplex)
SimplexCache
Used to warm start the GJK simplex. If you call this function multiple times with nearby transforms this might improve performance. Otherwise you can zero initialize this. The distance cache must be initialized to zero on the first call. (b3SimplexCache)
SimplexVertex
Simplex vertex for debugging the GJK algorithm. (b3SimplexVertex)
Sweep
This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may not coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position. (b3Sweep)
ToiInput
Time of impact input. (b3TOIInput)
ToiOutput
Time of impact output. (b3TOIOutput)

Enums§

ToiState
Describes the TOI output. (b3TOIState)

Functions§

compute_proxy_aabb
Compute the AABB of a shape proxy. (shape.c: b3ComputeProxyAABB)
get_point_support
Support index for a point cloud along an axis. (b3GetPointSupport)
get_proxy_support
Support index for a shape proxy along an axis.
get_sweep_transform
Evaluate the transform sweep at a specific time. (b3GetSweepTransform)
make_local_proxy
Transform a proxy into the local frame of transform. (shape.c: b3MakeLocalProxy)
make_proxy
Make a proxy for use in overlap, shape cast, and related functions. This is a deep copy of the points. (box2d-style helper; C uses a pointer in b3ShapeProxy)
shape_cast
Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction. The query runs in frame A, so the hit point and normal are returned in frame A. Initially touching shapes are a miss unless can_encroach allows it. (b3ShapeCast)
shape_distance
Compute the closest points between two shapes represented as point clouds. cache is input/output. On the first call set SimplexCache::count to zero. The query runs in frame A, so the witness points and normal are returned in frame A. The underlying GJK algorithm may be debugged by passing in debug simplexes; pass None normally. (b3ShapeDistance)
time_of_impact
Compute the upper bound on time before two shapes penetrate. Time is represented as a fraction between [0, max_fraction]. This uses a swept separating axis and may miss some intermediate, non-tunneling collisions. If you change the time interval, you should call this function again. (b3TimeOfImpact)