Пример #1
0
void worldConstr_setAnchorB(WorldConstraint_t *aConstraint, vec2_t aAnchor)
{
    switch(aConstraint->type) {
    case kWorldJointType_Pin:
        cpPinJointSetAnchr2(aConstraint->cpConstraint, VEC2_TO_CPV(aAnchor));
        break;
    case kWorldJointType_Slide:
        cpSlideJointSetAnchr2(aConstraint->cpConstraint, VEC2_TO_CPV(aAnchor));
        break;
    case kWorldJointType_DampedSpring:
        cpDampedSpringSetAnchr2(aConstraint->cpConstraint, VEC2_TO_CPV(aAnchor));
        break;
    default:
        dynamo_log("Invalid constraint");
    }
}
Пример #2
0
void DampedSpring::setAnchr2(const cp::Vect&  value)
{
		cpDampedSpringSetAnchr2(constraint,value);
}