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 

problem with picking/intersecting in window space


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


Joined: 07 Mar 2016
Posts: 1

PostPosted: Sat Jun 09, 2018 11:18 am    Post subject:
problem with picking/intersecting in window space
Reply with quote

Hi,

I have a problem with picking via an intersector in window space.
For picking I use the following code:

Code:
osgUtil::LineSegmentIntersector* pIntersector = new osgUtil::LineSegmentIntersector(osgUtil::Intersector::WINDOW, x, y);
pIntersector->setIntersectionLimit(osgUtil::Intersector::LIMIT_NEAREST);
osgUtil::IntersectionVisitor iv(pIntersector);
camera->accept(iv);


If I zoom in then it happens that I can not pick elements just in front of me near the eye position.
It seems that some (near plane) clipping/culling happens in the intersector while the rendering uses another near plane for clipping.
The camera uses the default COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES mode.

For testing purposes, I set in the camera the DO_NOT_COMPUTE_NEAR_FAR mode. Then I noticed near plane clipping when zooming in (that I don't have in COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES mode) but I can pick all elements that are rendered.

So I guess the intersector don't use the automatically computed near/far clipping planes of the camera (if in COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES mode) for the conversion of the intersector line segment coordinates from window to world space where the intersection is actually done.
Is this correct? And what do I have to do to be able to pick all elements that are rendered with the COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES mode?

Thank you!

Regards,
Andreas
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 osgText: problem with SCREEN_COORDS mode gwaldron General 9 Thu May 17, 2018 3:56 pm View latest post
No new posts [customizing manipulator] problem wit... mp3butcher General 1 Tue Apr 24, 2018 3:19 pm View latest post
No new posts OSG & QtQuick(QML) & setMirro... karcios General 0 Wed Apr 11, 2018 12:45 pm View latest post
No new posts Texture Buffer Object Initialization ... EonStrife General 0 Tue Feb 27, 2018 7:53 am View latest post
No new posts problem setting texture min/mag filter antiro42 General 8 Mon Feb 12, 2018 7:51 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