X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Fmodel%2FConditionNode.cxx;h=93a28cd1e7ed2ca66d00306d65a3fde946909b6a;hb=32a6bd78d8bf143f40922f1a0bc7a88ea7706a7d;hp=8003caa11102e66ac5136680b4c836ee1b7c424b;hpb=3372f9fc0de09087511fa57fda2b32ec95e8601c;p=simgear.git diff --git a/simgear/scene/model/ConditionNode.cxx b/simgear/scene/model/ConditionNode.cxx index 8003caa1..93a28cd1 100644 --- a/simgear/scene/model/ConditionNode.cxx +++ b/simgear/scene/model/ConditionNode.cxx @@ -15,9 +15,14 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // +#ifdef HAVE_CONFIG_H +# include +#endif + #include "ConditionNode.hxx" -#include +#include +#include namespace simgear { @@ -53,4 +58,25 @@ void ConditionNode::traverse(NodeVisitor& nv) } } +namespace +{ +bool ConditionNode_writeLocalData(const Object& obj, osgDB::Output& fw) +{ + const ConditionNode& cn = static_cast(obj); + // Can't really print out conditions + fw.indent() << "expression "; + if (cn.getCondition()) + fw << "yes\n"; + else + fw << "no\n"; + return true; +} + +osgDB::RegisterDotOsgWrapperProxy g_ConditionNodeProxy( + new ConditionNode, + "simgear::ConditionNode", + "Object Node simgear::ConditionNode Group", + 0, + &ConditionNode_writeLocalData); +} }