[vtk-developers] Add GetPoint function to vtkStructuredGrid

David Doria daviddoria+vtk at gmail.com
Fri Feb 5 16:10:27 EST 2010


On Fri, Feb 5, 2010 at 1:47 PM, Francois Bertel <francois.bertel at kitware.com
> wrote:

> Use vtkStructuredData::ComputePointIdForExtent() to get the point id,
> then get the coordinates on the vtkPoints object.
>
> and your code is wrong:
> 1.you passes arguments x,y,z per value
> 2.you check and compute against dimensions instead of extent.
>

I didn't say we had to cut and paste this... this is the idea of bouncing
things off the mailing list rather than just committing the, right?

What is wrong with passing 3 int's by value? I thought you didn't have to
pass by reference unless the object was large (so you don't make a local
copy).

You recommend changing GetDimensions to GetExtent, but isn't it the
dimensions of the grid that we are interested in a case like this? The
function seems to behave properly.

I still think this would be useful, as clearly no one would know to call
ComputePointIdForExtent and then get the coordinates of the resulting
object. Even if they knew to do that, it is very awkward.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100205/712e6b4a/attachment.html>


More information about the vtk-developers mailing list