Exemple #1
0
    void apply(osg::Transform &node)
    {
        osg::MatrixTransform* bone = node.asMatrixTransform();
        if (!bone)
            return;

        mCache[bone->getName()] = std::make_pair(getNodePath(), bone);

        traverse(node);
    }
Exemple #2
0
    void apply(osg::Transform &node)
    {
        osg::MatrixTransform* bone = node.asMatrixTransform();
        if (!bone)
            return;

        mCache[Misc::StringUtils::lowerCase(bone->getName())] = std::make_pair(getNodePath(), bone);

        traverse(node);
    }
void ComputeBoundingBoxVisitor::apply(osg::Transform& node)
{
    if(node.asMatrixTransform() || node.asPositionAttitudeTransform())
    {
        osg::Matrix prevMatrix = m_curMatrix;

        //m_curMatrix.preMult(node.asMatrixTransform()->getMatrix());
	node.computeLocalToWorldMatrix(m_curMatrix,this);

        traverse(node);

        m_curMatrix = prevMatrix;
    }
}