forked from kscience/visionforge
BM@N and fixes
This commit is contained in:
parent
4b91e5d62b
commit
af2539eed2
@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.builtins.ListSerializer
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonArray
|
||||
import space.kscience.visionforge.solid.Float32Vector3D
|
||||
|
||||
|
||||
@Serializable
|
||||
@ -16,6 +17,8 @@ public data class FairTrackParam(
|
||||
val fQp: Double,
|
||||
)
|
||||
|
||||
public fun FairTrackParam.toVector(): Float32Vector3D = Float32Vector3D(fX,fY,fZ)
|
||||
|
||||
@Serializable
|
||||
public data class CbmStsTrack(
|
||||
val fParamFirst: FairTrackParam,
|
||||
|
@ -4,16 +4,14 @@ import ru.mipt.npm.root.BMN
|
||||
import ru.mipt.npm.root.DGeoManager
|
||||
import ru.mipt.npm.root.rootGeo
|
||||
import ru.mipt.npm.root.serialization.TGeoManager
|
||||
import ru.mipt.npm.root.toVector
|
||||
import space.kscience.dataforge.meta.Meta
|
||||
import space.kscience.dataforge.meta.get
|
||||
import space.kscience.dataforge.meta.isLeaf
|
||||
import space.kscience.dataforge.meta.string
|
||||
import space.kscience.visionforge.Colors
|
||||
import space.kscience.visionforge.html.ResourceLocation
|
||||
import space.kscience.visionforge.solid.Solids
|
||||
import space.kscience.visionforge.solid.ambientLight
|
||||
import space.kscience.visionforge.solid.invoke
|
||||
import space.kscience.visionforge.solid.solid
|
||||
import space.kscience.visionforge.solid.*
|
||||
import java.util.zip.ZipInputStream
|
||||
import kotlin.io.path.Path
|
||||
import kotlin.io.path.writeText
|
||||
@ -52,6 +50,30 @@ fun main() {
|
||||
rootGeo(geo,"BM@N", ignoreRootColors = true).also {
|
||||
Path("data/BM@N.vf.json").writeText(Solids.encodeToString(it))
|
||||
}
|
||||
|
||||
solidGroup("cbmStsTracks") {
|
||||
events.cbmTracks.forEach { track ->
|
||||
polyline(
|
||||
track.fParamFirst.toVector(),
|
||||
track.fParamLast.toVector()
|
||||
) {
|
||||
thickness = 2.0
|
||||
color(Colors.blue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
solidGroup("bmnGlobalTracks") {
|
||||
events.bmnGlobalTracks.forEach { track ->
|
||||
polyline(
|
||||
track.fParamFirst.toVector(),
|
||||
track.fParamLast.toVector()
|
||||
) {
|
||||
thickness = 2.0
|
||||
color(Colors.red)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user