The online racing simulator
PTH files converted to WPF
(5 posts, started )
PTH files converted to WPF
I've been messing around with WPF quite a bit and I've converted all the LFS .pth files to XAML, so it's easy to drop a track model into your WPF app!

I've included the download below, but I also made a simple track viewer demo with WPF for the .NET Framework 3.5. It works pretty well I feel, although could do with some more work.

You can pan the track by dragging the mouse and can zoom in and out with either the mouse wheel or the +/- keypad buttons. You can reset the view by pressing esc.

Thanks!
Attached images
TrackDemo.png
Attached files
PthXaml.zip - 361.7 KB - 371 views
TrackViewerDemo_1.1.zip - 178 KB - 369 views
Quite useful, nice
I always wondered how to display an image from the PTH files. I tried with php imageGD and it always returned some random points, I don't know why
Quote from Flame CZE :Quite useful, nice
I always wondered how to display an image from the PTH files. I tried with php imageGD and it always returned some random points, I don't know why

I'd suggest looking at the code for the LFS Replay Analyser, I learned a lot from there. Most of the interesting stuff is in track.cpp, trackmap.cpp and trackpath.cpp.
Updated the TrackViewer demo to add world coordinates in the bottom left corner of the screen, these are LFS world-coordinates given in meters. I also coloured the non-track background a light grey, which makes it easier to see where the "LFS world" begins and ends.
Extremely cool!

PTH files converted to WPF
(5 posts, started )
FGED GREDG RDFGDR GSFDG