WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Collision Detection and Nearest Point to Probe (https://forum.worldviz.com/showthread.php?t=1742)

xabbu 12-08-2008 04:36 AM

Collision Detection and Nearest Point to Probe
 
Hi,
I am currently working on implementing an interface to a haptic device in worldviz. What I am trying to figure out is the following:
I want to enable collision detection of the haptic probe with objects that are in range of the workspace of the haptic device. For the communication with the haptic device I need to get the closest point to the probe on the mesh surface of the colliding object once a collision occurs.
So I thought of waiting for the collision event callback being called and then iterating through the list of vertices of the colliding object and calculating the distance to my haptic probe. But I havent been able to find a mechanism to actually access the list of polygons/vertices of a colliding object to iterate over. Or maybe there is even an easier way in worldviz which I have not discovered yet. :p

Any advices?

thx in advance,

xaBBu

farshizzo 12-17-2008 11:08 AM

The position of the probe will always be on the mesh surface when it is colliding with an object. So you shouldn't need to do anything special other than getting the current position:
Code:

hd.get(hd.POSITION)

xabbu 01-06-2009 03:01 AM

Quote:

Originally Posted by farshizzo (Post 6874)
The position of the probe will always be on the mesh surface when it is colliding with an object. So you shouldn't need to do anything special other than getting the current position:
Code:

hd.get(hd.POSITION)

This would be only the case if I were to use a sensable haptic device, or am I wrong? So the collision detection is taking place in the openhaptics toolkit by sensable which is , as far as I know, not open source.

I on my part am developing a haptic device myselfe and aim at an interface for its control with worldviz. So I cant rely on the openhaptics lib by sensable...

So I guess I need to deal with the collision detection and calculation of the forces proportional to the penetration depth myselfe?


All times are GMT -7. The time now is 04:34 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC