X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fworld%2Fworld.cpp;fp=src%2Fworld%2Fworld.cpp;h=596da072ed79ee211a88eef2188ea7adad2e6396;hp=525222f284b77c9c6bc57cd3a40df77849be5fd8;hb=f8c0f8706e51450ee0e87a548ccf3a66ee9f0db3;hpb=23f1f41fbff03520bb291e42b0407e0ca0bd4cc9 diff --git a/src/world/world.cpp b/src/world/world.cpp index 525222f..596da07 100644 --- a/src/world/world.cpp +++ b/src/world/world.cpp @@ -42,7 +42,6 @@ Body::Body() , mass(1.0) , radius(1.0) , orbit() -, surface_tilt(0.0, 0.0) , axis_tilt(0.0, 0.0) , rotation(0.0) , angular(0.0) @@ -189,12 +188,8 @@ void Body::Cache() noexcept { orbital = glm::eulerAngleXY(axis_tilt.x, axis_tilt.y); inverse_orbital = glm::eulerAngleYX(-axis_tilt.y, -axis_tilt.x); } - local = - glm::eulerAngleY(rotation) - * glm::eulerAngleXY(surface_tilt.x, surface_tilt.y); - inverse_local = - glm::eulerAngleYX(-surface_tilt.y, -surface_tilt.x) - * glm::eulerAngleY(-rotation); + local = glm::eulerAngleY(rotation); + inverse_local = glm::eulerAngleY(-rotation); } void Body::CheckCollision() noexcept { @@ -606,7 +601,7 @@ void GenerateEarthlike(const Set &tiles, Planet &p) noexcept { constexpr double highland_thresh = 0.4; constexpr double mountain_thresh = 0.5; - const glm::dvec3 axis(glm::dvec4(0.0, 1.0, 0.0, 0.0) * glm::eulerAngleXY(p.SurfaceTilt().x, p.SurfaceTilt().y)); + const glm::dvec3 axis(0.0, 1.0, 0.0); const double cap_thresh = std::abs(std::cos(p.AxialTilt().x)); const double equ_thresh = std::abs(std::sin(p.AxialTilt().x)) / 2.0; const double fzone_start = equ_thresh - (equ_thresh - cap_thresh) / 3.0;