Drawing

class Drawing

Provides functionality for drawing objects in the flight scene.

Line AddLine (Tuple<Double, Double, Double> start, Tuple<Double, Double, Double> end, SpaceCenter.ReferenceFrame referenceFrame, Boolean visible = true)

Draw a line in the scene.

Parameters:
  • 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.

Game Scenes:

Flight

Line AddDirection (Tuple<Double, Double, Double> direction, SpaceCenter.ReferenceFrame referenceFrame, Single length = 10.0f, Boolean visible = true)

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

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

  • referenceFrame – Reference frame that the direction is in and defines the start position.

  • length – The length of the line.

  • visible – Whether the line is visible.

Game Scenes:

Flight

Line AddDirectionFromCom (Tuple<Double, Double, Double> direction, SpaceCenter.ReferenceFrame referenceFrame, Single length = 10.0f, Boolean visible = true)

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

Parameters:
  • 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.

Game Scenes:

Flight

Polygon AddPolygon (IList<Tuple<Double, Double, Double>> vertices, SpaceCenter.ReferenceFrame referenceFrame, Boolean visible = true)

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

Parameters:
  • vertices – Vertices of the polygon.

  • referenceFrame – Reference frame that the vertices are in.

  • visible – Whether the polygon is visible.

Game Scenes:

Flight

Text AddText (String text, SpaceCenter.ReferenceFrame referenceFrame, Tuple<Double, Double, Double> position, Tuple<Double, Double, Double, Double> rotation, Boolean visible = true)

Draw text in the scene.

Parameters:
  • 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.

Game Scenes:

Flight

void Clear (Boolean clientOnly = false)

Remove all objects being drawn.

Parameters:
  • clientOnly – If true, only remove objects created by the calling client.

Game Scenes:

Flight