vec2_t worldConstr_anchorA(WorldConstraint_t *aConstraint) { cpVect ret; switch(aConstraint->type) { case kWorldJointType_Pin: ret = cpPinJointGetAnchr1(aConstraint->cpConstraint); break; case kWorldJointType_Slide: ret = cpSlideJointGetAnchr1(aConstraint->cpConstraint); break; case kWorldJointType_DampedSpring: ret = cpDampedSpringGetAnchr1(aConstraint->cpConstraint); break; default: dynamo_log("Invalid constraint"); ret = cpv(-1,-1); } return CPV_TO_VEC2(ret); }
Vec2 PhysicsJointLimit::getAnchr1() const { return PhysicsHelper::cpv2point(cpSlideJointGetAnchr1(_cpConstraints.front())); }
CCPhysicsVector *CCSlideJoint::getAnchrA() { return CCPhysicsVector::create(cpSlideJointGetAnchr1(this->m_constraint)); }