mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
documented the class
This commit is contained in:
parent
109864928d
commit
4056a40c53
@ -16,11 +16,21 @@
|
|||||||
|
|
||||||
dReal OdeUtil::OC_infinity = dInfinity;
|
dReal OdeUtil::OC_infinity = dInfinity;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: OdeUtil::get_connecting_joint
|
||||||
|
// Access: Public, Static
|
||||||
|
// Description: Returns the joint that connects the given bodies.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
OdeJoint OdeUtil::
|
OdeJoint OdeUtil::
|
||||||
get_connecting_joint(const OdeBody &body1, const OdeBody &body2) {
|
get_connecting_joint(const OdeBody &body1, const OdeBody &body2) {
|
||||||
return OdeJoint(dConnectingJoint(body1.get_id(),body2.get_id()));
|
return OdeJoint(dConnectingJoint(body1.get_id(),body2.get_id()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: OdeUtil::get_connecting_joint_list
|
||||||
|
// Access: Public, Static
|
||||||
|
// Description: Returns a list of joints connecting the bodies.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
OdeJointCollection OdeUtil::
|
OdeJointCollection OdeUtil::
|
||||||
get_connecting_joint_list(const OdeBody &body1, const OdeBody &body2) {
|
get_connecting_joint_list(const OdeBody &body1, const OdeBody &body2) {
|
||||||
const int max_possible_joints = min(body1.get_num_joints(), body1.get_num_joints());
|
const int max_possible_joints = min(body1.get_num_joints(), body1.get_num_joints());
|
||||||
@ -37,11 +47,29 @@ get_connecting_joint_list(const OdeBody &body1, const OdeBody &body2) {
|
|||||||
return joints;
|
return joints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: OdeUtil::are_connected
|
||||||
|
// Access: Public, Static
|
||||||
|
// Description: Returns 1 if the given bodies are connected
|
||||||
|
// by a joint, returns 0 otherwise.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
int OdeUtil::
|
int OdeUtil::
|
||||||
are_connected(const OdeBody &body1, const OdeBody &body2) {
|
are_connected(const OdeBody &body1, const OdeBody &body2) {
|
||||||
return dAreConnected(body1.get_id(),body2.get_id());
|
return dAreConnected(body1.get_id(),body2.get_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: OdeUtil::are_connected_excluding
|
||||||
|
// Access: Public, Static
|
||||||
|
// Description: Returns 1 if the given bodies are connected
|
||||||
|
// by a joint that does not match the given
|
||||||
|
// joint_type, returns 0 otherwise. This is useful
|
||||||
|
// for deciding whether to add contact joints between
|
||||||
|
// two bodies: if they are already connected by
|
||||||
|
// non-contact joints then it may not be appropriate
|
||||||
|
// to add contacts, however it is okay to add more
|
||||||
|
// contact between bodies that already have contacts.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
int OdeUtil::
|
int OdeUtil::
|
||||||
are_connected_excluding(const OdeBody &body1,
|
are_connected_excluding(const OdeBody &body1,
|
||||||
const OdeBody &body2,
|
const OdeBody &body2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user