]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/ConditionNode.cxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / model / ConditionNode.cxx
index 56460bef45338dbb1d67613a5cabfc38755b3901..93a28cd1e7ed2ca66d00306d65a3fde946909b6a 100644 (file)
@@ -21,7 +21,8 @@
 
 #include "ConditionNode.hxx"
 
-#include <simgear/math/SGMath.hxx>
+#include <osgDB/Registry>
+#include <osgDB/Output>
 
 namespace simgear
 {
@@ -57,4 +58,25 @@ void ConditionNode::traverse(NodeVisitor& nv)
     }
 }
 
+namespace
+{
+bool ConditionNode_writeLocalData(const Object& obj, osgDB::Output& fw)
+{
+    const ConditionNode& cn = static_cast<const ConditionNode&>(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);
+}
 }