OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

How to get the orientation of 3d object?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Jiechang Guo
Newbie


Joined: 22 Sep 2016
Posts: 8

PostPosted: Mon Apr 10, 2017 2:14 pm    Post subject:
How to get the orientation of 3d object?
Reply with quote

Hi,

I am dealing with a task of orienting and positioning one object relative to another(the same object as the manipulated one,but has different position and orientation). And when the task is finished, I wanna compute the deviation(both position and orienting). For the orientation, I want to get the angle and axis.

I'm so confused with the Local coordinate and World coordinate in OSG.

I know maybe I should define a vector under the object local coordinate and rotate translate the vector as well as the object is being manipulated.And do some math with the vector under the world coordinate to get the angle and axis.

Can someone give me some advice?

Thank you! Thanks a lot!

Cheers,
Jiechang Very Happy
Back to top
View user's profile Send private message Send e-mail
Alberto Luaces
Guest





PostPosted: Wed Apr 12, 2017 3:03 pm    Post subject:
How to get the orientation of 3d object?
Reply with quote

"Jiechang Guo" writes:

Quote:
Hi,

I am dealing with a task of orienting and positioning one object
relative to another(the same object as the manipulated one,but has
different position and orientation). And when the task is finished, I
wanna compute the deviation(both position and orienting). For the
orientation, I want to get the angle and axis.

I'm so confused with the Local coordinate and World coordinate in OSG.

I know maybe I should define a vector under the object local
coordinate and rotate translate the vector as well as the object is
being manipulated.And do some math with the vector under the world
coordinate to get the angle and axis.

Can someone give me some advice?


Hi Jiechang, if you want to place an object relative to other, just make
it as its child. The positioning matrix of the second one will be the
information you are looking for.

After that, you can convert that matrix to a quaternion or whatever
representation you prefer.

--
Alberto



------------------
Post generated by Mail2Forum
Back to top
Jiechang Guo
Newbie


Joined: 22 Sep 2016
Posts: 8

PostPosted: Thu Apr 20, 2017 11:51 am    Post subject:
Reply with quote

Thank you Alberto! I'll try it.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts scene object not receiving/casting sh... Meldryt General 0 Thu May 11, 2017 8:01 am View latest post
No new posts Scale problem while transforming obje... YuraIU02 General 1 Sat Apr 15, 2017 4:26 pm View latest post
No new posts How to get Node object from PositionA... nghien_rbc General 1 Sat Apr 15, 2017 3:05 am View latest post
No new posts Zoom in to special area and special o... Daven Hem General 2 Wed Feb 22, 2017 2:35 am View latest post
No new posts How to use frame buffer object in exi... saedrna1 General 2 Sat Feb 18, 2017 3:54 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP