Celestia/Celx Scripting/CELX Lua Methods/CEL command mark

mark
mark { object  size  color  symbol  label  occludable  }

This command marks the  with the specified  of the specified  and . It is also possible to add a label  to the marker and define whether the marker will be hidden by objects in front of it.

CELX equivalent-1:

Based on the celestia:mark method.

Note: It is NOT possible with this method to define the size, color, symbol, label and occludability of the marker. The object:mark method should be used instead (see CELX equivalent-2 ).


 * Find an object with name  which must be marked and store in "objectname".

objectname = celestia:find(  )


 * Mark the specified object.

celestia:mark( objectname )

Summarized:

objectname = celestia:find(  ) celestia:mark( objectname )

CELX equivalent-2:

Based on the object:mark method.


 * Find an object with name  which must be marked and store in "objectname".

objectname = celestia:find(  )


 * Place a marker on "objectname", according the specified parameters:
 * <colorstring>: The color to be used for the marker. Default is lime.
 * Either use HTML-style hex color strings such as “#00ff00” (lime), or some predefined color names like: "red", "green", "yellow", "blue", "white", "black", etc.. A list of supported color names can be found on the HTML Color Names page.
 * <symbolstring>: Name of symbol to be used for the marker. Default is "diamond". The available marker symbols are:
 * "diamond", "triangle", "square", "plus", "x", "filledsquare", "leftarrow", "rightarrow", "uparrow", "downarrow", "circle", "disk".
 * <sizenumber>: Size of the marker in pixels. Default is 10.
 * <opacitynumber>: A value from 0 to 1 that gives the opacity of marker. The Default is 1.0, completely opaque.
 * <labelstring>: A text label which can be added to the marker. The default is the empty string, indicating no marker label.
 * <boolean_occludable>: A boolean flag indicating whether the marker will be hidden by objects in front of it. The default is true !!! Note: In previous Celestia releases (version 1.5.1 and older), the marker was NOT hidden by objects in front of it, which is NOT the default in Celestia version and later !!! Note: Using <boolean_occludable> in Celestia version 1.5.1 and older, will result in a Celestia error !!!

objectname:mark( <colorstring>, <symbolstring>, <sizenumber>, <opacitynumber>, <labelstring>, <boolean_occludable> )

Summarized:

objectname = celestia:find( <string> ) objectname:mark( <colorstring>, <symbolstring>, <sizenumber>, <opacitynumber>, <labelstring>, <boolean_occludable> ) Example: The following example marks the Earth with a green "x" and a label "This is our Earth", that will stay visible when objects pass in front of it.

CEL:

mark { object "Sol/Earth" size 15 color [0 1 0] symbol "x" }
 * 1) In previous Celestia releases (version 1.5.1 and older).

mark { object "Sol/Earth" size 15 color [0 1 0] symbol "x" label "This is our Earth" occludable false }
 * 1) In newer Celestia releases (version  and later).

CELX with the celestia:mark method not completely compatible:

-- This example will NOT meet the required size, color and symbol !!! objectname = celestia:find("Sol/Earth") celestia:mark(objectname)

CELX with the object:mark method:

-- In previous Celestia releases (version 1.4.1 and older). objectname = celestia:find("Sol/Earth") objectname:mark("green", "x", 15.0, 1)

-- In previous Celestia releases (version and 1.5.1). objectname = celestia:find("Sol/Earth") objectname:mark("green", "x", 15.0, 1, "This is our Earth" )

-- In newer Celestia releases (version and later). objectname = celestia:find("Sol/Earth") objectname:mark("green", "x", 15.0, 1, "This is our Earth", false)

Back to CEL command index