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

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgPlugins/ive/Sequence.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:
35
35
 
36
36
    // Write Sequence's properties.
37
37
 
 
38
    if (out->getVersion() >= VERSION_0022)
 
39
    {
 
40
        // Write default frame time
 
41
        out->writeFloat(getDefaultTime()) ;
 
42
    }
 
43
 
38
44
    // Write frame times.
39
45
    int size = getNumChildren();
40
46
    out->writeInt(size);
42
48
    {
43
49
        out->writeFloat(getTime(i));
44
50
    }
 
51
    
 
52
    if (out->getVersion() >= VERSION_0022)
 
53
    {
 
54
        // Write last frame time
 
55
        out->writeFloat(getLastFrameTime()) ;
 
56
    }
 
57
 
45
58
    // Write loop mode & interval
46
59
    osg::Sequence::LoopMode mode;
47
60
    int begin, end;
60
73
    // Write sequence mode
61
74
    out->writeInt(getMode());
62
75
 
 
76
    if (out->getVersion() >= VERSION_0022)
 
77
    {
 
78
        // Write sync as an integer
 
79
        bool sync ;
 
80
        getSync(sync) ;
 
81
        out->writeInt((int)sync) ;
 
82
 
 
83
        // Write clearOnStop as an integer
 
84
        bool clearOnStop ;
 
85
        getClearOnStop(clearOnStop) ;
 
86
        out->writeInt((int)clearOnStop) ;
 
87
    }
 
88
 
63
89
}
64
90
 
65
91
void Sequence::read(DataInputStream* in)
82
108
        }
83
109
 
84
110
        // Read Sequence's properties
 
111
 
 
112
        if (in->getVersion() >= VERSION_0022)
 
113
        {
 
114
            // Read default frame time
 
115
            setDefaultTime(in->readFloat());
 
116
        }
 
117
 
85
118
        // Read frame times.
86
119
        int size = in->readInt();
87
120
        for(int i=0;i<size;i++)
88
121
        {
89
122
            setTime(i, in->readFloat());
90
123
        }
 
124
    
 
125
        if (in->getVersion() >= VERSION_0022)
 
126
        {
 
127
            // Read last frame time
 
128
            setLastFrameTime(in->readFloat());
 
129
        }
 
130
 
91
131
        // Read loop mode & interval
92
132
        int mode = in->readInt();
93
133
        int begin = in->readInt();
101
141
 
102
142
        // Read sequence mode
103
143
        setMode((osg::Sequence::SequenceMode)in->readInt());
 
144
 
 
145
        if (in->getVersion() >= VERSION_0022)
 
146
        {
 
147
            // Read sync from an integer
 
148
            setSync((in->readInt())!=0) ;
 
149
 
 
150
            // Read clearOnStop from an integer
 
151
            setClearOnStop((in->readInt())!=0) ;
 
152
        }
104
153
    }
105
154
    else
106
155
    {