On 09/18/2010 03:59 PM, Bart Janssens wrote:
> I'm looking a bit at how to make a move manipulator that can be
> dragged around in the QTUI viewport. In the current state of my code,
> the manipulator itself is an actual node, deriving from
> k3d::gl::renderable. This means that in order to register it being
> clicked, the scene has to be redrawn in GL_SELECT mode. I don't see
> how to accomplish that, since the modes only have access to the
> QGraphicsScene object, not module::qtui::scene.
> Would it make sense to move module::qtui::scene to k3dsdk/scen, and
> have the enable() method of the modes take a k3d::qtui::scene object?
> That way, any K-3D specific stuff could be called directly.
As an aside, I've been taking a much-needed break from coding, so you
may take my remarks with a grain of salt ...
There are pros-and-cons to making UI components document nodes - you've
identified the biggest con, which is the trickiness around coordinating
rendering and selection. There's the old joke about the man who goes to
see a doctor ... Man: "Doctor, it hurts when I do this". Doctor: "Stop
doing that." One of things I want to explore with the QTUI is relaxing
into the idea that all these complex interactions belong in the UI
layer, so they shouldn't be nodes at all.
Alternatively, there's the notion that selection has been deprecated in
OpenGL 3, so we might develop our own selection / hit-testing mechanism
that works outside rendering.