Hello!
I found a strange problem with vertex control ....
// This code works correctly:
osg:: Array * p_array = zzz-> geom-> getVertexArray ();
if (p_array)
{
std:: cout <<"type:" <<p_array-> getType ()
<<"size:" <<p_array-> getDataSize () <<"num elem:" <<p_array->
getNumElements () <<std :: endl;
}
// And returns the correct values (p_array-> getType () == 10)
// But this code does not work (vertices == NULL)
osg:: ref_ptr <osg::Vec3Array> vertices = dynamic_cast
<osg::Vec3Array*> (zzz-> geom-> getVertexArray ());
if (vertices)
{
vertices-> at (i). x () = x;
vertices-> at (i). y () = y;
vertices-> at (i). z () = z;
}
else
{
std:: cout <<"getVertexArray false" <<std:: endl;
}
And ... does not work osg::Animation::morph ... (dynamic_cast
<osg::Vec3Array*>)
This code work fine, but not work inside QT (AdapterWidget) at Linux
.... (in Windows work fine).
Linux: Ubuntu 10.04 amd64
QT: Using Qt version 4.6.2
GCC: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
OSG: 2.9.9.
Where is the problem?? How does it solve?
Maxim Gammer
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org