+5
-25
lines changedFilter options
+5
-25
lines changed Original file line number Diff line number Diff line change
@@ -231,9 +231,7 @@ public void initVelocityConstraints(final SolverData data) {
231
231
m_impulse.setZero();
232
232
}
233
233
234
-
// data.velocities[m_indexA].v.set(vA);
235
234
data.velocities[m_indexA].w = wA;
236
-
// data.velocities[m_indexB].v.set(vB);
237
235
data.velocities[m_indexB].w = wB;
238
236
239
237
pool.pushVec2(1);
@@ -308,9 +306,7 @@ public void solveVelocityConstraints(final SolverData data) {
308
306
pool.pushVec3(2);
309
307
}
310
308
311
-
// data.velocities[m_indexA].v.set(vA);
312
309
data.velocities[m_indexA].w = wA;
313
-
// data.velocities[m_indexB].v.set(vB);
314
310
data.velocities[m_indexB].w = wB;
315
311
316
312
pool.pushVec2(3);
@@ -392,9 +388,7 @@ public boolean solvePositionConstraints(final SolverData data) {
392
388
pool.pushVec3(2);
393
389
}
394
390
395
-
// data.positions[m_indexA].c.set(cA);
396
391
data.positions[m_indexA].a = aA;
397
-
// data.positions[m_indexB].c.set(cB);
398
392
data.positions[m_indexB].a = aB;
399
393
400
394
pool.pushVec2(5);
Original file line number Diff line number Diff line change
@@ -9,51 +9,37 @@
9
9
import com.almasb.fxgl.physics.box2d.dynamics.Body;
10
10
import com.almasb.fxgl.physics.box2d.dynamics.World;
11
11
12
-
/**
13
-
* Created at 3:38:52 AM Jan 15, 2011
14
-
*/
15
-
16
12
/**
17
13
* @author Daniel Murphy
18
14
*/
19
15
public class WeldJointDef extends JointDef<WeldJoint> {
20
16
/**
21
17
* The local anchor point relative to body1's origin.
22
18
*/
23
-
public final Vec2 localAnchorA;
19
+
public final Vec2 localAnchorA = new Vec2();
24
20
25
21
/**
26
22
* The local anchor point relative to body2's origin.
27
23
*/
28
-
public final Vec2 localAnchorB;
24
+
public final Vec2 localAnchorB = new Vec2();
29
25
30
26
/**
31
27
* The body2 angle minus body1 angle in the reference state (radians).
32
28
*/
33
-
public float referenceAngle;
29
+
public float referenceAngle = 0f;
34
30
35
31
/**
36
32
* The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0.
37
33
*/
38
-
public float frequencyHz;
34
+
public float frequencyHz = 0f;
39
35
40
36
/**
41
37
* The damping ratio. 0 = no damping, 1 = critical damping.
42
38
*/
43
-
public float dampingRatio;
44
-
45
-
public WeldJointDef() {
46
-
localAnchorA = new Vec2();
47
-
localAnchorB = new Vec2();
48
-
referenceAngle = 0.0f;
49
-
}
39
+
public float dampingRatio = 0f;
50
40
51
41
/**
52
42
* Initialize the bodies, anchors, and reference angle using a world anchor point.
53
-
*
54
-
* @param bA
55
-
* @param bB
56
-
* @param anchor
57
43
*/
58
44
public void initialize(Body bA, Body bB, Vec2 anchor) {
59
45
setBodyA(bA);
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4