BloodRedd / gamekit

Automatically exported from code.google.com/p/gamekit
1 stars 0 forks source link

[PATCH] gkRayTest and ray sensor fixes and x-ray mode #234

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've attached a patch with the following changes:

- gkRayTest asked for a Ogre::ray (with no equivalent gk* type) which later add 
the parameters, which is weird when you want to give both absolute coordinates 
directly.

  The method collides() has been modified to receive absolute coordinates, and also can receive a callback function to extend its functionality (such as x-ray mode)

  An overloaded collides(Ogre::ray) is added for compatibility.

- gkRaySensor was using world coordinates instead of the expected local ones, 
rendering the brick useless in most cases. Fixed.

- X-ray functionality has been added to gkRaySensor.

A .blend has been attached which tests both modes.

Original issue reported on code.google.com by kungfoobar@gmail.com on 18 May 2012 at 11:19

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I've rewrote part of the patch, making much more readable C++/Bullet style 
callbacks instead of the ugly C style pointer-to-function.

I deleted the first patch, a part was missing, there was a bug and it was ugly 
overall.

Original comment by kungfoobar@gmail.com on 21 May 2012 at 6:07

Attachments:

GoogleCodeExporter commented 8 years ago
Done. Thx for the patch!

Original comment by thomas.t...@googlemail.com on 6 Jun 2012 at 12:10

GoogleCodeExporter commented 8 years ago
Thanks for commiting!

Btw, I noticed there's a gkRay type, which is just a typedef of Ogre::Ray.

Original comment by kungfoobar@gmail.com on 6 Jun 2012 at 12:15