Apply gel hinge joint limits when appropriate.

This commit is contained in:
Rod Kay
2025-08-04 14:34:12 +10:00
parent 59d478511e
commit 61d6e359ae
7 changed files with 77 additions and 60 deletions

View File

@@ -7,37 +7,37 @@
extern "C"
{
struct Joint;
struct Space;
/////////
/// Forge
//
Joint* b2d_new_hinge_Joint_with_local_anchors
(Space* in_Space,
Object* Object_A,
Object* Object_B,
Vector_3* Anchor_in_A,
Vector_3* Anchor_in_B,
float low_Limit,
float high_Limit,
bool collide_Connected);
Joint *b2d_new_hinge_Joint_with_local_anchors (Space *in_Space,
Object *Object_A,
Object *Object_B,
Vector_3 *Anchor_in_A,
Vector_3 *Anchor_in_B,
float low_Limit,
float high_Limit,
bool collide_Connected);
Joint* b2d_new_hinge_Joint (Space* in_Space,
Object* Object_A,
Object* Object_A,
Object* Object_B,
Matrix_4x4* Frame_A,
Matrix_4x4* Frame_B,
float low_Limit,
float high_Limit,
bool collide_Connected);
float low_Limit,
float high_Limit,
bool collide_Connected);
void b2d_free_hinge_Joint (Joint* Self);
Joint* b2d_new_space_hinge_Joint (Object* Object_A,
Joint* b2d_new_space_hinge_Joint (Space* in_Space,
Object* Object_A,
Matrix_4x4* Frame_A);
@@ -61,13 +61,13 @@ extern "C"
Vector_3* Pivot_in_A,
Vector_3* Pivot_in_B);
//////////////
/// Attributes
//
void* b2d_Joint_user_Data (Joint* Self);
void b2d_Joint_user_Data_is (Joint* Self, void* Now);
// void b2d_Joint_user_Data_is (Joint* Self, void* Now);
Object* b2d_Joint_Object_A (Joint* Self);
Object* b2d_Joint_Object_B (Joint* Self);
@@ -80,8 +80,8 @@ extern "C"
void b2d_Joint_set_local_Anchor (Joint* Self, bool is_Anchor_A,
Vector_3* local_Anchor);
bool b2d_Joint_is_Limited (Joint* Self, int DoF);
bool b2d_Joint_Extent (Joint* Self, int DoF);
@@ -90,16 +90,16 @@ extern "C"
Vector_3 b2d_Joint_reaction_Force (Joint* Self);
Real b2d_Joint_reaction_Torque (Joint* Self);
/// Hinge
//
void b2d_Joint_hinge_Limits_are (Joint* Self, Real Low,
void b2d_Joint_hinge_Limits_are (Joint* Self, Real Low,
Real High);
} // extern "C"