21#include <entt/entt.hpp>
23#include <glm/gtc/quaternion.hpp>
Definition: coordinates.cpp:22
SurfaceCoordinate ToSurfaceCoordinate(const glm::vec3 &vec)
Definition: coordinates.cpp:51
constexpr degree toDegree(radian theta)
Definition: units.h:98
double GetLaunchAzimuth(double latitude, double inclination)
Calculates the azimuth of the orbit based on the latitude and inclination
Definition: coordinates.cpp:44
glm::vec3 toVec3(const SurfaceCoordinate &coord, const float &radius)
Converts surface coordinate to vector3 in space so that we can get the surface coordinate to render i...
Definition: coordinates.cpp:33
double radian
Definition: units.h:37
constexpr radian toRadian(degree theta)
Definition: units.h:97
double GreatCircleDistance(SurfaceCoordinate &coord1, SurfaceCoordinate &coord2)
Calculates the angle between the two coordinates. Just multiply by the planet's diameter for fun and ...
Definition: coordinates.cpp:23
double light_year
Definition: units.h:33
constexpr double PI
Definition: units.h:45
double degree
Definition: units.h:36
double GetLaunchInclination(double latitude, double azimuth)
Calculates the inclination of the orbit based on the latitude and azimuth
Definition: coordinates.cpp:49
constexpr double normalize_radian_coord(const radian &radian)
Definition: units.h:78
PolarCoordinate_tp< types::astronomical_unit > PolarCoordinate
Definition: coordinates.h:65
Definition: coordinates.h:38
glm::dvec3 position
Definition: coordinates.h:39
glm::dvec3 velocity
Definition: coordinates.h:40
glm::dvec3 center
Definition: coordinates.h:41
Way to position star systems on the universe.
Definition: coordinates.h:52
types::light_year x
Definition: coordinates.h:53
types::light_year y
Definition: coordinates.h:54
Definition: coordinates.h:45
glm::dvec3 impulse
Definition: coordinates.h:46
Relative position from the parent orbiting object.
Definition: coordinates.h:32
glm::dvec3 velocity
Definition: coordinates.h:34
glm::dvec3 position
Definition: coordinates.h:33
glm::dvec3 center
Definition: coordinates.h:35
Definition: coordinates.h:67
MoveTarget(entt::entity _targetent)
Definition: coordinates.h:69
entt::entity target
Definition: coordinates.h:68
Definition: coordinates.h:29
Definition: coordinates.h:58
degree theta
Definition: coordinates.h:60
PolarCoordinate_tp(T _r, degree _theta)
Definition: coordinates.h:63
PolarCoordinate_tp()=default
T r
Definition: coordinates.h:59
Longitude and lattitude. Planet coordinates.
Definition: coordinates.h:76
degree longitude() const
Definition: coordinates.h:99
SurfaceCoordinate(degree _lat, degree _long)
Creates a surface coordinate
Definition: coordinates.h:89
radian _longitude
Definition: coordinates.h:79
radian _latitude
Definition: coordinates.h:78
entt::entity planet
Definition: coordinates.h:107
radian r_longitude() const
Definition: coordinates.h:101
degree latitude() const
Definition: coordinates.h:97
radian r_latitude() const
Definition: coordinates.h:103
SurfaceCoordinate()=default
SurfaceCoordinate universe_view() const
Definition: coordinates.h:105
SurfaceCoordinate(radian _lat, radian _long, bool radian)
Definition: coordinates.h:94