Results 1 to 2 of 2

Thread: Is there an easier way?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    Brisbane, QLD, Australia
    Posts
    1

    Is there an easier way?

    Ok.

    I've done some reading and I'm beginning to understand OpenGl. I've got a few things working like a spinning cube etc and I understand all my model/projection transformations.

    Now I've started to work on something more complicated, a simple maze for a car to drive through but I've been struck by how difficult it is to draw even simple shapes.

    I was thinking about a function to draw an extruded shape where you could define a list of points on a plane and a depth and the function would do all the work of drawing all the polygons of the faces and calculate the normals. However, this function would be hard to do if the shape defined by the list of points was not convex. Are there libraries of functions out there for simplifying these sort of tasks or am I missing something simple?

    It seems as though all the objects in source code I have seen have been very simple and haven't really helped me design any good data structures or given me good ideas.

    I'd really appreciate any help or pointers in the right direction.

    Thanks,

    Sam

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Is there an easier way?

    Well, you should have a look at http://reality.sgi.com/opengl/tips/T...lectLight.html . The page itself has nothing to do with what you are asking, but the code below has. There is some code for extruding polygons to solid objects. It can handle non-convex shapes too. The function you might wanna look at is called extrudeSolidFromPolygon(), located somewhere in the top third of the code.

Similar Threads

  1. Replies: 5
    Last Post: 12-22-2010, 05:12 AM
  2. An easier way to work with XML
    By Simon Sprott in forum COLLADA
    Replies: 0
    Last Post: 02-13-2005, 08:21 AM
  3. Easier method for lights in vertex program?
    By Ostsol in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 10-29-2003, 04:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean