/usr/share/openscenegraph/examples/osgframerenderer/CaptureSettings.h is in openscenegraph-examples 3.2.0~rc1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | #ifndef CAPTURESETTINGS_H
#define CAPTURESETTINGS_H
#include <osgDB/ReadFile>
#include <osgDB/FileNameUtils>
#include <osgDB/WriteFile>
#include <osgViewer/Viewer>
#include <osg/AnimationPath>
#include "UpdateProperty.h"
namespace gsc
{
class CaptureSettings : public osg::Object
{
public:
CaptureSettings();
CaptureSettings(const CaptureSettings& cs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object(gsc, CaptureSettings);
void setInputFileName(const std::string& filename) { _inputFileName = filename; }
const std::string& getInputFileName() const { return _inputFileName; }
void setOutputFileName(const std::string& filename);
const std::string& getOutputFileName() const;
std::string getOutputFileName(unsigned int frameNumber) const;
std::string getOutputFileName(unsigned int cameraNumber, unsigned int frameNumber) const;
enum StereoMode
{
OFF,
HORIZONTAL_SPLIT,
VERTICAL_SPLIT
};
void setStereoMode(StereoMode mode) { _stereoMode = mode; }
StereoMode getStereoMode() const { return _stereoMode; }
void setOffscreen(bool o) { _offscreen = o; }
bool getOffscreen() const { return _offscreen; }
void setOutputImageFlip(bool flip) { _outputImageFlip = flip; }
bool getOutputImageFlip() const { return _outputImageFlip; }
void setWidth(unsigned int width) { _width = width; }
unsigned int getWidth() const { return _width; }
void setHeight(unsigned int height) { _height = height; }
unsigned int getHeight() const { return _height; }
void setScreenWidth(float width) { _screenWidth = width; }
float getScreenWidth() const { return _screenWidth; }
void setScreenHeight(float height) { _screenHeight = height; }
float getScreenHeight() const { return _screenHeight; }
void setScreenDistance(float distance) { _screenDistance = distance; }
float getScreenDistance() const { return _screenDistance; }
enum PixelFormat
{
RGB,
RGBA
};
void setPixelFormat(PixelFormat format) { _pixelFormat = format; }
PixelFormat getPixelFormat() const { return _pixelFormat; }
void setSamples(unsigned int s) { _samples = s; }
unsigned int getSamples() const { return _samples; }
void setSampleBuffers(unsigned int s) { _sampleBuffers = s; }
unsigned int getSampleBuffers() const { return _sampleBuffers; }
void setFrameRate(double fr) { _frameRate = fr; }
double getFrameRate() const { return _frameRate; }
void setNumberOfFrames(unsigned int nf) { _numberOfFrames = nf; }
unsigned int getNumberOfFrames() const { return _numberOfFrames; }
typedef std::vector< osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlers;
void setEventHandlers(const EventHandlers& eh);
EventHandlers& getEventHandlers() { return _eventHandlers; }
const EventHandlers& getEventHandlers() const { return _eventHandlers; }
typedef std::vector< osg::ref_ptr<UpdateProperty> > Properties;
void addUpdateProperty(UpdateProperty* up) { _properties.push_back(up); }
void setProperties(const Properties& pl) { _properties = pl; }
Properties& getProperties() { return _properties; }
const Properties& getProperties() const { return _properties; }
template<typename T>
T* getPropertyOfType()
{
for(Properties::iterator itr = _properties.begin();
itr != _properties.end();
++itr)
{
T* p = dynamic_cast<T*>(itr->get());
if (p) return p;
}
return 0;
}
bool valid() const;
protected:
virtual ~CaptureSettings() {}
std::string _inputFileName;
std::string _outputFileName;
std::string _outputDirectoryName;
std::string _outputBaseFileName;
std::string _outputExtension;
StereoMode _stereoMode;
bool _offscreen;
bool _outputImageFlip;
unsigned int _width;
unsigned int _height;
float _screenWidth;
float _screenHeight;
float _screenDistance;
PixelFormat _pixelFormat;
unsigned int _samples;
unsigned int _sampleBuffers;
double _frameRate;
unsigned int _numberOfFrames;
EventHandlers _eventHandlers;
Properties _properties;
};
}
#endif
|