summaryrefslogtreecommitdiffstats
path: root/servers/physics_2d/joints_2d_sw.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-11 00:52:51 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-11 00:52:51 -0300
commitbc26f905817945300d397696330d1ab04a1af33c (patch)
treed06338399c8ea410042f6631fb3db3efcc100b05 /servers/physics_2d/joints_2d_sw.cpp
parent710692278d1353aad08bc7bceb655afc1d6c950c (diff)
downloadredot-engine-bc26f905817945300d397696330d1ab04a1af33c.tar.gz
Type renames:
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
Diffstat (limited to 'servers/physics_2d/joints_2d_sw.cpp')
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 5318212120..7205e90d27 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -215,21 +215,21 @@ bool PinJoint2DSW::setup(float p_step) {
real_t B_inv_mass = B?B->get_inv_mass():0.0;
- Matrix32 K1;
+ Transform2D K1;
K1[0].x = A->get_inv_mass() + B_inv_mass; K1[1].x = 0.0f;
K1[0].y = 0.0f; K1[1].y = A->get_inv_mass() + B_inv_mass;
- Matrix32 K2;
+ Transform2D K2;
K2[0].x = A->get_inv_inertia() * rA.y * rA.y; K2[1].x = -A->get_inv_inertia() * rA.x * rA.y;
K2[0].y = -A->get_inv_inertia() * rA.x * rA.y; K2[1].y = A->get_inv_inertia() * rA.x * rA.x;
- Matrix32 K;
+ Transform2D K;
K[0]= K1[0] + K2[0];
K[1]= K1[1] + K2[1];
if (B) {
- Matrix32 K3;
+ Transform2D K3;
K3[0].x = B->get_inv_inertia() * rB.y * rB.y; K3[1].x = -B->get_inv_inertia() * rB.x * rB.y;
K3[0].y = -B->get_inv_inertia() * rB.x * rB.y; K3[1].y = B->get_inv_inertia() * rB.x * rB.x;