Re: Points and Polygons

Frederic Bouvier <[email protected]> Thu, 02 Jun 2005 21:23:44 +0200
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <[email protected]>
[email protected] a écrit :

>Hi,
>
>I need to know what area is next to another area, for example, if i'm using a
>road's polygon i would like to know what kind of polygons are next to this, if
>there is another road's polygon, or a polygon from a river, from an ocean, from
>an urban area,.... I've been looking for a routine in Terragear but i can't find
>it. Does somebody know if exists a routine that returns the polygon or polygons
>from a definite point, or a routine that returns all the polygons next to the
>polygon i have?
>  
>

TerraGear is there to build scenery. It is not made to introspect 
already built scenery.
A scenery tile is made of simple triangles, triangle strips or triangle 
fans but the relationship between these elements are not stored in the 
.btg file.

FlightGear is able to make query on the terrain to find the current 
altitude. This is done by walking through the plib scene graph made at 
scenery load time.

So you should load your scenery in your own data structure and use a CG 
library to make the queries you want to do.
Or you can hack fgsd ( http://fgsd.sourceforge.net ) that is already 
doing that kind of task to edit an already built scenery.

More on the fgsd devel list if you want.

-Fred



_______________________________________________
Terragear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/terragear-devel
2f585eeea02e2c79d7b1d8c4963bae2d