Change trajectory package
This commit is contained in:
parent
3fc52dd60f
commit
cdaa17a3b9
@ -10,7 +10,7 @@ val kmathVersion: String by extra("0.3.1-dev-RC")
|
||||
|
||||
allprojects {
|
||||
group = "center.sciprog"
|
||||
version = "0.2.2-dev-11"
|
||||
version = "0.2.2-dev-12"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
@ -9,9 +9,7 @@ val ktorVersion: String by rootProject.extra
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(11)
|
||||
jvm {
|
||||
withJava()
|
||||
}
|
||||
jvm()
|
||||
sourceSets {
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
|
@ -8,12 +8,8 @@ plugins {
|
||||
val ktorVersion: String by rootProject.extra
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
}
|
||||
withJava()
|
||||
}
|
||||
jvm()
|
||||
jvmToolchain(11)
|
||||
sourceSets {
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
|
@ -8,12 +8,8 @@ plugins {
|
||||
val ktorVersion: String by rootProject.extra
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
}
|
||||
withJava()
|
||||
}
|
||||
jvm()
|
||||
jvmToolchain(11)
|
||||
sourceSets {
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
|
@ -25,7 +25,7 @@ public fun SchemeView(
|
||||
state: XYViewScope,
|
||||
features: FeatureGroup<XY>,
|
||||
modifier: Modifier = Modifier.fillMaxSize(),
|
||||
) = key(state, features) {
|
||||
): Unit = key(state, features) {
|
||||
with(state) {
|
||||
//Can't do that inside canvas
|
||||
val painterCache: Map<PainterFeature<XY>, Painter> =
|
||||
|
@ -18,7 +18,7 @@ import java.awt.Color as AWTColor
|
||||
public class SvgDrawScope(
|
||||
private val graphics: SVGGraphics2D,
|
||||
size: Size,
|
||||
val defaultStrokeWidth: Float = 1f,
|
||||
private val defaultStrokeWidth: Float = 1f,
|
||||
) : DrawScope {
|
||||
|
||||
override val layoutDirection: LayoutDirection
|
||||
@ -459,7 +459,7 @@ public class SvgDrawScope(
|
||||
}
|
||||
}
|
||||
|
||||
fun drawText(
|
||||
public fun drawText(
|
||||
text: String,
|
||||
x: Float,
|
||||
y: Float,
|
||||
|
@ -18,18 +18,18 @@ import java.awt.Font.PLAIN
|
||||
import kotlin.math.abs
|
||||
|
||||
|
||||
class FeatureStateSnapshot<T : Any>(
|
||||
val features: Map<String, Feature<T>>,
|
||||
val painterCache: Map<PainterFeature<T>, Painter>,
|
||||
public class FeatureStateSnapshot<T : Any>(
|
||||
public val features: Map<String, Feature<T>>,
|
||||
internal val painterCache: Map<PainterFeature<T>, Painter>,
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun <T : Any> FeatureGroup<T>.snapshot(): FeatureStateSnapshot<T> = FeatureStateSnapshot(
|
||||
public fun <T : Any> FeatureGroup<T>.snapshot(): FeatureStateSnapshot<T> = FeatureStateSnapshot(
|
||||
featureMap,
|
||||
features.filterIsInstance<PainterFeature<T>>().associateWith { it.getPainter() }
|
||||
)
|
||||
|
||||
fun FeatureStateSnapshot<XY>.generateSvg(
|
||||
public fun FeatureStateSnapshot<XY>.generateSvg(
|
||||
viewPoint: ViewPoint<XY>,
|
||||
width: Double,
|
||||
height: Double,
|
||||
@ -174,7 +174,7 @@ fun FeatureStateSnapshot<XY>.generateSvg(
|
||||
return svgGraphics2D.getSVGElement(id)
|
||||
}
|
||||
|
||||
fun FeatureStateSnapshot<XY>.exportToSvg(
|
||||
public fun FeatureStateSnapshot<XY>.exportToSvg(
|
||||
viewPoint: ViewPoint<XY>,
|
||||
width: Double,
|
||||
height: Double,
|
||||
|
@ -3,11 +3,11 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import space.kscience.kmath.geometry.*
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace.distanceTo
|
||||
import space.kscience.kmath.trajectory.Trajectory2D.*
|
||||
import space.kscience.trajectory.Trajectory2D.*
|
||||
import kotlin.math.acos
|
||||
|
||||
internal fun DubinsPose2D.getLeftCircle(radius: Double): Circle2D = getTangentCircles(radius).first
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
@file:UseSerializers(Euclidean2DSpace.VectorSerializer::class)
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.SerialName
|
@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import space.kscience.kmath.geometry.*
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace.distanceTo
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
@file:UseSerializers(Euclidean2DSpace.VectorSerializer::class)
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace
|
||||
import space.kscience.kmath.geometry.equalsFloat
|
@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import space.kscience.kmath.geometry.Circle2D
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace.vector
|
@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import space.kscience.kmath.geometry.Circle2D
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace
|
@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory
|
||||
package space.kscience.trajectory
|
||||
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace
|
||||
import space.kscience.kmath.geometry.equalsFloat
|
@ -3,14 +3,14 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory.segments
|
||||
package space.kscience.trajectory.segments
|
||||
|
||||
import space.kscience.kmath.geometry.Circle2D
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace
|
||||
import space.kscience.kmath.geometry.circumference
|
||||
import space.kscience.kmath.geometry.degrees
|
||||
import space.kscience.kmath.trajectory.CircleTrajectory2D
|
||||
import space.kscience.kmath.trajectory.Trajectory2D
|
||||
import space.kscience.trajectory.CircleTrajectory2D
|
||||
import space.kscience.trajectory.Trajectory2D
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory.segments
|
||||
package space.kscience.trajectory.segments
|
||||
|
||||
import space.kscience.kmath.geometry.Circle2D
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace
|
@ -3,11 +3,11 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package space.kscience.kmath.trajectory.segments
|
||||
package space.kscience.trajectory.segments
|
||||
|
||||
import space.kscience.kmath.geometry.Euclidean2DSpace
|
||||
import space.kscience.kmath.geometry.degrees
|
||||
import space.kscience.kmath.trajectory.StraightTrajectory2D
|
||||
import space.kscience.trajectory.StraightTrajectory2D
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.sqrt
|
||||
import kotlin.test.Test
|
Loading…
Reference in New Issue
Block a user