From: frohlich Date: Fri, 2 Feb 2007 07:00:54 +0000 (+0000) Subject: Modified Files: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1bb6c03bd0877ebf4bc505a65d9efac6e85072dc;p=simgear.git Modified Files: simgear/scene/util/SGNodeMasks.hxx simgear/scene/model/animation.cxx: More finegrained cull masks --- diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index a894b7ca..3d2ab1df 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -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); } diff --git a/simgear/scene/util/SGNodeMasks.hxx b/simgear/scene/util/SGNodeMasks.hxx index 07d5a0ed..199cb2e0 100644 --- a/simgear/scene/util/SGNodeMasks.hxx +++ b/simgear/scene/util/SGNodeMasks.hxx @@ -24,9 +24,13 @@ /// 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