coord system. Addition of ReadCameraConfigFile and WriteCameraConfigFile as a tempory measure for implementing local a C++ read/write of the Producer::CameraConfig, this will be removed once these implementations or similar have been moved to Producer.
102 lines
2.6 KiB
Plaintext
102 lines
2.6 KiB
Plaintext
//C++ header - Open Producer - Copyright (C) 2002 Don Burns
|
|
//Distributed under the terms of the GNU LIBRARY GENERAL PUBLIC LICENSE (LGPL)
|
|
//as published by the Free Software Foundation.
|
|
#ifndef OSG_CAMERA_GROUP_H
|
|
#define OSG_CAMERA_GROUP_H
|
|
|
|
|
|
#include <Producer/CameraGroup>
|
|
|
|
#include <osg/Node>
|
|
#include <osg/StateSet>
|
|
#include <osg/FrameStamp>
|
|
#include <osg/DisplaySettings>
|
|
|
|
#include <osgProducer/SceneHandler>
|
|
|
|
namespace osgProducer {
|
|
|
|
class OSGPRODUCER_EXPORT CameraGroup : public Producer::CameraGroup
|
|
{
|
|
public :
|
|
|
|
typedef std::vector <osgProducer::SceneHandler *> SceneHandlerList;
|
|
|
|
CameraGroup();
|
|
|
|
CameraGroup(Producer::CameraConfig *cfg);
|
|
|
|
CameraGroup(const std::string& configFile);
|
|
|
|
virtual ~CameraGroup() {}
|
|
|
|
|
|
void setSceneData( osg::Node *scene );
|
|
|
|
osg::Node *getSceneData() { return _scene_data.get(); }
|
|
|
|
const osg::Node *getSceneData() const { return _scene_data.get(); }
|
|
|
|
|
|
|
|
void setDisplaySettings( osg::DisplaySettings *ds ) { _ds = ds; }
|
|
|
|
osg::DisplaySettings *getDisplaySettings() { return _ds.get(); }
|
|
|
|
const osg::DisplaySettings *getDisplaySettings() const { return _ds.get(); }
|
|
|
|
|
|
|
|
void setFrameStamp( osg::FrameStamp* fs );
|
|
|
|
osg::FrameStamp *getFrameStamp() { return _frameStamp.get(); }
|
|
|
|
const osg::FrameStamp *getFrameStamp() const { return _frameStamp.get(); }
|
|
|
|
|
|
void setGlobalStateSet( osg::StateSet *sset );
|
|
|
|
osg::StateSet *getGlobalStateSet() { return _global_stateset.get(); }
|
|
|
|
const osg::StateSet *getGlobalStateSet() const { return _global_stateset.get(); }
|
|
|
|
|
|
void setBackgroundColor( const osg::Vec4& backgroundColor );
|
|
|
|
osg::Vec4& getBackgroundColor() { return _background_color; }
|
|
|
|
const osg::Vec4& getBackgroundColor() const { return _background_color; }
|
|
|
|
|
|
void setLODScale( float bias );
|
|
|
|
void setFusionDistance( osgUtil::SceneView::FusionDistanceMode mode,float value=1.0f);
|
|
|
|
|
|
void advance();
|
|
|
|
|
|
void realize( ThreadingModel thread_model= SingleThreaded );
|
|
|
|
|
|
virtual void frame();
|
|
|
|
|
|
protected :
|
|
|
|
|
|
osg::ref_ptr<osg::Node> _scene_data;
|
|
osg::ref_ptr<osg::StateSet> _global_stateset;
|
|
osg::Vec4 _background_color;
|
|
SceneHandlerList _shvec;
|
|
osg::ref_ptr<osg::DisplaySettings> _ds;
|
|
bool _initialized;
|
|
osg::ref_ptr<osg::FrameStamp> _frameStamp;
|
|
|
|
void _init();;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|