File tree Expand file tree Collapse file tree 3 files changed +64
-48
lines changed
java/com/almasb/fxgl/physics/box2d/collision
kotlin/com/almasb/fxgl/physics/box2d/collision Expand file tree Collapse file tree 3 files changed +64
-48
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ /*
2
+ * FXGL - JavaFX Game Library. The MIT License (MIT).
3
+ * Copyright (c) AlmasB (almaslvl@gmail.com).
4
+ * See LICENSE for details.
5
+ */
6
+
7
+ package com.almasb.fxgl.physics.box2d.collision
8
+
9
+ import com.almasb.fxgl.core.math.Vec2
10
+ import com.almasb.fxgl.physics.box2d.collision.Distance.DistanceProxy
11
+ import com.almasb.fxgl.physics.box2d.common.Transform
12
+
13
+ /* *
14
+ *
15
+ * @author Almas Baimagambetov (almaslvl@gmail.com)
16
+ */
17
+
18
+ /* *
19
+ * Input for Distance with the option to use the shape radii in the computation.
20
+ */
21
+ internal class DistanceInput {
22
+
23
+ @JvmField
24
+ var proxyA = DistanceProxy ()
25
+
26
+ @JvmField
27
+ var proxyB = DistanceProxy ()
28
+
29
+ @JvmField
30
+ var transformA = Transform ()
31
+
32
+ @JvmField
33
+ var transformB = Transform ()
34
+
35
+ @JvmField
36
+ var useRadii = false
37
+ }
38
+
39
+ /* *
40
+ * Output for Distance.
41
+ */
42
+ internal class DistanceOutput {
43
+
44
+ /* *
45
+ * Closest point on shapeA.
46
+ */
47
+ @JvmField
48
+ val pointA = Vec2 ()
49
+
50
+ /* *
51
+ * Closest point on shapeB.
52
+ */
53
+ @JvmField
54
+ val pointB = Vec2 ()
55
+
56
+ @JvmField
57
+ var distance = 0f
58
+
59
+ /* *
60
+ * Number of gjk iterations used.
61
+ */
62
+ @JvmField
63
+ var iterations = 0
64
+ }
You can’t perform that action at this time.
0 commit comments