문제

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...

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top