root/OpenSceneGraph/trunk/src/osgWrappers/serializers/osgVolume/VolumeTile.cpp @ 13041

Revision 13041, 1.3 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
Line 
1#include <osgVolume/Volume>
2#include <osgVolume/VolumeTile>
3#include <osgDB/ObjectWrapper>
4#include <osgDB/InputStream>
5#include <osgDB/OutputStream>
6
7static bool checkTileID( const osgVolume::VolumeTile& tile )
8{ return true; }
9
10static bool readTileID( osgDB::InputStream& is, osgVolume::VolumeTile& tile )
11{
12    osgVolume::TileID id;
13    is >> id.level >> id.x >> id.y >> id.z;
14    tile.setTileID( id );
15    return true;
16}
17
18static bool writeTileID( osgDB::OutputStream& os, const osgVolume::VolumeTile& tile )
19{
20    const osgVolume::TileID& id = tile.getTileID();
21    os << id.level << id.x << id.y << id.z << std::endl;
22    return true;
23}
24
25REGISTER_OBJECT_WRAPPER( osgVolume_VolumeTile,
26                         new osgVolume::VolumeTile,
27                         osgVolume::VolumeTile,
28                         "osg::Object osg::Node osg::Group osgVolume::VolumeTile" )
29{
30    ADD_OBJECT_SERIALIZER( Volume, osgVolume::Volume, NULL );  // _volume
31    UPDATE_TO_VERSION( 90 )
32    {
33        REMOVE_SERIALIZER( Volume );
34    }
35
36    ADD_BOOL_SERIALIZER( Dirty, false );  // _dirty
37    ADD_USER_SERIALIZER( TileID );  // _tileID
38    ADD_OBJECT_SERIALIZER( VolumeTechnique, osgVolume::VolumeTechnique, NULL );  // _volumeTechnique
39    ADD_OBJECT_SERIALIZER( Locator, osgVolume::Locator, NULL );  // _locator
40    ADD_OBJECT_SERIALIZER( Layer, osgVolume::Layer, NULL );  // _layer
41}
Note: See TracBrowser for help on using the browser.