Skip to content

Camera configuration display on first load is incorrect #3374

Description

@mwestphal

Describe the bug
When loading a file with --camera-position=1,1,1 --verbose, f3d displays something like:

Camera position: 0.776126, -0.438658, 24.556
Camera focal point: 0.776126, -0.438658, 0
Camera view up: 0, 1, 0
Camera view angle: 17.3889

However this information is BEFORE the camera configuration takes place in the app, so it does not correspond to what is being displayed and the cli options

Indeed, using print_scene_info interactively display another (correct) information:

Camera position: 1, 1, 1
Camera focal point: 0.776126, -0.438658, 0
Camera view up: -0.17794, 0.580166, -0.794824
Camera view angle: 17.3889

To Reproduce
Steps to reproduce the behavior:

  1. Open the file using f3d --no-config --camera-position=1,1,1 --verbose cow.vtp
  2. read the log, it is incorrect
  3. print_scene_info
  4. read the log, it is correct

Expected behavior
F3D should display the correct information right away

System Information:

  • OS: Any
  • GPU and GPU driver: Ant

F3D Information
Paste the content of f3d --version or f3d-console.exe --version on Windows: 3.5.0

Additional context
I took a quick look and there is no simple fix for this.

The callstack is as follow:

scene::add
scene::Load
scene::Internals::DisplayAllInfo
window::PrintSceneDescription
vtkF3DRender::GetSceneDescription

There is no way to control this display from f3d application and this display makes sense from a libf3d pov.

A possible fix (to be discussed) could be:

  • Add a libf3d option to control the behavior of display the scene description on load
  • Add an API to recover or to display the scene description
  • Use the option and the API in f3d application to control the temporality of the displays

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status
    Discuss

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions