[osg-users] osgSim::GeographicLocation

Robert Osfield robert.osfield at gmail.com
Wed Apr 20 01:05:25 PDT 2016


Hi Sebastian,

On 20 April 2016 at 08:17, Sebastian Messerschmidt <
sebastian.messerschmidt at gmx.de> wrote:

> Openflight databases seem to use this user-data at the root node to
> describe the geographic base coordinates of UTM-databases.
> Unfortunately this class doesn't seem to have a serializer for the osgXYZ
> file formats. What is the best way to add such serialization capabilities?
>

Been a very very long time since I heard mention of the
osgSim::GeoographicLocation class...  just been sitting there quietly
minding it's own business.

Looking at the implementation now the two parameters that need to be
serialized at the latitude and longitude paramters.  If these used the
setName()/getName() convention then it'd be easy to add serializers using
the standard ADD_DOUBLE_SERIALIZER( Name, 0.0); serializers (for instance
see the usage in src/osgWrappers/serializers/osg/ ).

As these don't follow the setName/getName() one will either have to write a
custom serializer for it or simply change the naming across to the
setName()/getName() convention that the almost all of the OSG uses.  I'd be
inclined to do the later.  Then just add the GeographicLocation serializers
to the src/osgWrappes/serializers/osgSim.  This would mean that the change
could only be add to OSG master and no backported to OSG-3.4 or OSG-3.2 as
the ABI would change, but personally I'd be happy with this.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160420/480bb3df/attachment-0002.htm>


More information about the osg-users mailing list