Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Apr 29, 2011 7:05 am 
Offline

Joined: Tue Apr 19, 2011 6:02 am
Posts: 12
I am new to Bullet physics,Any how after a quick study I implemented broadphase collision detection. Now I want to implement narrow phase by means of ray casting. I referred the demo app on ray casting but i didnt understood any thing.

So can anyone briefly explain how to implement ray casting in a simple manner....


Thanks...


Top
 Profile  
 
PostPosted: Mon May 02, 2011 3:23 pm 
Offline

Joined: Tue Feb 22, 2011 1:00 pm
Posts: 32
Hi,
actually this is not a trivial task. This is mostly something you must learn at university, in computer graphics. I doubt that someone will explain how to do it. The fastest way is to get a computer graphics book, the kind which explains how to construct a game engine, or image processing book.

I looked myself into the code of bullet demos, and what I understood is that there is a raycast from the camera to the 2D screen, testing the collision of the casted ray with the objects of the scene. this technique will not work if you must do a raycast from a 3D cursor in your world though.

Try to search on google books.


Top
 Profile  
 
PostPosted: Mon May 02, 2011 9:53 pm 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3744
Location: California, USA
Are you looking for a 3D ray cast query? Did you try using the rayTest query using the dynamics world?

Code:
virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;


"I looked myself into the code of bullet demos, and what I understood is that there is a raycast from the camera to the 2D screen, testing the collision of the casted ray with the objects of the scene. this technique will not work if you must do a raycast from a 3D cursor in your world though."

The ray cast query in Bullet is generally in 3D, with a 'from' and 'to. Why would this not work?
Thanks,
Erwin


Top
 Profile  
 
PostPosted: Tue May 03, 2011 4:40 am 
Offline

Joined: Tue Apr 19, 2011 6:02 am
Posts: 12
XMight wrote:
Hi,
actually this is not a trivial task. This is mostly something you must learn at university, in computer graphics. I doubt that someone will explain how to do it. The fastest way is to get a computer graphics book, the kind which explains how to construct a game engine, or image processing book.

I looked myself into the code of bullet demos, and what I understood is that there is a raycast from the camera to the 2D screen, testing the collision of the casted ray with the objects of the scene. this technique will not work if you must do a raycast from a 3D cursor in your world though.

Try to search on google books.


Thank U....


Top
 Profile  
 
PostPosted: Tue May 03, 2011 4:41 am 
Offline

Joined: Tue Apr 19, 2011 6:02 am
Posts: 12
Erwin Coumans wrote:
Are you looking for a 3D ray cast query? Did you try using the rayTest query using the dynamics world?

Code:
virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;


"I looked myself into the code of bullet demos, and what I understood is that there is a raycast from the camera to the 2D screen, testing the collision of the casted ray with the objects of the scene. this technique will not work if you must do a raycast from a 3D cursor in your world though."

The ray cast query in Bullet is generally in 3D, with a 'from' and 'to. Why would this not work?
Thanks,
Erwin



I was able to do ray casting...Thank you for the valuable information


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group