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 

PolytopeIntersector::Intersection::primitiveIndex


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


Joined: 14 Sep 2016
Posts: 7

PostPosted: Mon May 29, 2017 2:19 am    Post subject:
PolytopeIntersector::Intersection::primitiveIndex
Reply with quote

Hi,
I am looking for some clarification of the primitiveIndex value of polytope intersection. I have added a very simple scene file containing 3 planar faces of a cube with 6 triangles in a primitive set. I have been testing the polytope intersector with osgkeyboardmouse using the following command
Code:
'osgkeyboardmouse --kdtree box_partial_work_1set.osgt'
Running this command and hitting the 'p' key and then selecting the 2 triangles making up the red face I get the following output.


Code:
osgkeyboardmouse --kdtree box_partial_work_1set.osgt
Building KdTrees
ViewerBase::configureAffinity() numProcessors=4
  databasePagers = 1
_forceVertexArrayObject = 0
_forceVertexBufferObject = 0
Using PolytopeIntersector

PoltyopeIntersector traversal took 0.104ms
Picked 10 2.44399 1.97205
  Distance to ref. plane 4.928, max. dist 5.0417, primitive index 4, numIntersectionPoints 2
  Hits Geometry nodePath size 3
  parent Group

PoltyopeIntersector traversal took 0.034ms
Picked 10 7.93759 7.66585
  Distance to ref. plane 4.13599, max. dist 4.24392, primitive index 5, numIntersectionPoints 2
  Hits Geometry nodePath size 4
  parent Scribe
 



why are primitive indexes 4 and 5? Shouldn't they be 0 and 1 because those triangles are listed first in the scene file?

If I do the same procedure and leave off '--kdtree' I am getting indexes of 1 and 2.


Thank you!

Cheers,
tom[/code]
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 Dimension Mask in PolytopeIntersector... Jordi Torres General 6 Wed May 24, 2017 10:19 am View latest post
No new posts intersection tests Trajce Nikolov NICK General 7 Thu Feb 16, 2017 7:34 pm View latest post
No new posts PolytopeIntersector with AutoTransform Bruno Oliveira General 2 Sat Dec 03, 2016 5:56 pm View latest post
No new posts LOS Intersection and osgOcean segment... Paradox General 1 Wed Sep 14, 2016 10:17 am View latest post
No new posts PolytopeIntersector LIMIT_NEAREST (or... NoxxKn General 2 Wed Jun 01, 2016 2:07 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