[Interest] Qt3D - Setting the Camera's ViewMatrix Directly

Philip Schuchardt vpicaver at gmail.com
Sun Dec 4 15:54:05 CET 2016


In the next step of porting my OpenGL application to Qt3D, I trying to use
my existing camera and interaction code. My interaction code creates and
manipulates QMatrix4x4's for projection and view matrixes. It seems like
Qt3D's camera doesn't provide direct access of ViewMatrix. My question is
how do I set this directly? Can I subclass QCamera and control it directly?
Could I make my code Camera an entry and not use QCamera? How would Qt3D
interpret my camera as a QCamera and set the necessary uniforms in the
shaders. Also, how would this play with CameraSelector nodes in the
framegraph? Would I have to make a custom CameraSelector framegraph node?
The nice thing about direct control of the ViewMatrix is there's no mystery
about how the math works. Without direct access to the ViewMatrix, it'll
take me a decedent amount to port my camera code...

Also, how do you unproject a point on the screen using the QCamera and the
viewport in Q3D? This is necessary for my interactions to work correctly.

Thanks,
Phi|ip
-- 
Phi|ip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161204/fa4f8f49/attachment.html>


More information about the Interest mailing list