MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / dJointGetAMotorAxis

Function dJointGetAMotorAxis

3rd_party/Src/ode/ode/src/joint.cpp:2588–2608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2586
2587
2588extern "C" void dJointGetAMotorAxis (dxJointAMotor *joint, int anum,
2589 dVector3 result)
2590{
2591 dAASSERT(joint && anum >= 0 && anum < 3);
2592 dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor");
2593 if (anum < 0) anum = 0;
2594 if (anum > 2) anum = 2;
2595 if (joint->rel[anum] > 0) {
2596 if (joint->rel[anum]==1) {
2597 dMULTIPLY0_331 (result,joint->node[0].body->R,joint->axis[anum]);
2598 }
2599 else {
2600 dMULTIPLY0_331 (result,joint->node[1].body->R,joint->axis[anum]);
2601 }
2602 }
2603 else {
2604 result[0] = joint->axis[anum][0];
2605 result[1] = joint->axis[anum][1];
2606 result[2] = joint->axis[anum][2];
2607 }
2608}
2609
2610
2611extern "C" int dJointGetAMotorAxisRel (dxJointAMotor *joint, int anum)

Callers 2

getAxisMethod · 0.85
GetAxisDirDynamicMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected