Classes | Functions
b2_distance.h File Reference
#include "b2_api.h"
#include "b2_math.h"
Include dependency graph for b2_distance.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  b2DistanceInput
 
struct  b2DistanceOutput
 Output for b2Distance. More...
 
struct  b2DistanceProxy
 
struct  b2ShapeCastInput
 Input parameters for b2ShapeCast. More...
 
struct  b2ShapeCastOutput
 Output results for b2ShapeCast. More...
 
struct  b2SimplexCache
 

Functions

B2_API void b2Distance (b2DistanceOutput *output, b2SimplexCache *cache, const b2DistanceInput *input)
 
B2_API bool b2ShapeCast (b2ShapeCastOutput *output, const b2ShapeCastInput *input)
 

Function Documentation

◆ b2Distance()

B2_API void b2Distance ( b2DistanceOutput output,
b2SimplexCache cache,
const b2DistanceInput input 
)

Compute the closest points between two shapes. Supports any combination of: b2CircleShape, b2PolygonShape, b2EdgeShape. The simplex cache is input/output. On the first call set b2SimplexCache.count to zero.

Definition at line 454 of file b2_distance.cpp.

◆ b2ShapeCast()

B2_API bool b2ShapeCast ( b2ShapeCastOutput output,
const b2ShapeCastInput input 
)

Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction.

Returns
true if hit, false if there is no hit or an initial overlap

Definition at line 603 of file b2_distance.cpp.



mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22