Add Flex component.
PiperOrigin-RevId: 572830650 Change-Id: I6908228087b7b9683be3506c8d9cdc725ed5dcd5
This commit is contained in:
committed by
Saran Tunyasuvunakool
parent
649a474788
commit
5a70ad08ab
@@ -23,12 +23,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct mjCollisionTree_ {
|
||||
int node1;
|
||||
int node2;
|
||||
};
|
||||
typedef struct mjCollisionTree_ mjCollisionTree;
|
||||
|
||||
// collision function pointers and max contact pairs
|
||||
MJAPI extern mjfCollision mjCOLLISIONFUNC[mjNGEOMTYPES][mjNGEOMTYPES];
|
||||
|
||||
@@ -38,15 +32,44 @@ MJAPI void mj_collision(const mjModel* m, mjData* d);
|
||||
// applies Separating Axis Theorem for rotated AABBs
|
||||
MJAPI int mj_collideOBB(const mjtNum aabb1[6], const mjtNum aabb2[6],
|
||||
const mjtNum xpos1[3], const mjtNum xmat1[9],
|
||||
const mjtNum xpos2[3], const mjtNum xmat2[9],
|
||||
const mjtNum xpos2[3], const mjtNum xmat2[9], mjtNum margin,
|
||||
mjtNum product[36], mjtNum offset[12], mjtByte* initialize);
|
||||
|
||||
// broad phase collision detection; return list of body pairs for narrow phase
|
||||
int mj_broadphase(const mjModel* m, mjData* d, int* bodypair, int maxpair);
|
||||
// is element active (for collisions)
|
||||
MJAPI int mj_isElemActive(const mjModel* m, int f, int e);
|
||||
|
||||
// checks if pair is already present in pair_geom and calls narrow phase
|
||||
void mj_collideGeomPair(const mjModel* m, mjData* d, int g1, int g2, int merged,
|
||||
int startadr, int pairadr);
|
||||
|
||||
// binary search between two bodyflex trees
|
||||
void mj_collideTree(const mjModel* m, mjData* d, int bf1, int bf2,
|
||||
int merged, int startadr, int pairadr);
|
||||
|
||||
// broad phase collision detection; return list of bodyflex pairs
|
||||
int mj_broadphase(const mjModel* m, mjData* d, int* bfpair, int maxpair);
|
||||
|
||||
// test two geoms for collision, apply filters, add to contact list
|
||||
void mj_collideGeoms(const mjModel* m, mjData* d, int g1, int g2);
|
||||
|
||||
// test a plane geom and a flex for collision, add to contact list
|
||||
void mj_collidePlaneFlex(const mjModel* m, mjData* d, int g, int f);
|
||||
|
||||
// test for internal flex collisions, add to contact list
|
||||
void mj_collideFlexInternal(const mjModel* m, mjData* d, int f);
|
||||
|
||||
// test active element self-collisions with SAP
|
||||
void mj_collideFlexSAP(const mjModel* m, mjData* d, int f);
|
||||
|
||||
// test a geom and an elem for collision, add to contact list
|
||||
void mj_collideGeomElem(const mjModel* m, mjData* d, int g, int f, int e);
|
||||
|
||||
// test two elems for collision, add to contact list
|
||||
void mj_collideElems(const mjModel* m, mjData* d, int f1, int e1, int f2, int e2);
|
||||
|
||||
// test element and vertex for collision, add to contact list
|
||||
void mj_collideElemVert(const mjModel* m, mjData* d, int f, int e, int v);
|
||||
|
||||
// number of possible collisions based on filters and geom types
|
||||
int mj_contactFilter(int contype1, int conaffinity1,
|
||||
int contype2, int conaffinity2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user