Skip to main content
GameDev.net gamedev.net
🔒 Locked

Cardinal Splines

Started by lincsimp Dec 31, 2004 at 5:12 AM 3 replies 1.8k views
Original Post
lincsimp
lincsimp
Hi I'm using c# in a game development project, can anyone point me to a cardinal splines tutorial with c# code that doesn't use the gdi, but uses managed directx? Thanks very much
Mushu
Mushu
As far as I know, there is no nice built-in function for drawing cardinal splines with DirectX. You'll have to write your own.

This site has information on interpolating different types of curves, and should help you should you chose to write your own functions.

But are you after this because you need to draw a cardinal spline? Or do you just want curves? What'cha doing?
lincsimp
lincsimp
Thanks that looks good and was what I was after, basically I was looking for a fairly easy way to create a curved 3D camera path and my mathy friend just said I should use cardinal splines, do you think that they are the best ones to use?
Also I would like to find a directx implementation to have a look at to find the best way to approach the prob...

Thanks very much
helix
helix
I would think just using the built in spline functionalty (to D3DX) would be simpler. Plus maybe throw in some quaternions for smooth rotations, etc.
lincsimp
lincsimp
Thanks, in the end I settled on this, which seems to work:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_m/directx/ref/ns/microsoft.directx/c/unsafenativemethods.vector3/m/hermite.asp
Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.