[vtk-developers] Matrix3x3 and Matrix4x4 ShallowCopy

Marcus D. Hanwell marcus.hanwell at kitware.com
Sat Nov 28 18:21:20 EST 2009


On Sat, Nov 28, 2009 at 10:42 AM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> I added ShallowCopy functions to these classes:
> http://www.rpi.edu/~doriad/VTK_List/MatrixShallowCopy/
>
> I think it would be nice to commit them.
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20091128/57f1eb58/attachment.html>


More information about the vtk-developers mailing list