[vtk-developers] Proposed CenterOfMass function for vtkPoints

Berk Geveci berk.geveci at kitware.com
Thu Apr 1 09:26:56 EDT 2010


Can you post your latest implementation?

Also, if you wanted to optimize this method, I'd suggest using
GetValue()/GetTupleValue() (you would have to use some sort of macro
and a templated function). GetPoint() ends up calling GetTuple() which
is virtual.

-berk

On Thu, Apr 1, 2010 at 9:12 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Thu, Apr 1, 2010 at 8:52 AM, Will Schroeder
> <will.schroeder at kitware.com> wrote:
>> David-
>>
>> The phrase center of mass is an issue for many reasons, first if the
>> dataset has cells that are curved (higher order cells) your assumption
>> may not hold. Second, there is no mention of mass in the dataset API
>> and this will confuse people.
>
> This is a moot point because I think GetPointsCenter is more clear
> anyway (since there is no concept of mass, like you said), but since
> this function is in vtkPoints there is no concept of "cells" to
> interfere with anything - it is simply the center of the points.
>
> Ok, so what's the process from here? Do we wait a few days for more
> comments/suggestions?
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list