Improvements to GJK implementation:
- Fix various bugs - Improve readability - Add support for recovering witness points. PiperOrigin-RevId: 646515019 Change-Id: I295cf90d885e32013e595ea7aad07ed6c1869239
This commit is contained in:
committed by
Copybara-Service
parent
5a513a0afb
commit
5e39fc0564
@@ -23,15 +23,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// internal struct with settings for GJK
|
||||
struct _mjGjkConfig {
|
||||
mjtNum max_iterations;
|
||||
// internal configuration for convex collision detection
|
||||
struct _mjCCDConfig {
|
||||
int max_iterations;
|
||||
mjtNum tolerance;
|
||||
};
|
||||
typedef struct _mjGjkConfig mjGjkConfig;
|
||||
typedef struct _mjCCDConfig mjCCDConfig;
|
||||
|
||||
// Returns the distance between the two objects given an initial guess x0.
|
||||
MJAPI mjtNum mj_gjk(const mjGjkConfig* config, mjtCCObj* obj1, mjtCCObj* obj2, const mjtNum x0[3]);
|
||||
// Returns the distance between the two objects. The witness points are
|
||||
// recoverable from x_0 in obj1 and obj2.
|
||||
MJAPI mjtNum mj_gjk(const mjCCDConfig* config, mjCCDObj* obj1, mjCCDObj* obj2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user