Skip to content

Lines rendering & camera #43

Discussion options

You must be logged in to vote

Hello!

To set the viewpoint on startup, you need to call Application::realize() manually, set a viewpoint, and then start the frame loop.(I just made realize() public in the latest push so you will need to update.) Example:

    app.realize();

    auto first_view = app.displayManager->windowsAndViews.begin()->second.front();
    if (first_view)
    {
        auto manip = rocky::MapManipulator::get(first_view);
        if (manip)
        {
            rocky::Viewpoint vp;
            vp.pitch = -90.0;
            vp.point = rocky::GeoPoint(rocky::SRS::WGS84, 45, 45, 0);
            vp.range = 1000000.0;
            manip->setViewpoint(vp);
        }
    }
    app.run();

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ComradeMashkov
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants