[vtk-developers] Matrix3x3 and Matrix4x4 ShallowCopy

David Doria daviddoria+vtk at gmail.com
Sat Nov 28 18:28:58 EST 2009


> What is the shallow copy doing differently to the deep copy? The main
> difference seems to be that Updated() is not called when appropriate with
> ShallowCopy and it uses function calls (that would be slower) to copy each
> elements value. Wouldn't s true ShallowCopy copy the pointer to the data?
> If it would be useful I could add a ShallowCopy method, but as these classes
> declare double[4][4] and double[3][3] I am not sure ShallowCopy makes sense.
> Marcus
> --
> Marcus D. Hanwell, Ph.D.
> R&D Engineer, Kitware Inc.
> (518) 881-4937

Marcus -

DeepCopy is fine - I just didn't notice it as I never need to use it.
The only reason I added ShallowCopy is that I thought there was no
copy function at all. Case closed.

David



More information about the vtk-developers mailing list