Karana.KUtils.MultibodyTUI.mbody#
Attributes#
Classes#
Full state of the MultibodyTUI |
|
A terminal user interface (TUI) to examine a multibody |
Functions#
|
Construct a string indicating the selected choice from a list |
Module Contents#
- Karana.KUtils.MultibodyTUI.mbody.VizMode#
- Karana.KUtils.MultibodyTUI.mbody.VizModeCycler#
- Karana.KUtils.MultibodyTUI.mbody.choice_display_str(choice: Any, choices: list[Any]) str[source]#
Construct a string indicating the selected choice from a list
- Parameters:
choice (Any) – The currently selected choice
choices (list[Any]) – A list of candidate choices
- Returns:
A string listing choices, emphasizing any that equal choice
- Return type:
str
- Karana.KUtils.MultibodyTUI.mbody.ViewTag#
- class Karana.KUtils.MultibodyTUI.mbody.State[source]#
Full state of the MultibodyTUI
The TUI generally works by copying this state and pushing a modified copy to the StateHistory stack. Separately the TUI can redraw its terminal output and update the graphics window based on the current State instance.
- frame_view: Karana.KUtils.MultibodyTUI.view.View[Karana.Frame.Frame]#
- loop_constraint_view: Karana.KUtils.MultibodyTUI.view.View[Karana.Dynamics.LoopConstraintBase]#
- viz_mask: int#
- viz: VizModeCycler#
- view_tag: ViewTag = 'body'#
- show_frame_axes: bool = True#
- swing_config: Karana.KUtils.MultibodyTUI.swing.SwingConfig#
- property view#
The current view
- replace_view(view: Karana.KUtils.MultibodyTUI.view.View)[source]#
Copy the full state replacing the current view
- class Karana.KUtils.MultibodyTUI.mbody.MultibodyTUI(multibody, *, run=True, highlight: Karana.Scene.Scene_types.MaterialType | Karana.Scene.Color = Color.YELLOW, axes_size: float = 10)[source]#
Bases:
Karana.KUtils.MultibodyTUI.base.TUIBaseA terminal user interface (TUI) to examine a multibody
- multibody#
- graph_adapters: collections.abc.Mapping[ViewTag, GraphAdapter]#
- loopdb#
- hist#
- notify#
- highlighter#
- highlighter2#
- loop_lines#
- frame_lines#
- frame_axes#
- swing_manager#