Results 1 to 2 of 2

Thread: Displaying 3d images with console output

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1

    Displaying 3d images with console output

    I have a collision detection program that works well in C++, but its all numeric. I want to be able to see the collision and how the objects are interacting. I essentially place two objects in a random space and see if they share points. How can I use OpenGl to view the objects and see how they are overlapping. I also need to be able to output to the console window to see how many points are ovelapping. Both of the objects are created by storing points that make up triangels into classes. Any help is much appreciated.

  2. #2
    Senior Member Frequent Contributor plasmonster's Avatar
    Join Date
    Mar 2004
    Posts
    739

    Re: Displaying 3d images with console output

    You could draw the objects with blending enabled and no depth testing (so neither object will be occluded). Something like some alpha blending might be nice, but experiment with the glBlendFunc parameters to get flavor you like. The idea is that you'll at least see a difference in (solid) color where the objects intersect.

    Another possibility is to render both objects as opaque solids, with depth writing and depth testing enabled, then render the objects again using lines (or use glPolygonMode with GL_LINE) and no depth testing. This way you'll see the difference between the lines and the solids (if any). This is the approach taken by the Quake Radiant editor, so you can see the intersection of the selected brush with the world (very handy when placing things).

    If your collision code generates contact points, nothing beats big red/yellow points in space for visualization.

    Perhaps a combination of all the above, or maybe something cooler I haven't thought of (yet ).

    For displaying (contact) information on the screen, a simple text overlay is awfully helpful, and may be preferable to a wintry digit blizzard in the console.

Similar Threads

  1. Displaying Images
    By johndoe in forum OpenVG
    Replies: 1
    Last Post: 01-02-2010, 12:46 PM
  2. Displaying images
    By ThunderSoul in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-11-2005, 10:18 PM
  3. Input/Output Console for OpenGL
    By Sunset in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-14-2004, 12:43 PM
  4. Not displaying images
    By Digity in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-15-2002, 05:12 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