openOMSI GitHub Discord

Docs / The project / Architecture

Coordinate frames

1 min readEdit this pagedocs/ARCHITECTURE.md

  • World: x east, y north, z up, metres; headings in degrees clockwise from north.
  • .cfg files (cameras, positions, animations): x right, y forward, z up.
  • Mesh files (.o3d/.x): Direct3D frame, converted on load (omsi-geometry::mesh_from_o3d). A DirectX .x FrameTransformMatrix is row-major for row vectors, which read column by column is already glam's column-vector matrix (no transpose); normals go by the inverse transpose.
  • Vehicle frame = the .cfg frame (x right, y forward, z up), origin at the model's z = 0: the plane the tyres touch with the springs unloaded, so a standing bus's origin is 10-16 cm above the road. coll_pos_* is in that frame, at bumper height.
  • Angles: Wheel_Rotation_* and Axle_Steering_* are radians, positive to the right; articulation_<n>_alpha is the joint's yaw in clockwise degrees (beta its pitch), n the coupled part's position in the train.
  • Map splines store x, height, y; objects store x, y, z. See docs/FORMATS.md.

Something wrong or missing? Fix it on GitHub or open an issue.

↑↓ to move↵ to open