]> git.mxchange.org Git - simgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Fri, 2 Feb 2007 07:00:54 +0000 (07:00 +0000)
committerfrohlich <frohlich>
Fri, 2 Feb 2007 07:00:54 +0000 (07:00 +0000)
simgear/scene/util/SGNodeMasks.hxx
simgear/scene/model/animation.cxx:
More finegrained cull masks

simgear/scene/model/animation.cxx
simgear/scene/util/SGNodeMasks.hxx

index a894b7ca8b020c012f4c1d1845bd73742b0c8dbb..3d2ab1df2d41728480c30a9feaa334aecfa21e26 100644 (file)
@@ -551,9 +551,9 @@ SGAnimation::install(osg::Node& node)
   else
     node.setNodeMask(~SG_NODEMASK_TERRAIN_BIT & node.getNodeMask());
   if (!_disableShadow)
-    node.setNodeMask( SG_NODEMASK_SHADOW_BIT | node.getNodeMask());
+    node.setNodeMask( SG_NODEMASK_CASTSHADOW_BIT | node.getNodeMask());
   else
-    node.setNodeMask(~SG_NODEMASK_SHADOW_BIT & node.getNodeMask());
+    node.setNodeMask(~SG_NODEMASK_CASTSHADOW_BIT & node.getNodeMask());
 }
 
 osg::Group*
@@ -1841,9 +1841,9 @@ public:
   virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
   {
     if (_condition->test())
-      node->setNodeMask( SG_NODEMASK_SHADOW_BIT | node->getNodeMask());
+      node->setNodeMask( SG_NODEMASK_CASTSHADOW_BIT | node->getNodeMask());
     else
-      node->setNodeMask(~SG_NODEMASK_SHADOW_BIT & node->getNodeMask());
+      node->setNodeMask(~SG_NODEMASK_CASTSHADOW_BIT & node->getNodeMask());
     traverse(node, nv);
   }
 
index 07d5a0edb8fc9e4a07b77c53dfb2b0218bf1fa6f..199cb2e04e0b7a7a0e7473fa37e711436af29f6e 100644 (file)
 
 /// If set, do terrain elevation computations with that nodes
 #define SG_NODEMASK_TERRAIN_BIT        (1<<0)
+/// If set, this is the main model of this simulation
+#define SG_NODEMASK_MAINMODEL_BIT      (1<<1)
 /// If set, cast shadows
-#define SG_NODEMASK_SHADOW_BIT         (1<<1)
+#define SG_NODEMASK_CASTSHADOW_BIT     (1<<2)
+/// If set, cast recieves shadows
+#define SG_NODEMASK_RECIEVESHADOW_BIT  (1<<3)
 /// If set, the node is pickable
-#define SG_NODEMASK_PICK_BIT           (1<<2)
+#define SG_NODEMASK_PICK_BIT           (1<<4)
 
 #endif