[vtkusers] Find closest point on Mesh B from a point on Mesh A.

Ambar C ambarc at gmail.com
Sat Nov 27 17:06:43 EST 2010


I didn't know of that class. How would the two methods be different?

On Sat, Nov 27, 2010 at 2:01 PM, Jim Peterson <jimcp at cox.net> wrote:
> Ambar,
> I guess I am confused too. Why not use vtkPointLocator.FindClosestPoint()
> with point data?
>
> Jim
>
> Ambar C wrote:
>>
>> Hello,
>>
>> I have two meshes A and B. For each point on A, I need to find the
>> point on B that is closest to it. I looked up
>> vtkCellLocator::FindClosestPoint, and have a few questions about it.
>>
>> 1. In the function prototype
>>
>> virtual void vtkCellLocator::FindClosestPoint   (       double  x[3],
>> double
>>        closestPoint[3], vtkGenericCell *       cell, vtkIdType &
>> cellId, int &
>>        subId, double &         dist2   )
>>
>> - What is the subId field? I understand that it is populated if and
>> when a closest point is found, but am not sure as to what information
>> it ends up holding.
>> - dist2 equals the distance of the closest point from the point x?
>> - Which cell's ID does vtkCellId end up holding?
>>
>>
>> In general, I'm confused about the usage of this function. Suggestions?
>>
>> Best,
>> Ambar
>>
>
>



More information about the vtkusers mailing list