@@ -213,6 +213,7 @@ struct SceneOptions{F <: Modia3D.VarFloatType}
213213 # ## Animation and Visualization ###
214214 enableVisualization:: Bool # = true, if online animation is enabled
215215 animationFile:: Union{Nothing,String} # path&name of animation file
216+ provideAnimationHistory:: Bool # = true, if animationDict shall be provided
216217 visualizeFrames:: Bool # = true, if all frames shall be visualized
217218 visualizeBoundingBox:: Bool # = true, if AABB's are visualized
218219 visualizeContactPoints:: Bool # = true, if contact points shall be visualized
@@ -238,6 +239,7 @@ struct SceneOptions{F <: Modia3D.VarFloatType}
238239 gap = 0.001 ,
239240 enableVisualization = true ,
240241 animationFile = nothing ,
242+ provideAnimationHistory = false ,
241243 visualizeFrames = false ,
242244 visualizeBoundingBox = false ,
243245 visualizeContactPoints = false ,
@@ -271,6 +273,7 @@ struct SceneOptions{F <: Modia3D.VarFloatType}
271273 gap,
272274 enableVisualization,
273275 animationFile,
276+ provideAnimationHistory,
274277 visualizeFrames,
275278 visualizeBoundingBox,
276279 visualizeContactPoints,
@@ -315,6 +318,7 @@ Defines global properties of the system, such as the gravity field. Exactly one
315318| `gravityField` | UniformGravity(g=9.81, n=[0,-1,0]) |
316319| `enableVisualization` | true |
317320| `animationFile` | nothing (e.g. animationFile = "animation.json") |
321+ | `provideAnimationHistory` | false |
318322| `enableContactDetection` | true |
319323| `elasticContactReductionFactor` | 1.0 (> 0.0, <= 1.0) |
320324| `maximumContactDamping` | 2000.0 |
@@ -423,10 +427,11 @@ mutable struct Scene{F <: Modia3D.VarFloatType} <: Modia3D.AbstractScene
423427 AABB:: Vector{Vector{Basics.BoundingBox{F}}} # Bounding boxes of elements that can collide
424428 zStartIndex:: Int # start index of collision zero crossing functions
425429 forceElements:: Vector{Modia3D.AbstractForceElement}
430+ provideAnimationData:: Bool # = true, if animation data shall be provided
426431 exportAnimation:: Bool # animation file export is enabled
427432 animation:: Vector{animationStep} # animation data of visible Object3Ds
428433 outputCounter:: Int64 # animation/visualization output step counter
429-
434+
430435 # Data specific to a particular joint type
431436 revolute:: Vector{Revolute{F}}
432437 prismatic:: Vector{Prismatic{F}}
@@ -442,6 +447,7 @@ mutable struct Scene{F <: Modia3D.VarFloatType} <: Modia3D.AbstractScene
442447 gap = 0.001 ,
443448 enableVisualization = true ,
444449 animationFile = nothing ,
450+ provideAnimationHistory = false ,
445451 visualizeFrames = false ,
446452 visualizeBoundingBox = false ,
447453 visualizeContactPoints = false ,
@@ -470,6 +476,7 @@ mutable struct Scene{F <: Modia3D.VarFloatType} <: Modia3D.AbstractScene
470476 defaultFrameLength = defaultFrameLength,
471477 enableVisualization = enableVisualization,
472478 animationFile = animationFile,
479+ provideAnimationHistory = provideAnimationHistory,
473480 visualizeFrames = visualizeFrames,
474481 visualizeBoundingBox = visualizeBoundingBox,
475482 visualizeContactPoints = visualizeContactPoints,
@@ -482,10 +489,12 @@ mutable struct Scene{F <: Modia3D.VarFloatType} <: Modia3D.AbstractScene
482489 lightLatitude = lightLatitude)
483490
484491 exportAnimation = false
492+ provideAnimationData = provideAnimationHistory
485493 if ! isnothing (sceneOptions. animationFile)
486494 (base, ext) = splitext (sceneOptions. animationFile)
487495 if ext == " .json"
488496 exportAnimation = true
497+ provideAnimationData = true
489498 else
490499 @warn (" Extension of animationFile=$(sceneOptions. animationFile) is not 'json'.\n -> Animation export is disabled." )
491500 end
@@ -515,6 +524,7 @@ mutable struct Scene{F <: Modia3D.VarFloatType} <: Modia3D.AbstractScene
515524 Vector{Vector{Basics. BoundingBox{F}}}[],
516525 1 ,
517526 Vector{Modia3D. AbstractForceElement}[],
527+ provideAnimationData,
518528 exportAnimation,
519529 Vector{animationStep}[],
520530 0 ,
0 commit comments