Excerpts from Colin Wang's message of Wed Mar 16 05:20:37 +0000 2011: > Hi Everyone, > > I want to do some 3D rotate effect on image, but the rotate effect > will be very different if image's position is changed. Is there any > convenient method to control the camera in Clutter/Cogl, so the 3D > rotate effect will be same even if image's position is different in > clutter stage? > > Anyone did that yet? Thanks for any help.
Hi Colin, Strictly speaking this isn't possible currently, not without breaking some of the input handling semantics. Currently each actor gets an opportunity to modify to modelview transform in the apply_transform() vfunc and we give some limited control over the "camera" with clutter_stage_set_perspective() but currently that can't be changed arbitrarily mid-scene. It looks like the way we need to solve this is by exposing a more comprehensive apply_transforms() vfunc that lets each actor modify the viewport and projection transforms as well as the modelview. If you can accept input events for these actors having incorrectly transformed actor relative coordinates then you would be able to achieve what your want by directly using cogl_set_viewport or by translating the projection matrix in your actors paint and pick vfuncs before you draw anything. If you need any further help with this please say. I'm really interested in trying to support your use case. kind regards, - Robert > > Best Regards, > Colin -- Robert Bragg, Intel Open Source Technology Center _______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
