#include <simgear/props/props.hxx>
#include <simgear/structure/SGBinding.hxx>
#include <simgear/scene/material/EffectGeode.hxx>
+#include <simgear/scene/util/OsgMath.hxx>
#include <simgear/scene/util/SGNodeMasks.hxx>
#include <simgear/scene/util/SGSceneUserData.hxx>
#include <simgear/scene/util/SGStateAttributeVisitor.hxx>
SGAnimation::~SGAnimation()
{
- if (_found)
- return;
-
- SG_LOG(SG_IO, SG_ALERT, "Could not find at least one of the following"
- " objects for animation:\n");
- std::list<std::string>::const_iterator i;
- for (i = _objectNames.begin(); i != _objectNames.end(); ++i)
- SG_LOG(SG_IO, SG_ALERT, *i << "\n");
+ if (!_found)
+ {
+ std::list<std::string>::const_iterator i;
+ string info;
+ for (i = _objectNames.begin(); i != _objectNames.end(); ++i)
+ {
+ if (!info.empty())
+ info.append(", ");
+ info.append("'");
+ info.append(*i);
+ info.append("'");
+ }
+ if (!info.empty())
+ {
+ SG_LOG(SG_IO, SG_ALERT, "Could not find at least one of the following"
+ " objects for animation: " << info);
+ }
+ }
}
bool
SGAnimation::animate(osg::Node* node, const SGPropertyNode* configNode,
SGPropertyNode* modelRoot,
- const osgDB::ReaderWriter::Options* options)
+ const osgDB::Options* options)
{
std::string type = configNode->getStringValue("type", "none");
if (type == "alpha-test") {
} else if (type == "translate") {
SGTranslateAnimation animInst(configNode, modelRoot);
animInst.apply(node);
+ } else if (type == "light") {
+ SGLightAnimation animInst(configNode, modelRoot);
+ animInst.apply(node);
} else if (type == "null" || type == "none" || type.empty()) {
SGGroupAnimation animInst(configNode, modelRoot);
animInst.apply(node);