X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Fmodel%2FConditionNode.cxx;h=93a28cd1e7ed2ca66d00306d65a3fde946909b6a;hb=32a6bd78d8bf143f40922f1a0bc7a88ea7706a7d;hp=e68cfa21adb1e69c552e6462b1f4f32dde3e18e5;hpb=fef625ce27ac50cf301cc150401e26a8f02acc5e;p=simgear.git diff --git a/simgear/scene/model/ConditionNode.cxx b/simgear/scene/model/ConditionNode.cxx index e68cfa21..93a28cd1 100644 --- a/simgear/scene/model/ConditionNode.cxx +++ b/simgear/scene/model/ConditionNode.cxx @@ -15,8 +15,15 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // +#ifdef HAVE_CONFIG_H +# include +#endif + #include "ConditionNode.hxx" +#include +#include + namespace simgear { using namespace osg; @@ -51,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); +} }