Fix mesh visibility on pick animations.
(caused by incorrectly overloaded methods)
This commit is contained in:
@@ -371,12 +371,12 @@ osg::StateSet* sharedHighlightStateSet()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGPickAnimation::apply(simgear::SGTransientModelData &modelData)
|
SGPickAnimation::apply(osg::Group& group)
|
||||||
{
|
{
|
||||||
if (_objectNames.empty() && _proxyNames.empty()) {
|
if (_objectNames.empty() && _proxyNames.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
osg::Group& group = *modelData.getNode()->asGroup();
|
|
||||||
group.traverse(*this);
|
group.traverse(*this);
|
||||||
|
|
||||||
// iterate over all group children
|
// iterate over all group children
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
SGPickAnimation(simgear::SGTransientModelData &modelData);
|
SGPickAnimation(simgear::SGTransientModelData &modelData);
|
||||||
|
|
||||||
// override so we can treat object-name specially
|
// override so we can treat object-name specially
|
||||||
virtual void apply(simgear::SGTransientModelData &modelData);
|
virtual void apply(osg::Group& group);
|
||||||
|
|
||||||
void apply(osg::Node* node);
|
void apply(osg::Node* node);
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -490,13 +490,13 @@ SGAnimation::animate(simgear::SGTransientModelData &modelData)
|
|||||||
anim.apply(modelData);
|
anim.apply(modelData);
|
||||||
} else if (type == "pick") {
|
} else if (type == "pick") {
|
||||||
SGPickAnimation anim(modelData);
|
SGPickAnimation anim(modelData);
|
||||||
anim.apply(modelData);
|
anim.apply(modelData.getNode());
|
||||||
} else if (type == "knob") {
|
} else if (type == "knob") {
|
||||||
SGKnobAnimation anim(modelData);
|
SGKnobAnimation anim(modelData);
|
||||||
anim.apply(modelData);
|
anim.apply(modelData.getNode());
|
||||||
} else if (type == "slider") {
|
} else if (type == "slider") {
|
||||||
SGSliderAnimation anim(modelData);
|
SGSliderAnimation anim(modelData);
|
||||||
anim.apply(modelData);
|
anim.apply(modelData.getNode());
|
||||||
} else if (type == "range") {
|
} else if (type == "range") {
|
||||||
SGRangeAnimation anim(modelData);
|
SGRangeAnimation anim(modelData);
|
||||||
anim.apply(modelData);
|
anim.apply(modelData);
|
||||||
|
|||||||
Reference in New Issue
Block a user