Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 12, 2024
1 parent bf5745a commit a3b7478
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion bin/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ int main(int argc, char* argv[]) {
}

map.getStyle().loadURL(style);
map.jumpTo(CameraOptions().withCenter(LatLng{lat, lon}).withAlt(alt).withZoom(zoom).withBearing(bearing).withPitch(pitch).withRoll(roll).withFov(fov));
map.jumpTo(CameraOptions()
.withCenter(LatLng{lat, lon})
.withAlt(alt)
.withZoom(zoom)
.withBearing(bearing)
.withPitch(pitch)
.withRoll(roll)
.withFov(fov));

if (debug) {
map.setDebug(debug ? mbgl::MapDebugOptions::TileBorders | mbgl::MapDebugOptions::ParseStatus
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/util/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void Camera::getOrientation(double& pitch, double& bearing, double& roll) const

bearing = std::atan2(-r[1], r[0]);
pitch = std::atan2(std::sqrt(f[0] * f[0] + f[1] * f[1]), -f[2]);
roll = 0; //TODO
roll = 0; // TODO
}

void Camera::setOrientation(double pitch, double bearing, double roll) noexcept {
Expand All @@ -196,7 +196,7 @@ std::optional<Quaternion> Camera::orientationFromFrame(const vec3& forward, cons

const double bearing = std::atan2(-right[1], right[0]);
const double pitch = std::atan2(std::sqrt(forward[0] * forward[0] + forward[1] * forward[1]), -forward[2]);
const double roll = 0; //TODO
const double roll = 0; // TODO

return util::orientationFromPitchBearing(pitch, bearing, roll);
}
Expand Down

0 comments on commit a3b7478

Please sign in to comment.