Original Post
Well... i'm not so good at C#. I have wrote a planet class, which implements sponeill's algorithm (found on gamasutra.com). It works, this isn't the problem. The problem is that my triangle splitting and merging function are awfully slow (my profiler indicate that most of the program time is used for splitting/merging the triangles from the planet). The algorithm has been converted from C++ (which was using lots of pointers; triangles have pointers to neighbors, and so on). When I did the conversion, I translated all to objects references (now, instead of neighbors array being pointers to objects, this is an array of objects references). I also use a lot of pure getter/setters in my splitting/merging functions, and was wondering: - does the use of pointers speed up considerably things? - does the overhead use of getter/setters be neglectible (tested, seems to)? - do you know other well known optimisations that I should be cared of? I'm not currently near my computer, but i'll post some profiling results to show where the program use most of it's time.