Question

I'm making a simple 3D racing game for my project. I'm wondering about using the Catmull-Rom splines.

I've set the texture of it. I've also created a functional which takes 4 points and t (the distance between the 2 nearest control points). I've initialized the spline to take 4 CVector3f's, but now i don't know what to do, i.e. how to render it, how to create curves...

Was it helpful?

Solution

As I said,just render your splines as line segments.For fixed pipeline,if you made more research effort, you would find this.If you plan to use modern OpenGL just pack all the segment start-end points into buffer and draw lines.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top