Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: algorithms for CSG

Hybrid View

  1. #1
    Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    466

    algorithms for CSG

    Hi

    has anyone some ideas how to do CSG. I would like to do following

    class object;

    object sphere, cube;
    // adding faces (triangles)to cube and sphere so they describe themselves

    object intersect,combined;
    intersect = intersection(cube,shpere);
    combined = merge(cube,shere);

    //or using overloaded operators

    object op= (box&shpere) | (cylinder & ! pyramid);

    it would be helpful for me to get some ideas, perhaps some links or code ??

    Bye ScottManDeath

  2. #2
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    israel
    Posts
    332

    Re: algorithms for CSG

    i really dont know what you mean by this combined logic expression, but for a csg algo that support intersect, union and all those things, i would use the bsp tree method. i want to know more let me know.
    -ofer-

  3. #3
    Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    466

    Re: algorithms for CSG

    Hi

    yes I think that intersections and unions describe that what i want to do
    i would like to use operator & to get the object beeing the intersection between 2 others.
    the operator | would be the union object from 2 others

    Ive read something about BSP, but I think for a basic understandung of CSG it would be overkill?.

    Bye the way, the csg isn't menat to be done in realtime every frame, just once at startup

    What do you think about ?

    Bye
    ScottManDeath

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •