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 Center Parameter of CameraManipulator


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


Joined: 20 Jul 2016
Posts: 9

PostPosted: Wed Mar 15, 2017 3:27 am    Post subject:
How to get Center Parameter of CameraManipulator
Reply with quote

Hi,
After setCameraManipulator for my viewer i can get the Eye parameter of camera but cannot get the Center parameter to get the point of my camera looking at. How to get this value?

Here is the way i get the Eye parameter:

Code:
osg::Matrixd mt = _viewer->getCameraManipulator()->getMatrix();
Vec3d eye = mt.getTrans();




Thank you!

Cheers,
duc
Back to top
View user's profile Send private message
wernerM
User


Joined: 06 Feb 2013
Posts: 65

PostPosted: Wed Mar 15, 2017 8:48 am    Post subject:
How to get Center Parameter of CameraManipulator
Reply with quote

view->getCamera()->getViewMatrixAsLookAt(...)

Am 15.03.2017 um 04:27 schrieb duc nguyen:

Quote:
Quote:
Hi,
After setCameraManipulator for my viewer i can get the Eye parameter of camera but cannot get the Center parameter to get the point of my camera looking at. How to get this value?

Here is the way i get the Eye parameter:


Code:
osg::Matrixd mt = _viewer->getCameraManipulator()->getMatrix();
Vec3d eye = mt.getTrans();





Thank you!

Cheers,
duc

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70495#70495





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail: (
Only registered users can see emails on this board!
Get registred or enter the forums!
)

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
nghien_rbc
Newbie


Joined: 20 Jul 2016
Posts: 9

PostPosted: Thu Mar 16, 2017 1:26 am    Post subject:
Re: How to get Center Parameter of CameraManipulator
Reply with quote

Dear wernerM,
I use osgGA::CameraManipulator class to manage viewer of my scene. I dont use osg::Camera class so i cannot use getViewMatrixAsLookAt method

wernerM wrote:
view->getCamera()->getViewMatrixAsLookAt(...)

Am 15.03.2017 um 04:27 schrieb duc nguyen:

Quote:
Quote:
Hi,
After setCameraManipulator for my viewer i can get the Eye parameter of camera but cannot get the Center parameter to get the point of my camera looking at. How to get this value?

Here is the way i get the Eye parameter:


Code:
osg::Matrixd mt = _viewer->getCameraManipulator()->getMatrix();
Vec3d eye = mt.getTrans();

Thank you!

Cheers,
duc

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70495#70495





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail: (
Only registered users can see emails on this board!
Get registred or enter the forums!
)

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
nghien_rbc
Newbie


Joined: 20 Jul 2016
Posts: 9

PostPosted: Thu Mar 16, 2017 3:31 am    Post subject:
Reply with quote

ah, now i can get exactly position of cameramanipulator object by getTransformation method of TrackballManipulator object
duc
Back to top
View user's profile Send private message
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 About the parameter _lock_azim_while_... Michelle_Xie General 1 Thu Mar 02, 2017 2:08 am View latest post
No new posts Terrain Center and Size/Extent (TXP, ... DiB78 General 3 Fri Jul 01, 2016 1:54 pm View latest post
No new posts Hide mouse cursor from CameraManipulator Merwyn General 2 Fri Jan 08, 2016 9:18 am View latest post
No new posts Parameter incompatabilities hartwigw General 1 Sun Mar 01, 2015 4:57 pm View latest post
No new posts Disabling cameramanipulator in Compos... Bacttrack General 6 Sat Jul 19, 2014 8:17 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