-
-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
48 deletions.
There are no files selected for viewing
23 changes: 0 additions & 23 deletions
23
fxgl-entity/src/main/java/com/almasb/fxgl/physics/box2d/collision/DistanceInput.java
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
fxgl-entity/src/main/java/com/almasb/fxgl/physics/box2d/collision/DistanceOutput.java
This file was deleted.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
fxgl-entity/src/main/kotlin/com/almasb/fxgl/physics/box2d/collision/DistanceData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* FXGL - JavaFX Game Library. The MIT License (MIT). | ||
* Copyright (c) AlmasB (almaslvl@gmail.com). | ||
* See LICENSE for details. | ||
*/ | ||
|
||
package com.almasb.fxgl.physics.box2d.collision | ||
|
||
import com.almasb.fxgl.core.math.Vec2 | ||
import com.almasb.fxgl.physics.box2d.collision.Distance.DistanceProxy | ||
import com.almasb.fxgl.physics.box2d.common.Transform | ||
|
||
/** | ||
* | ||
* @author Almas Baimagambetov (almaslvl@gmail.com) | ||
*/ | ||
|
||
/** | ||
* Input for Distance with the option to use the shape radii in the computation. | ||
*/ | ||
internal class DistanceInput { | ||
|
||
@JvmField | ||
var proxyA = DistanceProxy() | ||
|
||
@JvmField | ||
var proxyB = DistanceProxy() | ||
|
||
@JvmField | ||
var transformA = Transform() | ||
|
||
@JvmField | ||
var transformB = Transform() | ||
|
||
@JvmField | ||
var useRadii = false | ||
} | ||
|
||
/** | ||
* Output for Distance. | ||
*/ | ||
internal class DistanceOutput { | ||
|
||
/** | ||
* Closest point on shapeA. | ||
*/ | ||
@JvmField | ||
val pointA = Vec2() | ||
|
||
/** | ||
* Closest point on shapeB. | ||
*/ | ||
@JvmField | ||
val pointB = Vec2() | ||
|
||
@JvmField | ||
var distance = 0f | ||
|
||
/** | ||
* Number of gjk iterations used. | ||
*/ | ||
@JvmField | ||
var iterations = 0 | ||
} |