space_ex v0.1.0 SpaceEx.Drawing

Provides functionality for drawing objects in the flight scene.

For drawing and interacting with the user interface, see the UI service.

Link to this section Summary

Functions

Draw a direction vector in the scene, from the center of mass of the active vessel

Draw a polygon in the scene, defined by a list of vertices

Remove all objects being drawn

Link to this section Functions

Link to this function add_direction(conn, direction, referenceFrame, length, visible)

Draw a direction vector in the scene, from the center of mass of the active vessel.

  • direction — Direction to draw the line in.

  • referenceFrame — Reference frame that the direction is in.

  • length — The length of the line.

  • visible — Whether the line is visible.

Link to this function add_line(conn, start, end, referenceFrame, visible)

Draw a line in the scene.

  • start — Position of the start of the line.

  • end — Position of the end of the line.

  • referenceFrame — Reference frame that the positions are in.

  • visible — Whether the line is visible.

Link to this function add_polygon(conn, vertices, referenceFrame, visible)

Draw a polygon in the scene, defined by a list of vertices.

  • vertices — Vertices of the polygon.

  • referenceFrame — Reference frame that the vertices are in.

  • visible — Whether the polygon is visible.

Link to this function add_text(conn, text, referenceFrame, position, rotation, visible)

Draw text in the scene.

  • text — The string to draw.

  • referenceFrame — Reference frame that the text position is in.

  • position — Position of the text.

  • rotation — Rotation of the text, as a quaternion.

  • visible — Whether the text is visible.

Link to this function clear(conn, clientOnly)

Remove all objects being drawn.

  • clientOnly — If true, only remove objects created by the calling client.