@Override public boolean solvePositionConstraints(SolverData step) { return constrainEdges(step.positions); }
targetLengths[i] = dist; targetVolume = getBodyArea();
float deltaArea = targetVolume - getSolverArea(positions); float toExtrude = 0.5f * deltaArea / perimeter; // *relaxationFactor
return new PulleyJoint(world.getPool(), (PulleyJointDef) def); case CONSTANT_VOLUME: return new ConstantVolumeJoint(world, (ConstantVolumeJointDef) def); case ROPE: return new RopeJoint(world.getPool(), (RopeJointDef) def);
return new PulleyJoint(world.getPool(), (PulleyJointDef) def); case CONSTANT_VOLUME: return new ConstantVolumeJoint(world, (ConstantVolumeJointDef) def); case ROPE: return new RopeJoint(world.getPool(), (RopeJointDef) def);
@Override public boolean solvePositionConstraints(SolverData step) { return constrainEdges(step.positions); }
return new PulleyJoint(world.getPool(), (PulleyJointDef) def); case CONSTANT_VOLUME: return new ConstantVolumeJoint(world, (ConstantVolumeJointDef) def); case ROPE: return new RopeJoint(world.getPool(), (RopeJointDef) def);
float deltaArea = targetVolume - getSolverArea(positions); float toExtrude = 0.5f * deltaArea / perimeter; // *relaxationFactor
targetLengths[i] = dist; targetVolume = getBodyArea();
@Override public boolean solvePositionConstraints(SolverData step) { return constrainEdges(step.positions); }
public static Joint create(World world, JointDef def) { // Joint joint = null; switch (def.type) { case MOUSE: return new MouseJoint(world.getPool(), (MouseJointDef) def); case DISTANCE: return new DistanceJoint(world.getPool(), (DistanceJointDef) def); case PRISMATIC: return new PrismaticJoint(world.getPool(), (PrismaticJointDef) def); case REVOLUTE: return new RevoluteJoint(world.getPool(), (RevoluteJointDef) def); case WELD: return new WeldJoint(world.getPool(), (WeldJointDef) def); case FRICTION: return new FrictionJoint(world.getPool(), (FrictionJointDef) def); case WHEEL: return new WheelJoint(world.getPool(), (WheelJointDef) def); case GEAR: return new GearJoint(world.getPool(), (GearJointDef) def); case PULLEY: return new PulleyJoint(world.getPool(), (PulleyJointDef) def); case CONSTANT_VOLUME: return new ConstantVolumeJoint(world, (ConstantVolumeJointDef) def); case ROPE: return new RopeJoint(world.getPool(), (RopeJointDef) def); case UNKNOWN: default: return null; } }
float deltaArea = targetVolume - getSolverArea(positions); float toExtrude = 0.5f * deltaArea / perimeter; // *relaxationFactor
targetLengths[i] = dist; targetVolume = getBodyArea();
@Override public boolean solvePositionConstraints(SolverData step) { return constrainEdges(step.positions); }
return new PulleyJoint(world.getPool(), (PulleyJointDef) def); case CONSTANT_VOLUME: return new ConstantVolumeJoint(world, (ConstantVolumeJointDef) def); case ROPE: return new RopeJoint(world.getPool(), (RopeJointDef) def);
float deltaArea = targetVolume - getSolverArea(positions); float toExtrude = 0.5f * deltaArea / perimeter; // *relaxationFactor
targetLengths[i] = dist; targetVolume = getBodyArea();
@Override public boolean solvePositionConstraints(SolverData step) { return constrainEdges(step.positions); }
float deltaArea = targetVolume - getSolverArea(positions); float toExtrude = 0.5f * deltaArea / perimeter; // *relaxationFactor