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 (bool) – Whether the line is visible.
- Return type:
- Game Scenes:
Flight
- 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 (float) – The length of the line.
visible (bool) – Whether the line is visible.
- Return type:
- Game Scenes:
Flight
- 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 (float) – The length of the line.
visible (bool) – Whether the line is visible.
- Return type:
- Game Scenes:
Flight
- 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 (bool) – Whether the polygon is visible.
- Return type:
- Game Scenes:
Flight
- static add_text(text, reference_frame, position, rotation[, visible = True])¶
Draw text in the scene.
- Parameters:
text (str) – 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 (bool) – Whether the text is visible.
- Return type:
- Game Scenes:
Flight
- static clear([client_only = False])¶
Remove all objects being drawn.
- Parameters:
client_only (bool) – If true, only remove objects created by the calling client.
- Game Scenes:
Flight