Changeset 13041 for OpenSceneGraph/trunk/include/osg/ImageSequence
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/ImageSequence (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/ImageSequence
r12139 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 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 */ … … 45 45 virtual void setReferenceTime(double t) { _referenceTime = t; } 46 46 virtual double getReferenceTime() const { return _referenceTime; } 47 47 48 48 virtual void setTimeMultiplier(double tm) { _timeMultiplier = tm; } 49 49 virtual double getTimeMultiplier() const { return _timeMultiplier; } … … 51 51 typedef std::vector< osg::ref_ptr<osg::Image> > Images; 52 52 typedef std::vector< std::string > FileNames; 53 53 54 54 virtual void seek(double time); 55 55 … … 59 59 60 60 virtual void rewind(); 61 61 62 62 enum Mode 63 63 { … … 66 66 PAGE_AND_DISCARD_USED_IMAGES 67 67 }; 68 68 69 69 void setMode(Mode mode); 70 70 Mode getMode() const { return _mode; } … … 72 72 void setLength(double length); 73 73 virtual double getLength() const { return _length; } 74 74 75 75 76 76 void addImageFile(const std::string& fileName); 77 77 78 78 void setImageFile(unsigned int pos, const std::string& fileName); 79 79 std::string getImageFile(unsigned int pos) const; 80 80 81 81 unsigned int getNumImageFiles() const { return _fileNames.size(); } 82 82 … … 85 85 86 86 void addImage(osg::Image* image); 87 87 88 88 void setImage(int s,int t,int r, 89 89 GLint internalTextureformat, … … 96 96 Image* getImage(unsigned int pos); 97 97 const Image* getImage(unsigned int pos) const; 98 98 99 99 unsigned int getNumImages() const { return _images.size(); } 100 100 … … 111 111 112 112 virtual ~ImageSequence() {} 113 113 114 114 virtual void applyLoopingMode(); 115 115 116 116 void setImageToChild(const osg::Image* image); 117 117 118 118 void computeTimePerImage(); 119 119 … … 133 133 134 134 Images _images; 135 135 136 136 typedef std::set< std::string > FilesRequested; 137 137 FilesRequested _filesRequested; 138 138 139 139 int _previousAppliedImageIndex; 140 141 140 141 142 142 bool _seekTimeSet; 143 143 double _seekTime; 144 145 144 145 146 146 147 147 };
