Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyGTK track editor idea
05-04-2007, 10:09 AM,
#29
 
To find the height of the track at a given position, use TRACK::Elevation(VERTEX origin)

Do do mouse picking of objects you'll need the following function:
bool OBJECTS::Collide(VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest, VERTEX & normal, float seglen, OBJECTNODE * &colnode);

You give that function a ray segment (origin plus a normalized direction vector plus the ray length seglen), and you get back a collision point VERTEX (outtri), the normal of the collision point (normal), and a pointer to the OBJECTNODE (colnode) which is the object class. You can set closest to whatever works. It's supposed to toggle whether or not you get the closest collision or don't care, but I don't remember if it's working or not. Just use whatever value works.
Reply


Messages In This Thread
PyGTK track editor idea - by thelusiv - 02-07-2007, 12:24 AM
[No subject] - by cotharyus - 02-07-2007, 07:07 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-07-2007, 10:58 AM
[No subject] - by reece146 - 02-07-2007, 11:05 AM
[No subject] - by thelusiv - 02-07-2007, 06:40 PM
[No subject] - by reece146 - 02-07-2007, 09:42 PM
[No subject] - by thelusiv - 02-07-2007, 10:15 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-07-2007, 11:01 PM
[No subject] - by thelusiv - 02-07-2007, 11:16 PM
[No subject] - by thelusiv - 02-08-2007, 12:21 AM
[No subject] - by reece146 - 02-08-2007, 12:42 AM
[No subject] - by thelusiv - 02-08-2007, 05:36 AM
[No subject] - by rookie1 - 04-20-2007, 02:49 AM
[No subject] - by rookie1 - 04-20-2007, 10:32 AM
[No subject] - by thelusiv - 04-20-2007, 02:56 PM
[No subject] - by rookie1 - 04-22-2007, 12:23 AM
[No subject] - by thelusiv - 04-25-2007, 03:23 AM
[No subject] - by rookie1 - 04-27-2007, 04:38 AM
[No subject] - by thelusiv - 04-29-2007, 01:54 AM
[No subject] - by rookie1 - 04-29-2007, 05:53 AM
[No subject] - by rookie1 - 04-30-2007, 10:43 AM
[No subject] - by joevenzon_phpbb2_import3 - 04-30-2007, 10:43 PM
[No subject] - by rookie1 - 04-30-2007, 11:16 PM
[No subject] - by rookie1 - 05-01-2007, 07:06 AM
[No subject] - by rookie1 - 05-03-2007, 06:59 AM
[No subject] - by protomor - 05-03-2007, 10:55 AM
[No subject] - by thelusiv - 05-04-2007, 03:47 AM
[No subject] - by rookie1 - 05-04-2007, 07:07 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-04-2007, 10:09 AM
[No subject] - by thelusiv - 05-05-2007, 06:55 AM
[No subject] - by thelusiv - 05-05-2007, 05:45 PM
[No subject] - by thelusiv - 05-05-2007, 07:35 PM
[No subject] - by rookie1 - 05-05-2007, 11:23 PM
[No subject] - by thelusiv - 05-07-2007, 03:27 AM
[No subject] - by rookie1 - 05-07-2007, 09:48 AM
[No subject] - by rookie1 - 05-18-2007, 07:52 AM
[No subject] - by alanic - 05-30-2007, 02:08 PM
[No subject] - by thelusiv - 05-30-2007, 02:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)