Mathias Fr�hlich writes:
>
> To implement that efficient, I think that a FGInterface or some class in that
> area should cache this information and should provide an interface that could
> easily used to query some properties of the ground in the area of the
> aircraft.
>
> I wanted to start with code which can better follow the ground level in the
> area of the aircraft. Also I think it is interresting to distinguish
> different load capacities of solid ground. Or/and different ground types like
> asphalt, grass or water.
This should be doable using the current hitlist mechanism
and the current PLib code --untested but something like--
ssgEntity *entity_hit = hitlist -> get_entity( active_hit_idx );
if (entity_hit && entity_hit -> isAKindOf ( ssgLeaf () ) )
{
ssgState *st = ((ssgLeaf *)entity_hit) -> state;
if ( st != NULL && st -> isAKindOf ( ssgTypeSimpleState () ) )
{
ssgSimpleState *ss = (ssgSimpleState *) st ;
char *tfname = ss -> getTextureFilename () ;
/// !!! do something based on texture filename
}
}
HTH
Norman
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel