Jump to content
  • Advertisement
Sign in to follow this  
ManagedJack

How to build a circular arc mesh at runtime?

This topic is 4511 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'd like to build a 3D-Environment with DirectX 9 that shows a track built of some 3D-curves such as straight and bended metal rods (circular arcs). The layout of the track is read from an xml-file. The problem is that an arc may have any length and radius. I started with modelling fixed-size meshes for the arcs, but that doesnt't cover all the possibilities (well, it's hard to model an infinite amount of meshes). I also thought of piecing together the arc with simple boxes, but that leads to intersections and gaps. Have you any ideas that could help me building these arcs? Is there maybe a function to create a mesh on device creation by extruding a plane (e.g. the profile of the curve)? The profile is the only thing which is constant. I think drawing arbitrary arcs is a common problem, but I didn't find adequate information yet. Thanks, Jack P.S I'm using MDX, but I think that is not a matter for this problem...

Share this post


Link to post
Share on other sites
Advertisement
What you're trying to do is sometimes referred to as "Procedural Modelling".

Have you had a look at how the vertices of a cylinder are computed in Tutorials 4 & 5 of the DX9SDK?

Also, Bezier curves and Bezier Patches are more complicated but are a good way of describing curves.

Gamasutra.com has an article with source code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!