Changeset 13041 for OpenSceneGraph/trunk/include/osg/Sequence
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Sequence (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Sequence
r10950 r13041 1 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 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 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 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 17 17 #include <osg/Group> 18 18 19 namespace osg 19 namespace osg 20 20 { 21 21 22 22 /** Sequence is a Group node which allows automatic, time based 23 23 switching between children. … … 64 64 /** Get time for child. */ 65 65 double getTime(unsigned int frame) const; 66 66 67 67 /** Set the time list for children. */ 68 68 void setTimeList(const std::vector<double>& timeList) { _frameTime = timeList; } 69 69 70 70 /** Get the time list for children. */ 71 71 const std::vector<double>& getTimeList() const { return _frameTime; } 72 72 73 /** Set default time in seconds for new child. 73 /** Set default time in seconds for new child. 74 74 if t<0, t=0 */ 75 75 void setDefaultTime(double t) {_defaultTime = (t<0.?0.:t);} … … 78 78 double getDefaultTime(void) const {return _defaultTime;}; 79 79 80 /** Set time of last frame of last loop, in seconds. 80 /** Set time of last frame of last loop, in seconds. 81 81 if t<= 0, then ignored */ 82 82 void setLastFrameTime(double t) {_lastFrameTime = (t<0.?0.:t);} … … 94 94 SWING 95 95 }; 96 96 97 97 /** Set sequence mode. */ 98 98 void setLoopMode(LoopMode mode) { _loopMode = mode; _value = -1; } 99 99 100 100 /** Get sequence mode. */ 101 101 LoopMode getLoopMode() const { return _loopMode; } 102 102 103 103 /** Set interval beginning. */ 104 104 void setBegin(int begin) { _begin = begin; _value = -1; } 105 105 106 106 /** Get interval beginning. */ 107 107 int getBegin() const { return _begin; } 108 108 109 109 /** Set interval ending. */ 110 110 void setEnd(int end) { _end = end; _value = -1; } 111 111 112 112 /** Get interval ending. */ 113 113 int getEnd() const { return _end; } … … 123 123 end = _end; 124 124 } 125 125 126 126 /** Set speed. */ 127 127 void setSpeed(float speed) { _speed = speed; } 128 128 129 129 /** Get speed. */ 130 130 float getSpeed() const { return _speed; } 131 131 132 132 /** Set number of repeats. */ 133 133 void setNumRepeats(int nreps) { _nreps = (nreps<0?-1:nreps); _nrepsRemain = _nreps; } 134 134 135 135 /** Get number of repeats. */ 136 136 int getNumRepeats() const { return _nreps; } … … 218 218 // _nreps: how many times to repeat- default param is -1, repeat forever 219 219 // init to 0, no repetitions 220 // _nrepsRemain: set to nreps and counts down every traversal, 220 // _nrepsRemain: set to nreps and counts down every traversal, 221 221 // stopping when it gets to zero. init to 0 222 222 int _nreps, _nrepsRemain; … … 247 247 248 248 }; 249 249 250 250 } 251 251
