Module Renderer.Render

Rendering vector tables

val shape_of_name : string -> Settings.shape

Guess a body's shape from its name

val color_of_name : string -> Graphics.color

Guess a body's color from its name

val size_of_shape : Settings.shape -> int

Guess a body's size from its shape

val size_of_name : string -> int

Guess a body's size from its name

val drag_origin : (int * int) option Stdlib.ref

Mouse drag state: Some (last_x, last_y) when button held

val rotate_point : float -> float -> float -> float * float

Apply the current view rotation to a 3D point, returning projected (x, y)

val draw_axes : int -> unit
val init : Ephemeral.Vector_table.vtable list -> int -> string -> unit

Initialize the rendering environment

val draw_shape : Settings.shape -> bool -> (int * int) -> int -> Graphics.color -> unit

Draw a body's shape on the screen

val screen_coords_of_body : int -> Settings.body -> int * int

Compute a body's screen coordinates from its real coordinates

val format_time : float -> string

Convert an epoch timestamp to text

val render_frame : Graphics.status -> int -> unit

Render an individual frame

val render : unit -> unit

Main render loop

val record : string -> unit

Render to a video file