/usr/include/simgear/scene/util/SGReaderWriterOptions.hxx is in libsimgear-dev 3.4.0-3.
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 | // Copyright (C) 2007 Tim Moore timoore@redhat.com
// Copyright (C) 2008 Till Busch buti@bux.at
// Copyright (C) 2011 Mathias Froehlich
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
#ifndef SGREADERWRITEROPTIONS_HXX
#define SGREADERWRITEROPTIONS_HXX 1
#include <osgDB/Options>
#include <simgear/scene/model/modellib.hxx>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/props/props.hxx>
class SGPropertyNode;
namespace simgear
{
class SGReaderWriterOptions : public osgDB::Options {
public:
SGReaderWriterOptions() :
_materialLib(0),
_load_panel(0),
_model_data(0),
_instantiateEffects(false)
{ }
SGReaderWriterOptions(const std::string& str) :
osgDB::Options(str),
_materialLib(0),
_load_panel(0),
_model_data(0),
_instantiateEffects(false)
{ }
SGReaderWriterOptions(const osgDB::Options& options,
const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) :
osgDB::Options(options, copyop),
_materialLib(0),
_load_panel(0),
_model_data(0),
_instantiateEffects(false)
{ }
SGReaderWriterOptions(const SGReaderWriterOptions& options,
const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) :
osgDB::Options(options, copyop),
_propertyNode(options._propertyNode),
_materialLib(options._materialLib),
_load_panel(options._load_panel),
_model_data(options._model_data),
_instantiateEffects(options._instantiateEffects)
{ }
META_Object(simgear, SGReaderWriterOptions);
const SGSharedPtr<SGPropertyNode>& getPropertyNode() const
{ return _propertyNode; }
void setPropertyNode(const SGSharedPtr<SGPropertyNode>& propertyNode)
{ _propertyNode = propertyNode; }
SGMaterialLibPtr getMaterialLib() const
{ return _materialLib; }
void setMaterialLib(SGMaterialLib* materialLib)
{ _materialLib = materialLib; }
typedef osg::Node *(*panel_func)(SGPropertyNode *);
panel_func getLoadPanel() const
{ return _load_panel; }
void setLoadPanel(panel_func pf)
{ _load_panel=pf; }
SGModelData *getModelData() const
{ return _model_data.get(); }
void setModelData(SGModelData *modelData)
{ _model_data=modelData; }
bool getInstantiateEffects() const
{ return _instantiateEffects; }
void setInstantiateEffects(bool instantiateEffects)
{ _instantiateEffects = instantiateEffects; }
static SGReaderWriterOptions* copyOrCreate(const osgDB::Options* options);
static SGReaderWriterOptions* fromPath(const std::string& path);
protected:
virtual ~SGReaderWriterOptions();
private:
SGSharedPtr<SGPropertyNode> _propertyNode;
SGSharedPtr<SGMaterialLib> _materialLib;
osg::Node *(*_load_panel)(SGPropertyNode *);
osg::ref_ptr<SGModelData> _model_data;
bool _instantiateEffects;
};
}
#endif
|