I'm looking for a way to create a force sensor. Somewhere i found, that Ode creates special "Contact joints" when 2 objects collides. This joints destroyes automatically next tact (true?). And also i found , that joint classes in odejava allows to get JointFeedback, which is what i need.
I have started to look at [jME Physics 2] and [Odejava] sources to find a way to put this JointFeedback in each PendingInfo, that is used in ContactCallback.
Obviously, the way is to catch a moment when Ode creates a contact joint, then extract the feedback from it.
So I ve looked into OdePhysicSpace class.
What i found :
in computeTimeStep() function
1: collide collision groups (true?) , also makes dContact objects with native Ode function in collide function of "collision" object of JavaCollision class. // brrrr
2: iterateContacts( true ) launches callbacks (true?) // iterateContacts() function
3: then , joints creates. // applyContact() frunction
the "PendingContact contact" object, as i understand , provides current contact info to callback function(true?). It uses "odeContact" for this purposes.
SWIGTYPE_p_dJointID Ode.dJointCreateContact(world.getId(), javaCollision.getContactGroupId(), contact); creates the contact joint.
If i could to create a SWIGTYPE_p_dJointID on each iteration in iterateContacts() manually , then add JointFeedback from this joint info to PendingContactInfo, callback function could catch and extract this feedback info.
But as you see , this function takes "contact" field that is dContact type. And i don't know where i can get this object for current state of "odeContact". So , how can i get dContact thing of current contact that is currently calculating in iterate cycle?
Any other ways to create a force sensor?
sry 4 my eng=(