Inspector¤
compas_model.viewer.inspector
¤
Classes¤
ElementInspector
¤
ElementInspector(controller: ModelViewer)
Read-only inspector for selected model elements.
Methods:¤
inspect
¤
Display structured information for selected elements.
inspect_contact
¤
inspect_contact(selection: InspectableInteraction | None) -> None
Display a selected contact pair or its selected regions.
InspectableInteraction
¤
Data required by the selection inspector for an interaction.
InspectorSection
dataclass
¤
Named collection of read-only inspector rows.
Functions:¤
inspect_elements
¤
inspect_elements(
controller: ModelViewer, elements: Iterable[Element]
) -> tuple[InspectorSection, ...]
Build read-only inspector data for selected elements.
Parameters:
-
controller(ModelViewer) –Controller containing the corresponding scene objects.
-
elements(Iterable[Element]) –Selected model elements.
Returns:
-
tuple[InspectorSection, ...]–Structured rows suitable for a GUI or textual report.
install_element_inspector
¤
install_element_inspector(controller: ModelViewer) -> ElementInspector
Add an element and interaction inspector to the viewer sidebar.