o1.stars

package o1.stars

Members list

Packages

package o1.stars.files
package o1.stars.gui

Type members

Classlikes

class Constellation(val name: String, val lines: Vector[(Star, Star)])

Each Constellation object represents a constellation visible on a star map. A constellation consists of one or more imaginary “lines” between stars.

Each Constellation object represents a constellation visible on a star map. A constellation consists of one or more imaginary “lines” between stars.

Parameters

lines

one or more pairs of stars; each pair defines an imaginary line between two stars

name

the name of the constellation

Attributes

Supertypes
class Object
trait Matchable
class Any
class Star(val id: Int, val coords: StarCoords, val magnitude: Double, val name: Option[String])

Each Star object represents a star on a star map. It records some basic information (an identifier, a location, and a magnitude); in addition, some but not all stars have been assigned a name. (In reality, many stars have multiple alternative names, but this class does not capture that fact.)

Each Star object represents a star on a star map. It records some basic information (an identifier, a location, and a magnitude); in addition, some but not all stars have been assigned a name. (In reality, many stars have multiple alternative names, but this class does not capture that fact.)

Parameters

coords

the location of the star on a two-dimensional star map

id

a number that uniquely identifies the star from the other visible stars (a so-called Henry Draper number)

magnitude

the apparent magnitude (brightness) of the star: smaller means brighter!

name

the star’s name (wrapped in Some), or None

Attributes

Supertypes
class Object
trait Matchable
class Any
class StarCoords(val x: Double, val y: Double)

A StarCoords object describes the location of a star on a two-dimensional star map. A location consists of two components, x and y, each of which has a value between -1.0 and +1.0. The x coordinate ranges from -1.0 at the very left of the map to +1.0 on the right; the y coordinate similarly ranges from -1.0 at the bottom to +1.0 at the top. For instance, a star with StarCoords of (0.0,0.0) appears at the exact center of the map.

A StarCoords object describes the location of a star on a two-dimensional star map. A location consists of two components, x and y, each of which has a value between -1.0 and +1.0. The x coordinate ranges from -1.0 at the very left of the map to +1.0 on the right; the y coordinate similarly ranges from -1.0 at the bottom to +1.0 at the top. For instance, a star with StarCoords of (0.0,0.0) appears at the exact center of the map.

Parameters

x

the x coordinate of a location on the star map, between -1.0 and +1.0

y

the y coordinate of a location on the star map, between -1.0 and +1.0

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object StarCoords

The singleton object StarCoords provides some constants and convenience methods for use alongside the StarCoords class.

The singleton object StarCoords provides some constants and convenience methods for use alongside the StarCoords class.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
StarCoords.type
class StarMap(val stars: Vector[Star], val constellations: Vector[Constellation])

Each object of type StarMap represents a specific perspective of a night sky.

Each object of type StarMap represents a specific perspective of a night sky.

Parameters

constellations

the constellations visible in the sky

stars

the stars visible in the sky

Attributes

Supertypes
class Object
trait Matchable
class Any