Skip to content

Commit

Permalink
fixed trajectory sampling, tried to get rid of strange sgGrouped sort…
Browse files Browse the repository at this point in the history
…ed rendering (to enable depth tested trajectories)
  • Loading branch information
haraldsteinlechner committed Aug 29, 2024
1 parent 0e05a0d commit 8bb0349
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
7 changes: 3 additions & 4 deletions src/PRo3D.Core/Gis/GisApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -734,12 +734,11 @@ module GisApp =
let timeSteps =
time
|> AVal.map (fun endTime ->
let samplingInterval = TimeSpan.FromHours 1.0
let steps = 1000
let trajectoryDuration = TimeSpan.FromDays 1.0
let startTime = endTime - trajectoryDuration
//let timeSteps = (endTime - startTime) / samplingInterval
// could be [| startTime .. samplingRate .. endTime |] if TimeSpan would have get_Zero static member...
Array.init 8000 (fun i -> startTime + samplingInterval * float i)
// could be [| startTime .. samplingDistance .. endTime |] if TimeSpan would have get_Zero static member...
Array.init steps (fun i -> endTime - ((endTime - startTime) / float steps) * float i)
)

let bodyTrajectoryLines =
Expand Down
1 change: 1 addition & 0 deletions src/PRo3D.Viewer/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"profiles": {
"PRo3D.Viewer": {
"commandName": "Project",
"commandLineArgs": "--defaultSpiceKernel \"F:\\pro3d\\PRo3D.SPICE\\spice_kernels\\kernels\\mk\\hera_crema_2_0_LPC_ECP_PDP.tm\"",
"nativeDebugging": true
},
"PRo3D.Viewer.Provex": {
Expand Down
13 changes: 2 additions & 11 deletions src/PRo3D.Viewer/Viewer/Viewer-Utils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,17 +1034,8 @@ module ViewerUtils =

yield RenderCommand.SceneGraph sg

//if i = c then //now gets rendered multiple times
// assign priorities globally, or for each anno and make sets
let depthTested =
last
|> AVal.map (function
| Some e when System.Object.ReferenceEquals(e,set) -> depthTested
| _ -> Sg.empty
)
yield RenderCommand.SceneGraph (depthTested |> Sg.dynamic)

yield Aardvark.UI.RenderCommand.Clear(None,Some (AVal.constant 1.0), None)
yield RenderCommand.SceneGraph depthTested
yield Aardvark.UI.RenderCommand.Clear(None,Some (AVal.constant 1.0), None)

yield RenderCommand.SceneGraph overlayed

Expand Down

0 comments on commit 8bb0349

Please sign in to comment.