本文整理汇总了Java中org.jbox2d.common.Mat33类的典型用法代码示例。如果您正苦于以下问题:Java Mat33类的具体用法?Java Mat33怎么用?Java Mat33使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Mat33类属于org.jbox2d.common包,在下文中一共展示了Mat33类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PrismaticJoint
import org.jbox2d.common.Mat33; //导入依赖的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();
}
示例2: DefaultWorldPool
import org.jbox2d.common.Mat33; //导入依赖的package包/类
public DefaultWorldPool(int argSize, int argContainerSize) {
vecs = new OrderedStack<Vec2>(argSize, argContainerSize) {
protected Vec2 newInstance() { return new Vec2(); }
};
vec3s = new OrderedStack<Vec3>(argSize, argContainerSize) {
protected Vec3 newInstance() { return new Vec3(); }
};
mats = new OrderedStack<Mat22>(argSize, argContainerSize) {
protected Mat22 newInstance() { return new Mat22(); }
};
aabbs = new OrderedStack<AABB>(argSize, argContainerSize) {
protected AABB newInstance() { return new AABB(); }
};
rots = new OrderedStack<Rot>(argSize, argContainerSize) {
protected Rot newInstance() { return new Rot(); }
};
mat33s = new OrderedStack<Mat33>(argSize, argContainerSize) {
protected Mat33 newInstance() { return new Mat33(); }
};
dist = new Distance();
collision = new Collision(this);
toi = new TimeOfImpact(this);
}
示例3: PrismaticJoint
import org.jbox2d.common.Mat33; //导入依赖的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();
}
示例4: PrismaticJoint
import org.jbox2d.common.Mat33; //导入依赖的package包/类
public PrismaticJoint(WorldPool 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();
}
示例5: WeldJoint
import org.jbox2d.common.Mat33; //导入依赖的package包/类
/**
* @param argWorld
* @param def
*/
protected WeldJoint(IWorldPool argWorld, WeldJointDef def) {
super(argWorld, def);
m_localAnchorA = new Vec2(def.localAnchorA);
m_localAnchorB = new Vec2(def.localAnchorB);
m_referenceAngle = def.referenceAngle;
m_impulse = new Vec3();
m_impulse.setZero();
m_mass = new Mat33();
}
示例6: WeldJoint
import org.jbox2d.common.Mat33; //导入依赖的package包/类
/**
* @param argWorld
* @param def
*/
protected WeldJoint(WorldPool argWorld, WeldJointDef def) {
super(argWorld, def);
m_localAnchorA = new Vec2(def.localAnchorA);
m_localAnchorB = new Vec2(def.localAnchorB);
m_referenceAngle = def.referenceAngle;
m_impulse = new Vec3();
m_impulse.setZero();
m_mass = new Mat33();
}
示例7: testMat33
import org.jbox2d.common.Mat33; //导入依赖的package包/类
public void testMat33() {
Mat33 mat = new Mat33();
mat.ex.set(3, 19, -5);
mat.ey.set(-1, 1, 4);
mat.ez.set(-10, 4, 4);
Vec3 b = new Vec3(4, 1, 2);
assertEquals(new Vec3(0.096f, 1.1013334f, -.48133332f), mat.solve33(b));
Vec2 b2 = new Vec2(4, 1);
assertEquals(new Vec2(0.22727273f, -3.318182f), mat.solve22(b2));
}
示例8: popMat33
import org.jbox2d.common.Mat33; //导入依赖的package包/类
public final Mat33 popMat33() {
return mat33s.pop();
}
示例9: initialValue
import org.jbox2d.common.Mat33; //导入依赖的package包/类
protected Mat33 initialValue(){
return new Mat33();
}
示例10: popMat33
import org.jbox2d.common.Mat33; //导入依赖的package包/类
public Mat33 popMat33();