- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgWrappers/deprecated-dotosg/osg/Sequence.cpp
r10970 r13041 90 90 Sequence& sw = static_cast<Sequence&>(obj); 91 91 92 if (fr.matchSequence("defaultTime")) 93 { 94 if (fr[1].isFloat()) 92 if (fr.matchSequence("defaultTime")) 93 { 94 if (fr[1].isFloat()) 95 95 { 96 96 float t; … … 101 101 } 102 102 } 103 else if (fr.matchSequence("frameTime {")) 103 else if (fr.matchSequence("frameTime {")) 104 104 { 105 105 int entry = fr[0].getNoNestedBrackets(); 106 106 fr += 2; 107 107 108 108 int i = 0; 109 while (!fr.eof() && fr[0].getNoNestedBrackets() > entry) 109 while (!fr.eof() && fr[0].getNoNestedBrackets() > entry) 110 110 { 111 111 float t; 112 if (fr[0].getFloat(t)) 112 if (fr[0].getFloat(t)) 113 113 { 114 114 sw.setTime(i, t); … … 117 117 } 118 118 } 119 119 120 120 iteratorAdvanced = true; 121 121 ++fr; 122 122 } 123 else if (fr.matchSequence("lastFrameTime")) 124 { 125 if (fr[1].isFloat()) 123 else if (fr.matchSequence("lastFrameTime")) 124 { 125 if (fr[1].isFloat()) 126 126 { 127 127 float t; … … 132 132 } 133 133 } 134 else if (fr.matchSequence("interval")) 134 else if (fr.matchSequence("interval")) 135 135 { 136 136 Sequence::LoopMode mode; 137 137 int begin, end; 138 138 if (Sequence_matchLoopMode(fr[1].getStr(), mode) && 139 fr[2].getInt(begin) && fr[3].getInt(end)) 139 fr[2].getInt(begin) && fr[3].getInt(end)) 140 140 { 141 141 sw.setInterval(mode, begin, end); … … 144 144 } 145 145 } 146 else if (fr.matchSequence("duration")) 147 { 148 if (fr[1].isFloat() && fr[2].isInt()) 146 else if (fr.matchSequence("duration")) 147 { 148 if (fr[1].isFloat() && fr[2].isInt()) 149 149 { 150 150 float speed; … … 157 157 } 158 158 } 159 else if (fr.matchSequence("mode")) 159 else if (fr.matchSequence("mode")) 160 160 { 161 161 Sequence::SequenceMode mode; 162 if (Sequence_matchSeqMode(fr[1].getStr(), mode)) 162 if (Sequence_matchSeqMode(fr[1].getStr(), mode)) 163 163 { 164 164 sw.setMode(mode); … … 167 167 } 168 168 } 169 else if (fr.matchSequence("sync")) 170 { 171 if (fr[1].isInt()) 169 else if (fr.matchSequence("sync")) 170 { 171 if (fr[1].isInt()) 172 172 { 173 173 int sync ; … … 178 178 } 179 179 } 180 else if (fr.matchSequence("clearOnStop")) 181 { 182 if (fr[1].isInt()) 180 else if (fr.matchSequence("clearOnStop")) 181 { 182 if (fr[1].isInt()) 183 183 { 184 184 int clearOnStop ; … … 189 189 } 190 190 } 191 191 192 192 return iteratorAdvanced; 193 193 } … … 203 203 fw.indent() << "frameTime {" << std::endl; 204 204 fw.moveIn(); 205 for (unsigned int i = 0; i < sw.getNumChildren(); i++) 205 for (unsigned int i = 0; i < sw.getNumChildren(); i++) 206 206 { 207 207 fw.indent() << sw.getTime(i) << std::endl;
