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 

Selecting visible primitives within a region


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


Joined: 07 Nov 2018
Posts: 5

PostPosted: Thu Nov 15, 2018 7:40 am    Post subject:
Selecting visible primitives within a region
Reply with quote

Hi,

Apologies firstly for the many topics I have posted lately. I have been running into this particular problem and have been researching for a long time before deciding to post this.

Basically I am trying to do a click-and-drag selection to select all the visible faces for an editing program.

Initially I thought of using LineSegmentIntersector to iterate over all the pixels (or every X pixels) seen in the viewport, take the first intersection and from there get a list of all primitives. But i realized that this may take up too much processing time.

Next I thought of using PolytopeIntersector to find all primitives inside the viewport, then using the maxDistance to sort the primitives by z-order to see which of them come first, but quickly realised that it will not work conceptually (since a primitive with highest maxDistance does not imply it is necessarily occluded).

Next I have searched that there are people discussing using the method of assigning different colors to different primitives, and rendering all the primitives onto a virtual plane. From the virtual plane, get the list of colors the survives the culling, and then from there determine the primitives that survive.

Unfortunately I am not sure (if even possible) to do this in OpenSceneGraph. If anyone could point me in the right direction with some simple code, or if there is another way to better tackle this problem, it is very much appreciated.


Thanks a lot for the help!

Cheers,
Charlie
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 Capturing all visible nodes ijwolf8 General 9 Fri Jan 18, 2019 9:16 pm View latest post
No new posts Selecting a mesh of 3d model (say 3ds... nebsar General 2 Wed Jan 02, 2019 9:47 pm View latest post
No new posts Selecting a GPU to be used in a dual-... Chris Hanson General 7 Thu Oct 18, 2018 4:04 pm View latest post
No new posts Copy a region of an image x,y,w,h / s... Steal General 5 Tue Feb 27, 2018 11:40 am View latest post
No new posts How to set maximum visible distance? Daven Hem General 4 Mon Feb 13, 2017 10:14 pm 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