1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGSIM_OBJECTRECORDDATA
15#define OSGSIM_OBJECTRECORDDATA 1
16
17#include <osg/Object>
18
19#include <ostream>
20
21namespace osgSim {
22
23/** When the OpenFlight importer encounters an Object record, it stores
24    the data in one of these classes, and attaches the instance of the
25    class as UserData to the corresponding osgLLGroup node.
26*/
27
28class ObjectRecordData : public osg::Object
29{
30    public:
31
32        ObjectRecordData()
33          : _flags( 0 ),
34            _relativePriority( 0 ),
35            _transparency( 0 ),
36            _effectID1( 0 ),
37            _effectID2( 0 ),
38
39            _significance( 0 )
40        {}
41
42        ObjectRecordData( const ObjectRecordData& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ):
43            osg::Object(copy, copyop)
44        {
45            _flags = copy._flags;
46            _relativePriority = copy._relativePriority;
47            _transparency = copy._transparency;
48            _effectID1 = copy._effectID1;
49            _effectID2 = copy._effectID2;
50            _significance = copy._significance;
51        }
52
53        META_Object( osgSim, ObjectRecordData );
54
55        static const unsigned int DONT_DISPLAY_IN_DAYLIGHT = 0x80000000u >> 0;
56        static const unsigned int DONT_DISPLAY_AT_DUSK     = 0x80000000u >> 1;
57        static const unsigned int DONT_DISPLAY_AT_NIGHT    = 0x80000000u >> 2;
58        static const unsigned int DONT_ILLUMINATE          = 0x80000000u >> 3;
59        static const unsigned int FLAT_SHADED              = 0x80000000u >> 4;
60        static const unsigned int GROUPS_SHADOW_OBJECT     = 0x80000000u >> 5;
61
62        unsigned int _flags;
63        short _relativePriority;
64        unsigned short _transparency; // 0=opaque, 65535=totally clear
65        short _effectID1;
66        short _effectID2;
67        short _significance;
68
69};  // end of class ObjectRecordData
70
71}   // end of namespace osgSim
72
73#endif
74