View unanswered posts | View active topics It is currently Sun Jul 22, 2018 10:11 pm



Reply to topic  [ 2 posts ] 
 Files .DAE - How can I move all instance together? 
Author Message

Joined: Mon Aug 16, 2010 7:55 am
Posts: 12
Post Files .DAE - How can I move all instance together?
Good morning,
I have a question.
I load a DAE but I'm not able to move on the scene. How can I move all instances that DAE contains togheter?

Thanks a lot


Thu Oct 16, 2014 7:45 am
Profile

Joined: Mon Mar 12, 2012 5:49 am
Posts: 8
Post Re: Files .DAE - How can I move all instance together?
If I correctly understand what you need, just update the matrix for the world's root node.
After updating the absolute matrix, all children will move according to the new matrix.
It would be something like this:
Code:
GLC_StructOccurence* nodeOccurence= m_World.rootOccurence();
                GLC_Matrix4x4 positionMatrix(GLC_Vector3d(0.05, 0.05, 0.05));
                GLC_Matrix4x4 rotationMatrix(glc::Z_AXIS, 0);
                nodeOccurence->structInstance()->setMatrix(positionMatrix * rotationMatrix);

                //Do updates
                nodeOccurence->updateChildrenAbsoluteMatrix();
                updateGL();


Hope this could be helpful.


Sun Jan 04, 2015 1:44 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.