Hello,
One of the example code snippet under the "Basic" link considered to be
changed as it is giving error while compiling
***************the code snippet*********************'
// This code manipulates the "children" and "parent" fields
// of Nodes directly. Do NOT do that in your own code, use addChild,
// subChild, etc.
NodePtr uncle = Node::create();
setName(uncle, "Uncle");
beginEditCP(grandpa);
grandpa->getMFChildren()->push_back(uncle); // add uncle to
grandpa's children
endEditCP(grandpa);
beginEditCP(uncle);
uncle->setParent(grandpa); // set uncle's parent to grandpa
endEditCP(uncle);
cout << "Grandpa's children: ";
MFNodePtr::iterator it = grandpa->getMFChildren()->begin();
MFNodePtr::iterator end = grandpa->getMFChildren()->end();
for(; it != end; ++it)
cout << getName(*it) << " ";
********************************************************************
[EMAIL PROTECTED]:~/openSG/opSG/test$ make testOSG
g++ -D_GNU_SOURCE -DQT_CLEAN_NAMESPACE -DOSG_WITH_GLUT -DOSG_WITH_QT
-DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG -D_OSG_HAVE_CONFIGURED_H_
-DQT_NO_XINERAMA -DQT_NO_XRENDER -DQT_NO_XFTFREETYPE -DQT_NO_XKB
-DQT_NO_SM_SUPPORT -DQT_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG
-DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE
-DQT_NO_STYLE_COMPACT -ansi -use_readonly_const -ftemplate-depth-100
-fPIC -O3 -DOSG_WITH_GLUT -DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG
-I/usr/include/ -I/usr/include/ -I/usr/include/ -I/usr/include/GL/
-I/usr/local/include -c testOSG.cpp
/usr/local/include/OpenSG/OSGNodeImpl.inl: In function ‘int main(int,
char**)’:
/usr/local/include/OpenSG/OSGNodeImpl.inl:326: error: ‘void
osg::Node::setParent(const osg::NodePtr&)’ is protected
testOSG.cpp:66: error: within this context
make: *** [testOSG.o] Error 1
but i could avoid the error if i use grandpa->addChild(uncle);
Do you consider to change ?
Sajjad
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users