com.badlogic.gdx.physics.box2d.joints.PrismaticJoint.cpp revision a4008501496b9f47d45f04d206b76529436623e7
13ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames#include <com.badlogic.gdx.physics.box2d.joints.PrismaticJoint.h> 23ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 3a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:27 43ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 53ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames#include <Box2D/Box2D.h> 6a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott JNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniGetJointTranslation(JNIEnv* env, jobject object, jlong addr) { 73ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 83ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 9a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:40 1088c5338f70dfd997da58047979351da5369539e0Justin Shapcott 11a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 12a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->GetJointTranslation(); 133ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 143ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 153ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 163ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 173ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniGetJointSpeed(JNIEnv* env, jobject object, jlong addr) { 183ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 193ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 20a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:50 21a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 22a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 23a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->GetJointSpeed(); 243ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 253ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 263ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 273ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 283ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT jboolean JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniIsLimitEnabled(JNIEnv* env, jobject object, jlong addr) { 293ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 303ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 31a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:60 32a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 33a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 34a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->IsLimitEnabled(); 353ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 363ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 373ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 383ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 393ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniEnableLimit(JNIEnv* env, jobject object, jlong addr, jboolean flag) { 403ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 413ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 42a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:70 43a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 44a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 45a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott joint->EnableLimit(flag); 463ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 473ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 483ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 493ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 503ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniGetLowerLimit(JNIEnv* env, jobject object, jlong addr) { 513ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 523ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 53a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:80 54a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 55a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 56a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->GetLowerLimit(); 573ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 583ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 593ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 603ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 613ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniGetUpperLimit(JNIEnv* env, jobject object, jlong addr) { 623ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 633ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 64a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:90 65a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 66a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 67a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->GetUpperLimit(); 683ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 693ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 703ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 713ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 723ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniSetLimits(JNIEnv* env, jobject object, jlong addr, jfloat lower, jfloat upper) { 733ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 743ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 75a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:100 76a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 77a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 78a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott joint->SetLimits(lower, upper ); 793ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 803ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 813ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 823ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 833ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT jboolean JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniIsMotorEnabled(JNIEnv* env, jobject object, jlong addr) { 843ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 853ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 86a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:110 87a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 88a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 89a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->IsMotorEnabled(); 903ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 913ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 923ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 933ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 943ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniEnableMotor(JNIEnv* env, jobject object, jlong addr, jboolean flag) { 953ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 963ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 97a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:120 98a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 99a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 100a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott joint->EnableMotor(flag); 1013ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1023ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1033ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 1043ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1053ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniSetMotorSpeed(JNIEnv* env, jobject object, jlong addr, jfloat speed) { 1063ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1073ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 108a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:130 109a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 110a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 111a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott joint->SetMotorSpeed(speed); 1123ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1133ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1143ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 1153ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1163ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniGetMotorSpeed(JNIEnv* env, jobject object, jlong addr) { 1173ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1183ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 119a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:140 120a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott 121a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 122a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->GetMotorSpeed(); 1233ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1243ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1253ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 1263ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1273ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgamesJNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniSetMaxMotorForce(JNIEnv* env, jobject object, jlong addr, jfloat force) { 1283ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1293ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 130a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:150 1313ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 132a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 133a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott joint->SetMaxMotorForce(force); 1343ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1353ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 1363ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames} 1373ea3eff151b3f69698ac4ded04b2c8e34b191ea8badlogicgames 138a4008501496b9f47d45f04d206b76529436623e7Justin ShapcottJNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_PrismaticJoint_jniGetMotorForce(JNIEnv* env, jobject object, jlong addr, jfloat invDt) { 13988c5338f70dfd997da58047979351da5369539e0Justin Shapcott 14088c5338f70dfd997da58047979351da5369539e0Justin Shapcott 141a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott//@line:160 14288c5338f70dfd997da58047979351da5369539e0Justin Shapcott 143a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott b2PrismaticJoint* joint = (b2PrismaticJoint*)addr; 144a4008501496b9f47d45f04d206b76529436623e7Justin Shapcott return joint->GetMotorForce(invDt); 14588c5338f70dfd997da58047979351da5369539e0Justin Shapcott 14688c5338f70dfd997da58047979351da5369539e0Justin Shapcott 14788c5338f70dfd997da58047979351da5369539e0Justin Shapcott} 14888c5338f70dfd997da58047979351da5369539e0Justin Shapcott 149