vec2_t worldConstr_anchorB(WorldConstraint_t *aConstraint) { cpVect ret; switch(aConstraint->type) { case kWorldJointType_Pin: ret = cpPinJointGetAnchr2(aConstraint->cpConstraint); break; case kWorldJointType_Slide: ret = cpSlideJointGetAnchr2(aConstraint->cpConstraint); break; case kWorldJointType_DampedSpring: ret = cpDampedSpringGetAnchr2(aConstraint->cpConstraint); break; default: dynamo_log("Invalid constraint"); ret = cpv(-1,-1); } return CPV_TO_VEC2(ret); }
Vec2 PhysicsJointLimit::getAnchr2() const { return PhysicsHelper::cpv2point(cpSlideJointGetAnchr2(_cpConstraints.front())); }
CCPhysicsVector *CCSlideJoint::getAnchrB() { return CCPhysicsVector::create(cpSlideJointGetAnchr2(this->m_constraint)); }