Hi,

I'm new here and start directly with a question.

I add a osg::text to a geode, this works but there a 2 different Ways to find 
the Node where to add it. 

1. I search nodetree with the NodeVisitor class, but this class didn't find my 
Nodes wich are directly in the osg.ive of the scene. 

Code:

dtABC::Application& app = 
GetGameActorProxy().GetGameManager()->GetApplication();
        dtCore::Scene* scene = app.GetScene();
        LabelGroup =scene->GetSceneNode();
        FindLabel.setNameToFind("geom-feuermelder");
        LabelGroup->accept(FindLabel);
        FindLabel.getNodeList();
        for(int i= 0;i <FindLabel.foundNodeList.size(); i++)
        {
                osg::Node *vectorfield=FindLabel.foundNodeList.at(i);
                setlabel.addTextLabel(vectorfield,"Hallo Tree";
        }




2. search in the osg.ive with the find Node class. Now the class found my Nodes 
but my added Text will not show in the scene.

Code:

findNodeVisitor FindLabel;
        FindLabel.setNameToFind("pushbutton");
        if(!osgDB::fileExists("path_to_data"))
        {
                printf("wrong Data");
        }
        osg::Node* LabelGroup = osgDB::readNodeFile("path_to_data");
        Label setlabel;
        LabelGroup->accept(FindLabel);
        FindLabel.getNodeList();
        for(int i= 0;i <FindLabel.foundNodeList.size(); i++)
        {
                osg::Node *vectorfield=FindLabel.foundNodeList.at(i);
                setlabel.addTextLabel(vectorfield,"Hallo Datei");
        }




The question is, could i refresh my scene to show my label? 


Thank you!

Cheers,
Christoph[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39592#39592





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to