Cannot change FoV/Ortho with ViewControl.ChangeFieldOfView()
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
I am creating a Headless Orthographic PointCloud render, and when I set FoV to 5 degrees and render, the window that gets captured remains at 60 degrees perspective. ViewControl reports that the FoV is 5 degrees and Ortho, but when I use [ and ] , the console shows the FoV starting at 60 and going down to 5 degrees (Ortho) correctly. How do I get the projection to start at Ortho? Am I missing a step in here to push my FoV Change to the renderer?
open3d::visualization::Visualizer vis;
vis.CreateVisualizerWindow("PointCloudViewer",640, 480,
/*left*/ 1,/*top*/ 1, /*visible*/true);
vis.AddGeometry(std::make_shared(source_cloud));
open3d::visualization::ViewControl view=vis.GetViewControl();
view.ChangeFieldOfView(-90); //A FoV of less than 5 degrees forces Orthographic projection
/////////////////////////////////////////////////////
auto fov=view.GetFieldOfView();//This shows FoV=5
open3d::visualization::ViewControl::ProjectionType type=view.GetProjectionType();//This shows Ortho
vis.Run();
vis.CaptureScreenImage(FLAGS_render,true);
vis.DestroyVisualizerWindow();
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.