Improved the constness of parameters the Node::getWorldMatrices(..) method.

Added Drawable::getWorldMatrices(const Node*) method.
This commit is contained in:
Robert Osfield
2008-09-18 10:38:18 +00:00
parent 93d4090169
commit 0969a5384b
6 changed files with 27 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ namespace osg
class CollectParentPaths : public NodeVisitor
{
public:
CollectParentPaths(osg::Node* haltTraversalAtNode=0) :
CollectParentPaths(const osg::Node* haltTraversalAtNode=0) :
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_PARENTS),
_haltTraversalAtNode(haltTraversalAtNode)
{
@@ -46,7 +46,7 @@ namespace osg
}
}
Node* _haltTraversalAtNode;
const Node* _haltTraversalAtNode;
NodePath _nodePath;
NodePathList _nodePaths;
};
@@ -191,7 +191,7 @@ NodePathList Node::getParentalNodePaths(osg::Node* haltTraversalAtNode) const
return cpp._nodePaths;
}
MatrixList Node::getWorldMatrices(osg::Node* haltTraversalAtNode) const
MatrixList Node::getWorldMatrices(const osg::Node* haltTraversalAtNode) const
{
CollectParentPaths cpp(haltTraversalAtNode);
const_cast<Node*>(this)->accept(cpp);