[vtkusers] vtkPointLocator & Collision avoidance

Mysore Siddu siddumd at yahoo.co.in
Thu Oct 10 09:17:53 EDT 2002


 Hi vtk Users,

 I have two questions:

 

1.      From cellLocator->IntersectWithLine I compute the intersection point and its cellID on the STL file. Now I want to find all the points within a radius around the intersection point. I tried using vtkPointLocator::FindPointsWithinRadius(radius, point, vtkIdList *result) But I was not successful with the following code:

                  float p1[] = {2.0, 1.0, 3.0};

float rad = 2.0;

vtkIdList *res;

// Build a locator 

vtkPointLocator *pointLocator = vtkPointLocator::New();

pointLocator->SetDataSet(STLReader->GetOutput());

pointLocator->FindPointsWithinRadius(rad,p1,res);

pointLocator->BuildLocator();

 I don’t know where I am goofing up the code. As soon as Execute I am getting error as ”Memory can’t be assigned error” I debugged the code it is stopping at  vtkIdList.h // Description:

// Reset to an empty state.

void Reset() {this->NumberOfIds = 0;};

*/

 

 

2.      Is there any vtk class, which I can use for collision avoidance? Basically I have two STL files and I want to check the collision around a particular point.

 

Any Help in this regard is very well appreciated.

 Best Regards

Siddu.



 Yahoo! Properties Special  Buy, sell, rent...your flat, or even post an ad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021010/9f761d07/attachment.htm>


More information about the vtkusers mailing list