Hi, clone method is virtual and should return osg::Object*. you can dynamic cast (or even static cast if you are sure) to PiGeometry*.
"How can I force the program to call PiFaceGeometry::clone() if this is only a child of object, on which I called clone()? I am sorry If this question is silly, I am not a good C++ programmer and I hate C++" Learn something about virtual functions and polymorphism. Virtual functions does the magic for you and calls appropriate functions, if it's called from parent class. About DEEP and SHALLOW copy: shalow copy makes memberwise clone, so every variable in original object copies to new one. Only problem there is pointer, new object have same value and points to same objects. For example with shalow copy MatrixTransform, new one will have shared children with original. But deep copy (there are several types - deep copy all, deep copy children etc.) copies them too. What this does mean for your: you can simply call osg::Geometry::clone() and then do your job: copy variables edges and surfType, according to copyop (share array in shalow copy). Cheers, Filip ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44332#44332 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org