Re: An update about geodesics
Christian Van Brussel <[email protected]> Fri, 07 Jun 2013 15:40:07 +0200
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Organization | UCL - TELE |
| Message-ID | <1370612407.2539.249.camel@scylla> |
Hi Benjamin, On Thu, 2013-06-06 at 01:45 -0400, B. Isherwood wrote: > First, I have chosen to use a truncated Icosahedron, since it has > exactly 12 pentagons and follows a very specific pattern of hexagons > and pentagons Although it is possible to map the squared terrain cells of CS to those pentagons and hexagons, are you sure that there aren't any other decomposition of the sphere that would use primitives that would be easier to map? Take for example the mapping described at http://mathproofs.blogspot.be/2005/07/mapping-cube-to-sphere.html In this mapping, each terrain cell get mapped quite easily to the sphere, and each cell of the mapping grid can be split and merged quite easily too for LOD management. Wouldn't it be a better decomposition to use? > have a few questions however, to save time since I was unsuccessful > last week at securing the time to work on it so I have just started > really working on this about 3 days ago, so I would like to know which > classes and functions I would have to look over to get a good grasp on > how your renderer works. So if you could get me a list of the classes > you think would be the most beneficial for me to look over I would be > very appreciative. The main interfaces that are interesting for you are the terrain2 ones, that is the ones in http://www.crystalspace3d.org/docs/online/api/terrain2_8h.html. The implementation of those interfaces are in plugins/mesh/terrain/terrain2 and you would need to modify this code in order to add the ability to map the terrain cells to the other primitives. After that you would need to create the tool that would manage the terrain mesh in order to create a sphere. You can probably do this by defining some new specific interfaces for that, to be put eg in a file include/imesh/planet.h, and you would implement this interface in a dedicated plugin eg in plugins/mesh/planet. To generate the terrain, you would use the libnoise wrapper that is in CS::Math::Noise. There is an application that is using it and that can be taken as an example, it's apps/tools/mocapviewer. Maybe this terrain generator can be put in a separate dedicated plugin too. Finally, for your test application, you can use the CS::Utility::DemoApplication interface and other related tools. ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j