Animations#
In SAMSON, an animation is a document node that is a part of a presentation (SBDDocumentPresentation) and that describes a change over time.
Use animations as part of presentations when your extension needs to drive timed behavior such as moving nodes, revealing content, changing the camera, or building other complex presentation workflow. Animations are not just transient effects: they are represented as nodes in the presentation node and can therefore participate in presentation / visualization workflows.
Key class#
The main class is SBDDocumentAnimation.
Animations are part of the document/data graph layer, which makes them suitable for:
- persistent presentation sequences
- replayable camera motions
- timed transformations of selected nodes
- scripted or UI-created scientific demonstrations
Mental model#
An animation usually targets one or more nodes and applies a category-specific change over a frame interval.
Depending on the concrete derived class, that change may be:
- a node motion
- an entrance or exit effect
- a camera movement
- another presentation-related change
Because animations are first-class objects, you can create them, organize them, serialize them, and expose them through SAMSON mechanisms just like other document content.
When to implement custom animations#
Create a custom animation when your extension needs a reusable timed behavior that users can apply or replay.
Typical examples:
- animate a docking or undocking process
- record and replay a trajectory path
- create a camera fly-through for a scientific presentation
- reveal a custom model progressively over time
If you only need a one-off immediate state change, an animation may be unnecessary. In that case, a command, editor, or simulator step is often a better fit.
Example scenario#
Suppose your extension computes a morph between two conformations. A custom animation can:
- store the target nodes
- expose timing and easing parameters
- update the visual or structural state as the current frame changes
That makes the result reusable in a presentation rather than being a single irreversible command.
See also#
- User Guide: Presenting and animating
- User Guide: Animations
- Introspection if the animation should be discoverable and instantiable through SAMSON