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 computeIntersections for nodes belo


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Chris Denham
Guest





PostPosted: Sun Oct 26, 2008 10:28 am    Post subject:
Problem with computeIntersections for nodes belo
Reply with quote

I have a problem with Viewer:computeIntersections for nodes below a subgraph
rendering camera that doesn't have the ABSOLUTE_RF reference frame. In fact,
computeIntersections results are exactly as though an ABSOLUTE_RF has been
set on the camera, even though it has not. The code below creates a simple
scene the exhibits the problem. I used this in the osgpick example to show
computed intersections.
Is this a bug, or is this to be expected? If it is to be expected, how can I
get picking to work for nodes below my post render camera?
Chris.

osg::Group* group = new osg::Group();

osg::Geode* sphere = new osg::Geode();
sphere->setName("Sphere");
sphere->addDrawable(new osg::ShapeDrawable(new osg::Sphere()));

osg::Geode* cube = new osg::Geode();
cube->setName("Cube");
cube->addDrawable(new osg::ShapeDrawable(new osg::Box()));

osg::Camera* camera = new osg::Camera();
camera->setRenderOrder(osg::Camera::POST_RENDER);
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
//camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);

group->addChild(sphere);
group->addChild(camera);
camera->addChild(cube);



------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Sun Oct 26, 2008 3:53 pm    Post subject:
Problem with computeIntersections for nodes belo
Reply with quote

Hi Chris,

There isn't enough info about how you are calling computeIntersections
to really know what is going on - there are several
computeIntersections methods, so I can't say whether it's a bug, or
code misuse.

As a general note, the computeIntersections methods are just
convenience methods for the most common needs, but they are just
implemented on top the general purpose
IntersectionVisitor/*Intersector classes. These classes aren't
difficult to use so you just implement your work on these.

Robert.

On Sun, Oct 26, 2008 at 10:28 AM, Chris Denham <> wrote:
Quote:
I have a problem with Viewer:computeIntersections for nodes below a subgraph
rendering camera that doesn't have the ABSOLUTE_RF reference frame. In fact,
computeIntersections results are exactly as though an ABSOLUTE_RF has been
set on the camera, even though it has not. The code below creates a simple
scene the exhibits the problem. I used this in the osgpick example to show
computed intersections.
Is this a bug, or is this to be expected? If it is to be expected, how can I
get picking to work for nodes below my post render camera?
Chris.

osg::Group* group = new osg::Group();

osg::Geode* sphere = new osg::Geode();
sphere->setName("Sphere");
sphere->addDrawable(new osg::ShapeDrawable(new osg::Sphere()));

osg::Geode* cube = new osg::Geode();
cube->setName("Cube");
cube->addDrawable(new osg::ShapeDrawable(new osg::Box()));

osg::Camera* camera = new osg::Camera();
camera->setRenderOrder(osg::Camera::POST_RENDER);
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
//camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);

group->addChild(sphere);
group->addChild(camera);
camera->addChild(cube);




------------------
Post generated by Mail2Forum
Back to top
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 BVH and model axis centering: a model... Paradox Plugins [osgPlugins] 0 Mon Oct 16, 2017 4:27 pm View latest post
No new posts Problem With Osg Texture Colors! Bobykhani General [forum] 1 Tue Oct 10, 2017 8:20 am View latest post
No new posts Problem compiling OSG 3.4.1 osgDB 64 bit tonyor Build system [build] 0 Thu Sep 21, 2017 12:41 am View latest post
No new posts Problem blending multiple render passes antiro42 General 5 Sat Sep 09, 2017 9:44 am View latest post
No new posts Custom data within nodes or drawables arennuit General 2 Thu Aug 24, 2017 9:52 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