@@ -3818,6 +3818,38 @@ public static void b2Body_SetAngularVelocity(b2BodyId bodyId, float angularVeloc
3818
3818
HANDLE_JAVA_EXCEPTION_END()
3819
3819
*/
3820
3820
3821
+ /**
3822
+ * Get the linear velocity of a local point attached to a body. Usually in meters per second.
3823
+ */
3824
+ public static b2Vec2 b2Body_GetLocalPointVelocity (b2BodyId bodyId , b2Vec2 localPoint ) {
3825
+ return new b2Vec2 (b2Body_GetLocalPointVelocity_internal (bodyId .getPointer (), localPoint .getPointer ()), true );
3826
+ }
3827
+
3828
+ static private native long b2Body_GetLocalPointVelocity_internal (long bodyId , long localPoint );/*
3829
+ HANDLE_JAVA_EXCEPTION_START()
3830
+ b2Vec2* _ret = (b2Vec2*)malloc(sizeof(b2Vec2));
3831
+ *_ret = b2Body_GetLocalPointVelocity(*(b2BodyId*)bodyId, *(b2Vec2*)localPoint);
3832
+ return (jlong)_ret;
3833
+ HANDLE_JAVA_EXCEPTION_END()
3834
+ return 0;
3835
+ */
3836
+
3837
+ /**
3838
+ * Get the linear velocity of a world point attached to a body. Usually in meters per second.
3839
+ */
3840
+ public static b2Vec2 b2Body_GetWorldPointVelocity (b2BodyId bodyId , b2Vec2 worldPoint ) {
3841
+ return new b2Vec2 (b2Body_GetWorldPointVelocity_internal (bodyId .getPointer (), worldPoint .getPointer ()), true );
3842
+ }
3843
+
3844
+ static private native long b2Body_GetWorldPointVelocity_internal (long bodyId , long worldPoint );/*
3845
+ HANDLE_JAVA_EXCEPTION_START()
3846
+ b2Vec2* _ret = (b2Vec2*)malloc(sizeof(b2Vec2));
3847
+ *_ret = b2Body_GetWorldPointVelocity(*(b2BodyId*)bodyId, *(b2Vec2*)worldPoint);
3848
+ return (jlong)_ret;
3849
+ HANDLE_JAVA_EXCEPTION_END()
3850
+ return 0;
3851
+ */
3852
+
3821
3853
/**
3822
3854
* Apply a force at a world point. If the force is not applied at the center of mass,
3823
3855
* it will generate a torque and affect the angular velocity. This optionally wakes up the body.
@@ -5134,6 +5166,22 @@ public static b2AABB b2Shape_GetAABB(b2ShapeId shapeId) {
5134
5166
return 0;
5135
5167
*/
5136
5168
5169
+ /**
5170
+ * Get the mass data for a shape
5171
+ */
5172
+ public static b2MassData b2Shape_GetMassData (b2ShapeId shapeId ) {
5173
+ return new b2MassData (b2Shape_GetMassData_internal (shapeId .getPointer ()), true );
5174
+ }
5175
+
5176
+ static private native long b2Shape_GetMassData_internal (long shapeId );/*
5177
+ HANDLE_JAVA_EXCEPTION_START()
5178
+ b2MassData* _ret = (b2MassData*)malloc(sizeof(b2MassData));
5179
+ *_ret = b2Shape_GetMassData(*(b2ShapeId*)shapeId);
5180
+ return (jlong)_ret;
5181
+ HANDLE_JAVA_EXCEPTION_END()
5182
+ return 0;
5183
+ */
5184
+
5137
5185
/**
5138
5186
* Get the closest point on a shape to a target point. Target and result are in world space.
5139
5187
* todo need sample
0 commit comments