.. default-domain:: py .. highlight:: py .. currentmodule:: Drawing Drawing ======= .. module:: Drawing Provides functionality for drawing objects in the flight scene. .. staticmethod:: add_line(start, end, reference_frame, [visible = True]) Draw a line in the scene. :param tuple start: Position of the start of the line. :param tuple end: Position of the end of the line. :param SpaceCenter.ReferenceFrame reference_frame: Reference frame that the positions are in. :param bool visible: Whether the line is visible. :rtype: :class:`Line` :Game Scenes: Flight .. staticmethod:: 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. :param tuple direction: Direction to draw the line in. :param SpaceCenter.ReferenceFrame reference_frame: Reference frame that the direction is in and defines the start position. :param float length: The length of the line. :param bool visible: Whether the line is visible. :rtype: :class:`Line` :Game Scenes: Flight .. staticmethod:: 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. :param tuple direction: Direction to draw the line in. :param SpaceCenter.ReferenceFrame reference_frame: Reference frame that the direction is in. :param float length: The length of the line. :param bool visible: Whether the line is visible. :rtype: :class:`Line` :Game Scenes: Flight .. staticmethod:: add_polygon(vertices, reference_frame, [visible = True]) Draw a polygon in the scene, defined by a list of vertices. :param list vertices: Vertices of the polygon. :param SpaceCenter.ReferenceFrame reference_frame: Reference frame that the vertices are in. :param bool visible: Whether the polygon is visible. :rtype: :class:`Polygon` :Game Scenes: Flight .. staticmethod:: add_text(text, reference_frame, position, rotation, [visible = True]) Draw text in the scene. :param str text: The string to draw. :param SpaceCenter.ReferenceFrame reference_frame: Reference frame that the text position is in. :param tuple position: Position of the text. :param tuple rotation: Rotation of the text, as a quaternion. :param bool visible: Whether the text is visible. :rtype: :class:`Text` :Game Scenes: Flight .. staticmethod:: clear([client_only = False]) Remove all objects being drawn. :param bool client_only: If true, only remove objects created by the calling client. :Game Scenes: Flight