Closed vikasTmz closed 7 years ago
@vikasTmz You can find here the equation and the code to transform an intrinsic matrix as represented in ViSP to a representation compatible with OpenGL / Qt3DRender::QCamera.
I did some quick tests. You are probably already aware of most of the issues but just for the record here some comments:
QObjectPicker
did not work in this version (tested with 3D face from lines or with a cylinder)SceneModifier::~SceneModifier()
, the Qt memory management should be able to handle thatconst QVector &
) when appropriateQObjectPicker
needed if we can get the name of the object that fired the click event?m_cylinderEntity
or remove it?)QObjectPicker did not work in this version (tested with 3D face from lines or with a cylinder)
It works (Right click to select) but only when the camera is at a certain distance(close) from the object. Trying to see if the ray from the camera that should intersect the bounding volume is being affected by some setting.
https://forum.qt.io/topic/77570/qt3d-qobjectpicker-test-not-working-as-expected
Should there be an option for the user to input Fov
and aspect ratio
? But in that case there are only two equations to solve for u0
, v0
, px
and py
.
Should there be an option for the user to input Fov and aspect ratio? But in that case there are only two equations to solve for u0, v0, px and py.
No, I prefer to keep only px
, py
, u0
and v0
.
It works (Right click to select) but only when the camera is at a certain distance(close) from the object. Trying to see if the ray from the camera that should intersect the bounding volume is being affected by some setting.
Indeed, but we have to be very very close which make the interaction pretty difficult. Commenting the 3 lines that create the world axes solve the issue somehow on my computer. If there is no other solution, please remove the 3 axes drawing and use instead a small frame (similar to Blender at the bottom left):
Some comments:
QCamera
settings:
px
, py
, u0
, v0
, nearPlane
and farPlane
run the application
--> import CAO + save dialog
make the application crashrun the application
--> import CAO
--> import CAO + save dialog
does not let the user save the modifications (it is the open frame that is displayed)save as
button beside the save button?minPolygonAreaTreshold
parameter is not displayed (right click) whereas the other parameters are correctly displayed after a cao model file has been openedhelp
frame some helping information: for instance the commands for the camera navigationopen XML editor button:
- the user should be able to load an XML config file and modify it if he wants the user should be able to create a new XML config file from default parameters a button to save / load should be added in my opinion
- save button should not silently overwrite the changes in my opinion, maybe add a save as button beside the save button?
These options are present in the toolbar
(for the 3d viewer and xml editor).
Concerning the TODO list:
- [ ] Fix cylinder and circle rotation.
- [ ] Get lod settings (length & area) using camera intrinsic & extrinsic properties & world coord.
- [ ] Save Qt3DRender::QCamera Settings into XML config file.
- [ ] Display face normals.
- [ ] Choose the 3D points for the init config file.
- [ ] Fix bug: "run the application --> import CAO + save dialog make the application crash"
- [x] Save user input LOD parameters.
- [x] Clear scene option.
- [x] Create a Qt3DRender::QCamera using the intrinsic parameters in the XML config file.
- [x] QObjectpicker improvements.
There should be an option / button to "switch" the model points when the user see that the face normal is not correct (only for faces from points, face from lines and circles).
The feature Get lod settings (length & area) using camera intrinsic & extrinsic properties & world coord.
should be done at the end. Can you explain what you will plan to do for this feature?
Using this equation:
X<sub>w</sub>
will be the world coordinates of a point. So for a line, get X<sub>w</sub>
of each end and calculate x
's. Then find the distance between them for minLineLength
.
I have merged this pull request as I have some modifications to do. Please open another pull request for the rest of the tasks:
TODO:
Qt3DRender::QCamera
Settings into XML config file.Qt3DRender::QCamera
using the intrinsic parameters in the XML config file.QObjectpicker
improvements.