~ubuntu-branches/ubuntu/trusty/openscenegraph/trusty

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgPlugins/OpenFlight/RoadRecords.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-07-29 04:34:38 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080729043438-no1h9h0dpsrlzp1y
* Non-maintainer upload.
* No longer try to detect (using /proc/cpuinfo when available) how many
  CPUs are available, fixing the FTBFS (due to -j0) on various platforms
  (Closes: #477353). The right way to do it is to support parallel=n in
  DEB_BUILD_OPTIONS (see Debian Policy §4.9.1), and adequate support has
  been implemented.
* Add patch to fix FTBFS due to the build system now refusing to handle
  whitespaces (Policy CMP0004 say the logs), thanks to Andreas Putzo who
  provided it (Closes: #482239):
   - debian/patches/fix-cmp0004-build-failure.dpatch
* Remove myself from Uploaders, as requested a while ago, done by Luk in
  his 2.2.0-2.1 NMU, which was never acknowledged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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
 
1
14
//
2
15
// OpenFlight� loader for OpenSceneGraph
3
16
//
4
 
//  Copyright (C) 2005-2006  Brede Johansen
 
17
//  Copyright (C) 2005-2007  Brede Johansen
5
18
//
6
19
 
7
20
#include <osg/Notify>
27
40
 
28
41
        META_setID(_roadSegment)
29
42
        META_setComment(_roadSegment)
30
 
        META_setMatrix(_roadSegment)
31
43
        META_setMultitexture(_roadSegment)
32
44
        META_addChild(_roadSegment)
 
45
        META_dispose(_roadSegment)
33
46
 
34
47
    protected:
35
48
 
36
49
        virtual ~RoadSegment() {}
37
 
 
38
 
        virtual void readRecord(RecordInputStream& /*in*/, Document& /*document*/)
 
50
        virtual void readRecord(RecordInputStream& in, Document& /*document*/)
39
51
        {
40
52
            _roadSegment = new osg::Group;
 
53
            std::string id = in.readString(8);
 
54
 
 
55
            _roadSegment->setName(id);
41
56
 
42
57
            // Add to parent.
43
58
            if (_parent.valid())
62
77
 
63
78
        META_setID(_roadConstruction)
64
79
        META_setComment(_roadConstruction)
65
 
        META_setMatrix(_roadConstruction)
66
80
        META_setMultitexture(_roadConstruction)
67
81
        META_addChild(_roadConstruction)
 
82
        META_dispose(_roadConstruction)
68
83
 
69
84
    protected:
70
85
 
71
86
        virtual ~RoadConstruction() {}
72
 
 
73
 
        virtual void readRecord(RecordInputStream& /*in*/, Document& /*document*/)
 
87
        virtual void readRecord(RecordInputStream& in, Document& /*document*/)
74
88
        {
75
89
            _roadConstruction = new osg::Group;
76
90
 
 
91
            std::string id = in.readString(8);
 
92
 
 
93
            _roadConstruction->setName(id);
 
94
 
77
95
            // Add to parent.
78
96
            if (_parent.valid())
79
97
                _parent->addChild(*_roadConstruction);
97
115
 
98
116
        META_setID(_roadPath)
99
117
        META_setComment(_roadPath)
100
 
        META_setMatrix(_roadPath)
101
118
        META_setMultitexture(_roadPath)
102
119
        META_addChild(_roadPath)
 
120
        META_dispose(_roadPath)
103
121
 
104
122
    protected:
105
123
 
106
124
        virtual ~RoadPath() {}
107
 
 
108
125
        virtual void readRecord(RecordInputStream& /*in*/, Document& /*document*/)
109
126
        {
110
127
            _roadPath = new osg::Group;