Bullet Native:

- dont use pointers in stack (thanks to chototsu)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7473 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 29df71be5b
commit 6d8b0a2b9d
  1. 8
      engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.cpp
  2. 8
      engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.cpp
  3. 8
      engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.cpp
  4. 8
      engine/src/bullet/native/com_jme3_bullet_joints_SliderJoint.cpp

@ -73,12 +73,12 @@ extern "C" {
jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
btMatrix3x3* mtx1 = &btMatrix3x3();
btMatrix3x3* mtx2 = &btMatrix3x3();
btTransform transA = btTransform(*mtx1);
btMatrix3x3 mtx1 = btMatrix3x3();
btMatrix3x3 mtx2 = btMatrix3x3();
btTransform transA = btTransform(mtx1);
jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
jmeBulletUtil::convert(env, rotA, &transA.getBasis());
btTransform transB = btTransform(*mtx2);
btTransform transB = btTransform(mtx2);
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
jmeBulletUtil::convert(env, rotB, &transB.getBasis());
btConeTwistConstraint* joint = new btConeTwistConstraint(*bodyA, *bodyB, transA, transB);

@ -117,11 +117,11 @@ extern "C" {
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
//TODO: matrix not needed?
btMatrix3x3* mtx1=&btMatrix3x3();
btMatrix3x3* mtx2=&btMatrix3x3();
btTransform transA = btTransform(*mtx1);
btMatrix3x3 mtx1=btMatrix3x3();
btMatrix3x3 mtx2=btMatrix3x3();
btTransform transA = btTransform(mtx1);
jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
btTransform transB = btTransform(*mtx2);
btTransform transB = btTransform(mtx2);
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, transA, transB);
return (long) joint;

@ -124,12 +124,12 @@ extern "C" {
jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
btMatrix3x3* mtx1 = &btMatrix3x3();
btMatrix3x3* mtx2 = &btMatrix3x3();
btTransform transA = btTransform(*mtx1);
btMatrix3x3 mtx1 = btMatrix3x3();
btMatrix3x3 mtx2 = btMatrix3x3();
btTransform transA = btTransform(mtx1);
jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
jmeBulletUtil::convert(env, rotA, &transA.getBasis());
btTransform transB = btTransform(*mtx2);
btTransform transB = btTransform(mtx2);
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
jmeBulletUtil::convert(env, rotB, &transB.getBasis());
btGeneric6DofConstraint* joint = new btGeneric6DofConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);

@ -666,12 +666,12 @@ extern "C" {
jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
btMatrix3x3* mtx1=&btMatrix3x3();
btMatrix3x3* mtx2=&btMatrix3x3();
btTransform transA = btTransform(*mtx1);
btMatrix3x3 mtx1=btMatrix3x3();
btMatrix3x3 mtx2=btMatrix3x3();
btTransform transA = btTransform(mtx1);
jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
jmeBulletUtil::convert(env, rotA, &transA.getBasis());
btTransform transB = btTransform(*mtx2);
btTransform transB = btTransform(mtx2);
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
jmeBulletUtil::convert(env, rotB, &transB.getBasis());
btSliderConstraint* joint = new btSliderConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);

Loading…
Cancel
Save