Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body struct { IsStar bool // IsStar : Is this the star of the system Name string // Name : The name of the star/planet Radius float64 // Radius : The radius of the star/planet Mass float64 // Mass : Tha mass of the star/planet Position Vector2 // Position : The position of the star/planet Velocity Vector2 // Velocity : The velocity of the star/planet Color string // Color : The color of the star/planet in HEX form ColorObj color.Color // ColorObj : The color of the star/planet in RGB form DistanceToStar float64 // DistanceToStar : The distance to the star of the system Orbit []Vector2 // Orbit : The orbit of the planet }
Body : A celestial body, star or planet
func (*Body) Attraction ¶
Attraction : Calculates the attraction between two bodies
func (*Body) UpdatePosition ¶
func (b *Body) UpdatePosition(solar *SolarSystem, timestamp float64)
UpdatePosition : Update the position each cycle
type SolarSystem ¶
SolarSystem : A system containing a star and one or more planets
Click to show internal directories.
Click to hide internal directories.