FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Correct way to remove SIO2sensor?

3 posters

Go down

Correct way to remove SIO2sensor? Empty Correct way to remove SIO2sensor?

Post  yarri Tue Apr 28, 2009 4:29 pm

Hi, I've set up a distance sensor with sio2SensorInitDistance() and "rendering" it using the SIO2_EVALUATE_SENSOR flag in my sio2ResourceRender() call. I trigger the sensor but having trouble removing or disabling the sensor. A immediate call to sio2SensorFree() in the sensor callback function isn't thread safe it seems, do I have to set up a queue to remove sensors?

Thanks,
--yarri

yarri

Posts : 81
Join date : 2009-04-10

Back to top Go down

Correct way to remove SIO2sensor? Empty Re: Correct way to remove SIO2sensor?

Post  sio2interactive Tue Apr 28, 2009 4:35 pm

Simply use a tag and remove it after calling sio2PhysicRender
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Correct way to remove SIO2sensor? Empty Re: Correct way to remove SIO2sensor?

Post  LuisLee Mon Sep 28, 2009 1:44 am

sio2interactive wrote:Simply use a tag and remove it after calling sio2PhysicRender

I tried it many times,but I didn't remove it safe?

I do not Understand what you mean,beacuse my poor english.

Could you said that specific point? thank you very much.
Very Happy

LuisLee

Posts : 85
Join date : 2009-04-26
Age : 37

Back to top Go down

Correct way to remove SIO2sensor? Empty Re: Correct way to remove SIO2sensor?

Post  yarri Mon Sep 28, 2009 9:15 pm

Hi, it means either set a list of all sensors to be removed (or "tag" them by setting the userData pointer and iterate over all sensors to remove the "tagged" ones) and remove them in the physics thread. Works great.

--yarri

yarri

Posts : 81
Join date : 2009-04-10

Back to top Go down

Correct way to remove SIO2sensor? Empty Re: Correct way to remove SIO2sensor?

Post  LuisLee Mon Sep 28, 2009 9:31 pm

yarri wrote:Hi, it means either set a list of all sensors to be removed (or "tag" them by setting the userData pointer and iterate over all sensors to remove the "tagged" ones) and remove them in the physics thread. Works great.

--yarri


OK!thank you very much! I got it!

LuisLee

Posts : 85
Join date : 2009-04-26
Age : 37

Back to top Go down

Correct way to remove SIO2sensor? Empty Re: Correct way to remove SIO2sensor?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum