Added calling of the LightSource and ClipNode as Group by the NodeVisitor and

fixed the CullVisitor and Optimizer to take account of this.
This commit is contained in:
Robert Osfield
2002-08-22 09:19:41 +00:00
parent ed3d083368
commit c45c3d3255
3 changed files with 9 additions and 5 deletions

View File

@@ -58,8 +58,8 @@ class PrintVisitor : public NodeVisitor
virtual void apply(Geode& node) { apply((Node&)node); }
virtual void apply(Billboard& node) { apply((Geode&)node); }
virtual void apply(LightSource& node) { apply((Node&)node); }
virtual void apply(ClipNode& node) { apply((Node&)node); }
virtual void apply(LightSource& node) { apply((Group&)node); }
virtual void apply(ClipNode& node) { apply((Group&)node); }
virtual void apply(Group& node) { apply((Node&)node); }
virtual void apply(Transform& node) { apply((Group&)node); }
@@ -382,6 +382,8 @@ void CullVisitor::apply(LightSource& node)
addPositionedAttribute(&matrix,light);
}
handle_cull_callbacks_and_traverse(node);
// pop the node's state off the geostate stack.
if (node_state) popStateSet();
}