当前位置: 首页>>代码示例>>Java>>正文


Java World.getPool方法代码示例

本文整理汇总了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;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:27,代码来源:Joint.java

示例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;
  }
}
 
开发者ID:jfcameron,项目名称:G2Dj,代码行数:33,代码来源:Joint.java

示例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;
  }
}
 
开发者ID:pianoman373,项目名称:Point-Engine,代码行数:31,代码来源:Joint.java


注:本文中的org.jbox2d.dynamics.World.getPool方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。