Looks nice. My personal favorite though are splines that go through the points, using next ones in the route as control points. It's propably called Catmull-rom.
And there it was: http://www.pascalgamedevelopment.com...ll=1#post38234
Looks nice. My personal favorite though are splines that go through the points, using next ones in the route as control points. It's propably called Catmull-rom.
And there it was: http://www.pascalgamedevelopment.com...ll=1#post38234
Last edited by User137; 11-04-2011 at 03:37 PM.
Yes I know how to draw those too. This program will be use Bezier-splines because I found them to be most effective for tunnels used in race-games. Feel free to extend the program to support Catmull-Rom splines, once I have published the source.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Nice indeed, I may even in fact have a use for this one, and that isn't something I can say about most of the stuff on my HDD, or even in my life. Sweet. It saves into XML right? Any chance of CSV? With my coming up with a XML parsing system almost from the ground up I'm trying to avoid it like the plague for now
I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.
It doesn't do much yet, but I'm planning on XML import/export. I keep the export functionality separated from the rest of my code, so you can easily add CSV support yourself.
You can now drag a "handle" to the side of the screen and it will start scrolling in that direction. Very handy when working on large splines with loads of detail.
Update: Just made the entire view menu functional. You can switch between XY, YX and XZ view-planes, zoom in/out, show/hide the tangents and reset the camera of the viewport. If I can keep going at this rate, I will be done next weekend.
Last edited by chronozphere; 11-04-2011 at 09:56 PM.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Holidays are great for that: work work work work work! Loving it so far... About 1400 lines down, an estimated 2500 more to go. At this rate, I can have 1 or 2 days for school work and still have 4-5 days R&R, so its looking good. Hate weeks for that because once you finish school, do work, chill for 5 mins, play some black ops and etc, you only end up with enough time to open up your IDE, check out where you were and close it again
I assume its all based on the bezier curve am I right? Although the GUI might not be exactly my area of interest, the algorithm and implementation would definitely be handy, an porting required to get it over to OpenGL or is it written in OGL from the start?
cheers,
code_glitch
I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.
I separated the spline from the rendering part (like everyone else should do!), so you can fetch my spline class and just get a list of line segments out of that. I also have other spline code for different kinds such as Catmull-rom and Hermite splines, if you're interested. I won't use them in the editor though.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Bookmarks