HI Bram,

On 14 September 2014 13:23, Bram Vaessen <bram.vaes...@gmail.com> wrote:

> Hi,
>
> I'm a little confused about something simple... the order in which to add
> MatrixTransform.
>
> For example I want to rotate something around x,y,z using 3
> matrixtransforms.
>
> as I understand I can do this by:
> -translate(-x,-y,-z)
> -rotate
> -translate(x,y,z)
>
> when I add them, which is the correct order?
>
> -root-> translate(-x,-y,-z) -> rotate -> translate(x,y,z) -> geode
>
> or...
>
> -root-> translate(x,y,z) -> rotate -> translate(-x,-y,-z) -> geode
>

The second version is the correct one.

You can of course do this all with a single PositionAttitudeTransform or a
single Transform node, this will be neater and lead to better performance.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to