Hi,

Here's the code first:

class TGTextNode : public osg::Geode
{
public:
    TGTextNode(std::string T_Text, int T_Size, int T_Res, int T_PosX,
        int T_PosY, int T_PosZ);

    void addOutline();
};

TGTextNode::TGTextNode(std::string T_Text, int T_Size, int T_Res, int T_PosX,
        int T_PosY, int T_PosZ)
{
        osg::ref_ptr<osgText::Text> textobj = new osgText::Text;
        textobj->setAlignment(osgText::Text::CENTER_CENTER);
        textobj->setCharacterSize(T_Size);
        textobj->setFont("bewilder.ttf");
        textobj->setFontResolution(T_Res, T_Res);
        textobj->setPosition(osg::Vec3(T_PosX, T_PosY, T_PosZ));
        textobj->setColor(osg::Vec4(100, 50, 0, 1));
        textobj->setAxisAlignment(osgText::Text::SCREEN);
        textobj->setText(T_Text);
        //textobj->setBackdropType(osgText::Text::OUTLINE);
        //textobj->setBackdropColor(osg::Vec4(1,.1,.1,1));
        textobj->setDataVariance(osg::Object::DYNAMIC);
        this->addDrawable(textobj.get());
}

void TGTextNode::addOutline()
{
        textobj->setBackdropType(osgText::Text::OUTLINE);
        textobj->setBackdropColor(osg::Vec4(1,.1,.1,1));
}

The point is that textobj in Function addOutline is an unknown member for the 
compiler. My first thought was that i need an copyconstructor. I tried to 
implement one but with no success. Can you help me. I know that this is maybe a 
bit noobish, but im really stuck here.

Thank you!

Cheers,
Thorsten

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





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

Reply via email to