All osg::Obejct subclasses implement a cloneType() or clone() method
that you can use to create a copy of the same type or do a
shallow/deep copy respectively. This clone being just a virtual
function in a base class return a pointer to osg::Object* so you'll
need to do a cast.
There is also a osg::clone() and osg::cloneType() templates that do
the clone and return the the same type pointer so it does the cast
making it a bit more convineint ot use.
So do something like
osg::ref_ptr<osg::Array> texCoordArrayClone =
On 26 January 2018 at 15:44, Werner Modenbach
I have to copy data from given arrays (i.e.
into new arrays of the same type. So I have to do something like
osg::Geometry::ArrayList textureCoords =
for (int i=0; i<textureCoordsNew.size(); i++)
textureCoordsNeu[i] = new ???
// Do some manipulation and resorting
Has anybody a hint for me how to solve this?
Many thanks in advance.
- Werner -
Post generated by Mail2Forum