本文整理汇总了Java中org.jbox2d.pooling.IWorldPool类的典型用法代码示例。如果您正苦于以下问题:Java IWorldPool类的具体用法?Java IWorldPool怎么用?Java IWorldPool使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IWorldPool类属于org.jbox2d.pooling包,在下文中一共展示了IWorldPool类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: WheelJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected WheelJoint(IWorldPool argPool, WheelJointDef def) {
super(argPool, def);
m_localAnchorA.set(def.localAnchorA);
m_localAnchorB.set(def.localAnchorB);
m_localXAxisA.set(def.localAxisA);
Vec2.crossToOutUnsafe(1.0f, m_localXAxisA, m_localYAxisA);
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_maxMotorTorque = def.maxMotorTorque;
m_motorSpeed = def.motorSpeed;
m_enableMotor = def.enableMotor;
m_frequencyHz = def.frequencyHz;
m_dampingRatio = def.dampingRatio;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:19,代码来源:WheelJoint.java
示例2: RevoluteJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected RevoluteJoint(IWorldPool argWorld, RevoluteJointDef def) {
super(argWorld, def);
m_localAnchorA.set(def.localAnchorA);
m_localAnchorB.set(def.localAnchorB);
m_referenceAngle = def.referenceAngle;
m_motorImpulse = 0;
m_lowerAngle = def.lowerAngle;
m_upperAngle = def.upperAngle;
m_maxMotorTorque = def.maxMotorTorque;
m_motorSpeed = def.motorSpeed;
m_enableLimit = def.enableLimit;
m_enableMotor = def.enableMotor;
m_limitState = LimitState.INACTIVE;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:17,代码来源:RevoluteJoint.java
示例3: PrismaticJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected PrismaticJoint(IWorldPool argWorld, PrismaticJointDef def) {
super(argWorld, def);
m_localAnchorA = new Vec2(def.localAnchorA);
m_localAnchorB = new Vec2(def.localAnchorB);
m_localXAxisA = new Vec2(def.localAxisA);
m_localXAxisA.normalize();
m_localYAxisA = new Vec2();
Vec2.crossToOutUnsafe(1f, m_localXAxisA, m_localYAxisA);
m_referenceAngle = def.referenceAngle;
m_impulse = new Vec3();
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_lowerTranslation = def.lowerTranslation;
m_upperTranslation = def.upperTranslation;
m_maxMotorForce = def.maxMotorForce;
m_motorSpeed = def.motorSpeed;
m_enableLimit = def.enableLimit;
m_enableMotor = def.enableMotor;
m_limitState = LimitState.INACTIVE;
m_K = new Mat33();
m_axis = new Vec2();
m_perp = new Vec2();
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:27,代码来源:PrismaticJoint.java
示例4: MouseJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected MouseJoint(IWorldPool argWorld, MouseJointDef def) {
super(argWorld, def);
assert (def.target.isValid());
assert (def.maxForce >= 0);
assert (def.frequencyHz >= 0);
assert (def.dampingRatio >= 0);
m_targetA.set(def.target);
Transform.mulTransToOutUnsafe(m_bodyB.getTransform(), m_targetA, m_localAnchorB);
m_maxForce = def.maxForce;
m_impulse.setZero();
m_frequencyHz = def.frequencyHz;
m_dampingRatio = def.dampingRatio;
m_beta = 0;
m_gamma = 0;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:20,代码来源:MouseJoint.java
示例5: PulleyJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected PulleyJoint(IWorldPool argWorldPool, PulleyJointDef def) {
super(argWorldPool, def);
m_groundAnchorA.set(def.groundAnchorA);
m_groundAnchorB.set(def.groundAnchorB);
m_localAnchorA.set(def.localAnchorA);
m_localAnchorB.set(def.localAnchorB);
assert (def.ratio != 0.0f);
m_ratio = def.ratio;
m_lengthA = def.lengthA;
m_lengthB = def.lengthB;
m_constant = def.lengthA + m_ratio * def.lengthB;
m_impulse = 0.0f;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:17,代码来源:PulleyJoint.java
示例6: PrismaticJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
public PrismaticJoint(IWorldPool argWorld, PrismaticJointDef def) {
super(argWorld, def);
m_localAnchor1 = new Vec2(def.localAnchorA);
m_localAnchor2 = new Vec2(def.localAnchorB);
m_localXAxis1 = new Vec2(def.localAxis1);
m_localYAxis1 = new Vec2();
Vec2.crossToOut(1f, m_localXAxis1, m_localYAxis1);
m_refAngle = def.referenceAngle;
m_impulse = new Vec3();
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_lowerTranslation = def.lowerTranslation;
m_upperTranslation = def.upperTranslation;
m_maxMotorForce = def.maxMotorForce;
m_motorSpeed = def.motorSpeed;
m_enableLimit = def.enableLimit;
m_enableMotor = def.enableMotor;
m_limitState = LimitState.INACTIVE;
m_K = new Mat33();
m_axis = new Vec2();
m_perp = new Vec2();
}
开发者ID:mleoking,项目名称:PhET,代码行数:26,代码来源:PrismaticJoint.java
示例7: MouseJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected MouseJoint(IWorldPool argWorld, MouseJointDef def) {
super(argWorld, def);
assert(def.target.isValid());
assert(def.maxForce >= 0);
assert(def.frequencyHz >= 0);
assert(def.dampingRatio >= 0);
m_target.set(def.target);
Transform.mulTransToOut(m_bodyB.getTransform(), m_target, m_localAnchor);
m_maxForce = def.maxForce;
m_impulse.setZero();
m_frequencyHz = def.frequencyHz;
m_dampingRatio = def.dampingRatio;
m_beta = 0;
m_gamma = 0;
}
开发者ID:mleoking,项目名称:PhET,代码行数:20,代码来源:MouseJoint.java
示例8: LineJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
public LineJoint(IWorldPool argPool, LineJointDef def) {
super(argPool, def);
m_localAnchor1.set(def.localAnchorA);
m_localAnchor2.set(def.localAnchorB);
m_localXAxis1.set(def.localAxisA);
Vec2.crossToOut(1.0f, m_localXAxis1, m_localYAxis1);
m_impulse.setZero();
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_lowerTranslation = def.lowerTranslation;
m_upperTranslation = def.upperTranslation;
m_maxMotorForce = def.maxMotorForce;
m_motorSpeed = def.motorSpeed;
m_enableLimit = def.enableLimit;
m_enableMotor = def.enableMotor;
m_limitState = LimitState.INACTIVE;
m_axis.setZero();
m_perp.setZero();
}
开发者ID:mleoking,项目名称:PhET,代码行数:23,代码来源:LineJoint.java
示例9: PulleyJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
/**
* @param argWorldPool
* @param def
*/
public PulleyJoint(IWorldPool argWorldPool, PulleyJointDef def) {
super(argWorldPool, def);
m_groundAnchor1.set(def.groundAnchorA);
m_groundAnchor2.set(def.groundAnchorB);
m_localAnchor1.set(def.localAnchorA);
m_localAnchor2.set(def.localAnchorB);
assert (def.ratio != 0.0f);
m_ratio = def.ratio;
m_constant = def.lengthA + m_ratio * def.lengthB;
m_maxLength1 = MathUtils.min(def.maxLengthA, m_constant - m_ratio * MIN_PULLEY_LENGTH);
m_maxLength2 = MathUtils.min(def.maxLengthB, (m_constant - MIN_PULLEY_LENGTH) / m_ratio);
m_impulse = 0.0f;
m_limitImpulse1 = 0.0f;
m_limitImpulse2 = 0.0f;
}
开发者ID:mleoking,项目名称:PhET,代码行数:24,代码来源:PulleyJoint.java
示例10: World
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
/**
* Construct a world object.
*
* @param gravity
* the world gravity vector.
* @param doSleep
* improve performance by not simulating inactive bodies.
*/
public World(Vec2 gravity, boolean doSleep, IWorldPool argPool) {
pool = argPool;
m_destructionListener = null;
m_debugDraw = null;
m_bodyList = null;
m_jointList = null;
m_bodyCount = 0;
m_jointCount = 0;
m_warmStarting = true;
m_continuousPhysics = true;
m_allowSleep = doSleep;
m_gravity.set(gravity);
m_flags = CLEAR_FORCES;
m_inv_dt0 = 0f;
m_contactManager = new ContactManager(this);
initializeRegisters();
}
开发者ID:mleoking,项目名称:PhET,代码行数:34,代码来源:World.java
示例11: WheelJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected WheelJoint(IWorldPool argPool, WheelJointDef def) {
super(argPool, def);
m_localAnchorA.set(def.localAnchorA);
m_localAnchorB.set(def.localAnchorB);
m_localXAxisA.set(def.localAxisA);
Vector2.crossToOutUnsafe(1.0f, m_localXAxisA, m_localYAxisA);
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_maxMotorTorque = def.maxMotorTorque;
m_motorSpeed = def.motorSpeed;
m_enableMotor = def.enableMotor;
m_frequencyHz = def.frequencyHz;
m_dampingRatio = def.dampingRatio;
}
开发者ID:pianoman373,项目名称:Point-Engine,代码行数:19,代码来源:WheelJoint.java
示例12: PrismaticJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
protected PrismaticJoint(IWorldPool argWorld, PrismaticJointDef def) {
super(argWorld, def);
m_localAnchorA = new Vector2(def.localAnchorA);
m_localAnchorB = new Vector2(def.localAnchorB);
m_localXAxisA = new Vector2(def.localAxisA);
m_localXAxisA.normalize();
m_localYAxisA = new Vector2();
Vector2.crossToOutUnsafe(1f, m_localXAxisA, m_localYAxisA);
m_referenceAngle = def.referenceAngle;
m_impulse = new Vector3();
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_lowerTranslation = def.lowerTranslation;
m_upperTranslation = def.upperTranslation;
m_maxMotorForce = def.maxMotorForce;
m_motorSpeed = def.motorSpeed;
m_enableLimit = def.enableLimit;
m_enableMotor = def.enableMotor;
m_limitState = LimitState.INACTIVE;
m_K = new Mat33();
m_axis = new Vector2();
m_perp = new Vector2();
}
开发者ID:pianoman373,项目名称:Point-Engine,代码行数:27,代码来源:PrismaticJoint.java
示例13: PulleyJoint
import org.jbox2d.pooling.IWorldPool; //导入依赖的package包/类
/**
* @param argWorldPool
* @param def
*/
public PulleyJoint(IWorldPool argWorldPool, PulleyJointDef def) {
super(argWorldPool, def);
m_groundAnchor1.set(def.groundAnchorA);
m_groundAnchor2.set(def.groundAnchorB);
m_localAnchor1.set(def.localAnchorA);
m_localAnchor2.set(def.localAnchorB);
assert (def.ratio != 0.0f);
m_ratio = def.ratio;
origLength1 = def.lengthA;
origLength2 = def.lengthB;
m_constant = def.lengthA + m_ratio * def.lengthB;
m_maxLength1 = MathUtils.min(def.maxLengthA, m_constant - m_ratio * MIN_PULLEY_LENGTH);
m_maxLength2 = MathUtils.min(def.maxLengthB, (m_constant - MIN_PULLEY_LENGTH) / m_ratio);
m_impulse = 0.0f;
m_limitImpulse1 = 0.0f;
m_limitImpulse2 = 0.0f;
}
开发者ID:col726,项目名称:game-engine-CMZ,代码行数:27,代码来源:PulleyJoint.java
注:本文中的org.jbox2d.pooling.IWorldPool类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论