# meshula/opensteer architecture

> Architecture diagram of the GitHub repository meshula/opensteer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/meshula/opensteer
- Repository: https://github.com/meshula/opensteer

## Overview

OpenSteer is a C++ steering-behavior toolkit and interactive OpenGL demo for autonomous characters. The user selects a plug-in, runs or steps its simulation, chooses and tracks vehicles, and views annotated behavior. The graph preserves the documented behavior-prototyping workflow, vehicle/steering toolkit, path queries, proximity support, and visualization. Source evidence is partial: some relationships are documented in the README or SOURCE INDEX, while unsampled plug-in details are represented only at their existing paths.

Main entry points: [`include/OpenSteer/PlugIn.h`](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/PlugIn.h) (Plug-in framework), [`include/OpenSteer/SimpleVehicle.h`](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/SimpleVehicle.h) (Simple vehicle), [`src/OpenSteerDemo.cpp`](https://github.com/meshula/opensteer/blob/master/src/OpenSteerDemo.cpp) (OpenSteerDemo), [`plugins/Pedestrian.cpp`](https://github.com/meshula/opensteer/blob/master/plugins/Pedestrian.cpp) (Pedestrian scenarios)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Interactive demo"]
  node_demo_app["OpenSteerDemo<br/>[OpenSteerDemo.cpp]"]
  node_entry["Application entry<br/>[main.cpp]"]
  node_plugin_framework["Plug-in framework<br/>[PlugIn.h]"]
  node_clock["Simulation clock<br/>[Clock.cpp]"]
  node_camera["Tracking camera<br/>[Camera.cpp]"]
end

subgraph group_behaviors["Behavior examples"]
  node_boids["Boids<br/>[Boids.cpp]"]
  node_ctf["Capture the Flag<br/>[CaptureTheFlag.cpp]"]
  node_pedestrian["Pedestrian scenarios<br/>[Pedestrian.cpp]"]
  node_eight["Eight-walk scenario"]
  node_mapdrive["MapDrive scenario<br/>[MapDrive.cpp]"]
  node_other_plugins["Other behavior examples"]
end

subgraph group_vehicle["Vehicles and steering"]
  node_simple_vehicle["Simple vehicle<br/>[SimpleVehicle.h]"]
  node_steering["Steering behaviors<br/>[SteerLibrary.h]"]
  node_vehicle_base["Vehicle interface<br/>[AbstractVehicle.h]"]
end

subgraph group_paths["Paths and spatial queries"]
  node_pathway["Segmented pathways"]
  node_polyline["Polyline paths"]
  node_path_mapping["Path mapping<br/>[QueryPathAlike.h]"]
  node_path_policies["Path extraction policies"]
  node_path_mapping_types["Mapping types"]
  node_proximity["Proximity queries<br/>[Proximity.h]"]
end

subgraph group_visuals["Visualization"]
  node_annotation["Annotations<br/>[Annotation.h]"]
  node_draw_api["Drawing API<br/>[Draw.h]"]
  node_draw_impl["OpenGL drawing<br/>[Draw.cpp]"]
  node_color["Colors<br/>[Color.h]"]
end

node_programmer(("AI programmer"))

node_programmer -->|"creates plug-in"| node_plugin_framework
node_entry -->|"starts demo"| node_demo_app
node_demo_app -->|"selects plug-in"| node_plugin_framework
node_demo_app -->|"tracks time"| node_clock
node_demo_app -->|"tracks vehicle"| node_camera
node_plugin_framework -.->|"runs behavior"| node_boids
node_plugin_framework -.->|"runs behavior"| node_ctf
node_plugin_framework -.->|"runs behavior"| node_pedestrian
node_plugin_framework -.->|"runs behavior"| node_eight
node_plugin_framework -.->|"runs behavior"| node_mapdrive
node_plugin_framework -.->|"runs behavior"| node_other_plugins
node_simple_vehicle -->|"extends"| node_vehicle_base
node_simple_vehicle -->|"uses"| node_steering
node_pedestrian -->|"uses"| node_simple_vehicle
node_eight -->|"uses"| node_simple_vehicle
node_ctf -->|"uses"| node_simple_vehicle
node_mapdrive -->|"uses"| node_simple_vehicle
node_pedestrian -->|"queries neighbors"| node_proximity
node_eight -->|"queries neighbors"| node_proximity
node_eight -->|"uses pathway"| node_pathway
node_pedestrian -->|"uses pathway"| node_pathway
node_mapdrive -->|"queries path"| node_path_mapping
node_pathway -.->|"uses segments"| node_polyline
node_path_mapping -->|"extracts data"| node_path_policies
node_path_mapping -->|"fills mapping"| node_path_mapping_types
node_annotation -->|"requests drawing"| node_draw_api
node_draw_api -.->|"implements"| node_draw_impl
node_demo_app -->|"redraws scene"| node_draw_api
node_draw_impl -.->|"uses colors"| node_color

click node_demo_app "https://github.com/meshula/opensteer/blob/master/src/OpenSteerDemo.cpp"
click node_entry "https://github.com/meshula/opensteer/blob/master/src/main.cpp"
click node_plugin_framework "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/PlugIn.h"
click node_clock "https://github.com/meshula/opensteer/blob/master/src/Clock.cpp"
click node_camera "https://github.com/meshula/opensteer/blob/master/src/Camera.cpp"
click node_boids "https://github.com/meshula/opensteer/blob/master/plugins/Boids.cpp"
click node_ctf "https://github.com/meshula/opensteer/blob/master/plugins/CaptureTheFlag.cpp"
click node_pedestrian "https://github.com/meshula/opensteer/blob/master/plugins/Pedestrian.cpp"
click node_eight "https://github.com/meshula/opensteer/blob/master/plugins/PedestriansWalkingAnEight.cpp"
click node_mapdrive "https://github.com/meshula/opensteer/blob/master/plugins/MapDrive.cpp"
click node_other_plugins "https://github.com/meshula/opensteer/tree/master/plugins"
click node_simple_vehicle "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/SimpleVehicle.h"
click node_steering "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/SteerLibrary.h"
click node_vehicle_base "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/AbstractVehicle.h"
click node_pathway "https://github.com/meshula/opensteer/blob/master/src/SegmentedPathway.cpp"
click node_polyline "https://github.com/meshula/opensteer/blob/master/src/PolylineSegmentedPath.cpp"
click node_path_mapping "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/QueryPathAlike.h"
click node_path_policies "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/QueryPathAlikeBaseDataExtractionPolicies.h"
click node_path_mapping_types "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/QueryPathAlikeMappings.h"
click node_proximity "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Proximity.h"
click node_annotation "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Annotation.h"
click node_draw_api "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Draw.h"
click node_draw_impl "https://github.com/meshula/opensteer/blob/master/src/Draw.cpp"
click node_color "https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Color.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_demo_app,node_entry,node_plugin_framework,node_clock,node_camera toneBlue
class node_boids,node_ctf,node_pedestrian,node_eight,node_mapdrive,node_other_plugins toneAmber
class node_simple_vehicle,node_steering,node_vehicle_base toneMint
class node_pathway,node_polyline,node_path_mapping,node_path_policies,node_path_mapping_types,node_proximity toneRose
class node_annotation,node_draw_api,node_draw_impl,node_color,node_programmer toneIndigo
```

## Components

### Interactive demo

- [OpenSteerDemo](https://github.com/meshula/opensteer/blob/master/src/OpenSteerDemo.cpp): `src/OpenSteerDemo.cpp`
- [Application entry](https://github.com/meshula/opensteer/blob/master/src/main.cpp): `src/main.cpp`
- [Plug-in framework](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/PlugIn.h): `include/OpenSteer/PlugIn.h`
- [Simulation clock](https://github.com/meshula/opensteer/blob/master/src/Clock.cpp): `src/Clock.cpp`
- [Tracking camera](https://github.com/meshula/opensteer/blob/master/src/Camera.cpp): `src/Camera.cpp`

### Behavior examples

- [Boids](https://github.com/meshula/opensteer/blob/master/plugins/Boids.cpp): `plugins/Boids.cpp`
- [Capture the Flag](https://github.com/meshula/opensteer/blob/master/plugins/CaptureTheFlag.cpp): `plugins/CaptureTheFlag.cpp`
- [Pedestrian scenarios](https://github.com/meshula/opensteer/blob/master/plugins/Pedestrian.cpp): `plugins/Pedestrian.cpp`
- [Eight-walk scenario](https://github.com/meshula/opensteer/blob/master/plugins/PedestriansWalkingAnEight.cpp): `plugins/PedestriansWalkingAnEight.cpp`
- [MapDrive scenario](https://github.com/meshula/opensteer/blob/master/plugins/MapDrive.cpp): `plugins/MapDrive.cpp`
- [Other behavior examples](https://github.com/meshula/opensteer/tree/master/plugins): `plugins`

### Vehicles and steering

- [Simple vehicle](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/SimpleVehicle.h): `include/OpenSteer/SimpleVehicle.h`
- [Steering behaviors](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/SteerLibrary.h): `include/OpenSteer/SteerLibrary.h`
- [Vehicle interface](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/AbstractVehicle.h): `include/OpenSteer/AbstractVehicle.h`

### Paths and spatial queries

- [Segmented pathways](https://github.com/meshula/opensteer/blob/master/src/SegmentedPathway.cpp): `src/SegmentedPathway.cpp`
- [Polyline paths](https://github.com/meshula/opensteer/blob/master/src/PolylineSegmentedPath.cpp): `src/PolylineSegmentedPath.cpp`
- [Path mapping](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/QueryPathAlike.h): `include/OpenSteer/QueryPathAlike.h`
- [Path extraction policies](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/QueryPathAlikeBaseDataExtractionPolicies.h): `include/OpenSteer/QueryPathAlikeBaseDataExtractionPolicies.h`
- [Mapping types](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/QueryPathAlikeMappings.h): `include/OpenSteer/QueryPathAlikeMappings.h`
- [Proximity queries](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Proximity.h): `include/OpenSteer/Proximity.h`

### Visualization

- [Annotations](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Annotation.h): `include/OpenSteer/Annotation.h`
- [Drawing API](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Draw.h): `include/OpenSteer/Draw.h`
- [OpenGL drawing](https://github.com/meshula/opensteer/blob/master/src/Draw.cpp): `src/Draw.cpp`
- [Colors](https://github.com/meshula/opensteer/blob/master/include/OpenSteer/Color.h): `include/OpenSteer/Color.h`

### Other components

- **AI programmer**

## Connections

- AI programmer → Plug-in framework: creates plug-in
- Application entry → OpenSteerDemo: starts demo (evidence: `src/main.cpp`)
- OpenSteerDemo → Plug-in framework: selects plug-in
- OpenSteerDemo → Simulation clock: tracks time
- OpenSteerDemo → Tracking camera: tracks vehicle
- Plug-in framework → Boids: runs behavior
- Plug-in framework → Capture the Flag: runs behavior
- Plug-in framework → Pedestrian scenarios: runs behavior
- Plug-in framework → Eight-walk scenario: runs behavior
- Plug-in framework → MapDrive scenario: runs behavior
- Plug-in framework → Other behavior examples: runs behavior
- Simple vehicle → Vehicle interface: extends (evidence: `include/OpenSteer/SimpleVehicle.h`)
- Simple vehicle → Steering behaviors: uses (evidence: `include/OpenSteer/SimpleVehicle.h`)
- Pedestrian scenarios → Simple vehicle: uses (evidence: `plugins/Pedestrian.cpp`)
- Eight-walk scenario → Simple vehicle: uses (evidence: `plugins/PedestriansWalkingAnEight.cpp`)
- Capture the Flag → Simple vehicle: uses (evidence: `plugins/CaptureTheFlag.cpp`)
- MapDrive scenario → Simple vehicle: uses (evidence: `plugins/MapDrive.cpp`)
- Pedestrian scenarios → Proximity queries: queries neighbors (evidence: `plugins/Pedestrian.cpp`)
- Eight-walk scenario → Proximity queries: queries neighbors (evidence: `plugins/PedestriansWalkingAnEight.cpp`)
- Eight-walk scenario → Segmented pathways: uses pathway (evidence: `plugins/PedestriansWalkingAnEight.cpp`)
- Pedestrian scenarios → Segmented pathways: uses pathway (evidence: `plugins/Pedestrian.cpp`)
- MapDrive scenario → Path mapping: queries path (evidence: `plugins/MapDrive.cpp`)
- Segmented pathways → Polyline paths: uses segments
- Path mapping → Path extraction policies: extracts data (evidence: `include/OpenSteer/QueryPathAlike.h`)
- Path mapping → Mapping types: fills mapping (evidence: `include/OpenSteer/QueryPathAlikeMappings.h`)
- Annotations → Drawing API: requests drawing (evidence: `include/OpenSteer/Annotation.h`)
- Drawing API → OpenGL drawing: implements (evidence: `src/Draw.cpp`)
- OpenSteerDemo → Drawing API: redraws scene
- OpenGL drawing → Colors: uses colors
