[prev in list] [next in list] [prev in thread] [next in thread]
List: flightgear-devel
Subject: [Flightgear-devel] [patch] fix pick animations
From: till busch <buti () bux ! at>
Date: 2008-04-23 12:23:00
Message-ID: 200804231423.00600.buti () bux ! at
[Download RAW message or body]
hi,
this is a small (-1/+3) patch to fix pick animations on scenery objects. since
picking apparently doesn't care for polygon offsets, the objects got into the
picklist in the wrong way. now, no matter if the "highlight group" or
the "normal group" gets hit first, the callback will fire.
... i wonder how much water goes down the danube before this gets
committed :-p
cheers,
-till
["sg-pick-animation.diff" (text/x-diff)]
diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx
index 1bb11be..4d9c773 100644
--- a/simgear/scene/model/animation.cxx
+++ b/simgear/scene/model/animation.cxx
@@ -2027,14 +2027,16 @@ SGPickAnimation::createAnimationGroup(osg::Group& parent)
// Contains the normal geometry that is interactive
osg::ref_ptr<osg::Group> normalGroup = new osg::Group;
+ normalGroup->setName("pick normal group");
normalGroup->addChild(commonGroup);
// Used to render the geometry with just yellow edges
osg::Group* highlightGroup = new osg::Group;
+ highlightGroup->setName("pick highlight group");
highlightGroup->setNodeMask(SG_NODEMASK_PICK_BIT);
highlightGroup->addChild(commonGroup);
SGSceneUserData* ud;
- ud = SGSceneUserData::getOrCreateSceneUserData(highlightGroup);
+ ud = SGSceneUserData::getOrCreateSceneUserData(commonGroup);
std::vector<SGPropertyNode_ptr> actions;
actions = getConfig()->getChildren("action");
for (unsigned int i = 0; i < actions.size(); ++i)
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic