本文整理汇总了Java中org.jbox2d.dynamics.World.getPool方法的典型用法代码示例。如果您正苦于以下问题:Java World.getPool方法的具体用法?Java World.getPool怎么用?Java World.getPool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jbox2d.dynamics.World
的用法示例。
在下文中一共展示了World.getPool方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import org.jbox2d.dynamics.World; //导入方法依赖的package包/类
public static Joint create(World argWorld, JointDef def) {
//Joint joint = null;
switch(def.type){
case MOUSE:
return new MouseJoint(argWorld.getPool(), (MouseJointDef) def);
case DISTANCE:
return new DistanceJoint(argWorld.getPool(), (DistanceJointDef) def);
case PRISMATIC:
return new PrismaticJoint(argWorld.getPool(), (PrismaticJointDef) def);
case REVOLUTE:
return new RevoluteJoint(argWorld.getPool(), (RevoluteJointDef) def);
case WELD:
return new WeldJoint(argWorld.getPool(), (WeldJointDef) def);
case FRICTION:
return new FrictionJoint(argWorld.getPool(), (FrictionJointDef) def);
case LINE:
return new LineJoint(argWorld.getPool(), (LineJointDef) def);
case GEAR:
return new GearJoint(argWorld.getPool(), (GearJointDef) def);
case PULLEY:
return new PulleyJoint(argWorld.getPool(), (PulleyJointDef) def);
case CONSTANT_VOLUME:
return new ConstantVolumeJoint(argWorld, (ConstantVolumeJointDef) def);
}
return null;
}
示例2: create
import org.jbox2d.dynamics.World; //导入方法依赖的package包/类
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 MOTOR:
return new MotorJoint(world.getPool(), (MotorJointDef) def);
case UNKNOWN:
default:
return null;
}
}
示例3: create
import org.jbox2d.dynamics.World; //导入方法依赖的package包/类
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;
}
}