Drawing

Provides functionality for drawing objects in the flight scene.

static add_line(start, end, reference_frame[, visible = True])

Draw a line in the scene.

Parameters:
  • start (Tuple) – Position of the start of the line.

  • end (Tuple) – Position of the end of the line.

  • reference_frame (SpaceCenter.ReferenceFrame) – Reference frame that the positions are in.

  • visible (boolean) – Whether the line is visible.

Return type:

Drawing.Line

static add_direction(direction, reference_frame[, length = 10.0][, visible = True])

Draw a direction vector in the scene, starting from the origin of the given reference frame.

Parameters:
  • direction (Tuple) – Direction to draw the line in.

  • reference_frame (SpaceCenter.ReferenceFrame) – Reference frame that the direction is in and defines the start position.

  • length (number) – The length of the line.

  • visible (boolean) – Whether the line is visible.

Return type:

Drawing.Line

static add_direction_from_com(direction, reference_frame[, length = 10.0][, visible = True])

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

Parameters:
  • direction (Tuple) – Direction to draw the line in.

  • reference_frame (SpaceCenter.ReferenceFrame) – Reference frame that the direction is in.

  • length (number) – The length of the line.

  • visible (boolean) – Whether the line is visible.

Return type:

Drawing.Line

static add_polygon(vertices, reference_frame[, visible = True])

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

Parameters:
  • vertices (List) – Vertices of the polygon.

  • reference_frame (SpaceCenter.ReferenceFrame) – Reference frame that the vertices are in.

  • visible (boolean) – Whether the polygon is visible.

Return type:

Drawing.Polygon

static add_text(text, reference_frame, position, rotation[, visible = True])

Draw text in the scene.

Parameters:
  • text (string) – The string to draw.

  • reference_frame (SpaceCenter.ReferenceFrame) – Reference frame that the text position is in.

  • position (Tuple) – Position of the text.

  • rotation (Tuple) – Rotation of the text, as a quaternion.

  • visible (boolean) – Whether the text is visible.

Return type:

Drawing.Text

static clear([client_only = False])

Remove all objects being drawn.

Parameters:

client_only (boolean) – If true, only remove objects created by the calling client.