PanoramicSphericalDisplay
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library 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
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGVIEWER_PanoramicSphericalDisplay
#define OSGVIEWER_PanoramicSphericalDisplay 1
#include <osgViewer/View>
namespace osgViewer {
class OSGVIEWER_EXPORT PanoramicSphericalDisplay : public ViewConfig
{
public:
PanoramicSphericalDisplay(double radius=1.0, double collar=0.45, unsigned int screenNum=0, osg::Image* intensityMap=0, const osg::Matrixd& projectorMatrix = osg::Matrixd()):
_radius(radius),
_collar(collar),
_screenNum(screenNum),
_intensityMap(intensityMap),
_projectorMatrix(projectorMatrix) {}
PanoramicSphericalDisplay(const PanoramicSphericalDisplay& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
ViewConfig(rhs, copyop),
_radius(rhs._radius),
_collar(rhs._collar),
_screenNum(rhs._screenNum),
_intensityMap(rhs._intensityMap),
_projectorMatrix(rhs._projectorMatrix) {}
META_Object(osgViewer,PanoramicSphericalDisplay);
virtual void configure(osgViewer::View& view) const;
void setRadius(double r) { _radius = r; }
double getRadius() const { return _radius; }
void setCollar(double r) { _collar = r; }
double getCollar() const { return _collar; }
void setScreenNum(unsigned int n) { _screenNum = n; }
unsigned int getScreenNum() const { return _screenNum; }
void setIntensityMap(osg::Image* im) { _intensityMap = im; }
const osg::Image* getIntensityMap() const { return _intensityMap.get(); }
void setProjectionMatrix(const osg::Matrixd& m) { _projectorMatrix = m; }
const osg::Matrixd& getProjectionMatrix() const { return _projectorMatrix; }
protected:
osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const osg::Vec3& origin, const osg::Vec3& widthVector, const osg::Vec3& heightVector, double sphere_radius, double collar_radius, osg::Image* intensityMap, const osg::Matrix& projectorMatrix) const;
double _radius;
double _collar;
unsigned int _screenNum;
osg::ref_ptr<osg::Image> _intensityMap;
osg::Matrixd _projectorMatrix;
};
}
#endif
osgViewer::PanoramicSphericalDisplay::_collar
double _collar
Definition PanoramicSphericalDisplay:66
osgViewer::PanoramicSphericalDisplay::getRadius
double getRadius() const
Definition PanoramicSphericalDisplay:47
osgViewer::PanoramicSphericalDisplay::setProjectionMatrix
void setProjectionMatrix(const osg::Matrixd &m)
Definition PanoramicSphericalDisplay:58
osgViewer::PanoramicSphericalDisplay::getCollar
double getCollar() const
Definition PanoramicSphericalDisplay:50
osgViewer::PanoramicSphericalDisplay::createParoramicSphericalDisplayDistortionMesh
osg::Geometry * createParoramicSphericalDisplayDistortionMesh(const osg::Vec3 &origin, const osg::Vec3 &widthVector, const osg::Vec3 &heightVector, double sphere_radius, double collar_radius, osg::Image *intensityMap, const osg::Matrix &projectorMatrix) const
osgViewer::PanoramicSphericalDisplay::_radius
double _radius
Definition PanoramicSphericalDisplay:65
osgViewer::PanoramicSphericalDisplay::_intensityMap
osg::ref_ptr< osg::Image > _intensityMap
Definition PanoramicSphericalDisplay:68
osgViewer::PanoramicSphericalDisplay::setIntensityMap
void setIntensityMap(osg::Image *im)
Definition PanoramicSphericalDisplay:55
osgViewer::PanoramicSphericalDisplay::getIntensityMap
const osg::Image * getIntensityMap() const
Definition PanoramicSphericalDisplay:56
osgViewer::PanoramicSphericalDisplay::_screenNum
unsigned int _screenNum
Definition PanoramicSphericalDisplay:67
osgViewer::PanoramicSphericalDisplay::getScreenNum
unsigned int getScreenNum() const
Definition PanoramicSphericalDisplay:53
osgViewer::PanoramicSphericalDisplay::_projectorMatrix
osg::Matrixd _projectorMatrix
Definition PanoramicSphericalDisplay:69
osgViewer::PanoramicSphericalDisplay::setScreenNum
void setScreenNum(unsigned int n)
Definition PanoramicSphericalDisplay:52
osgViewer::PanoramicSphericalDisplay::PanoramicSphericalDisplay
PanoramicSphericalDisplay(double radius=1.0, double collar=0.45, unsigned int screenNum=0, osg::Image *intensityMap=0, const osg::Matrixd &projectorMatrix=osg::Matrixd())
Definition PanoramicSphericalDisplay:26
osgViewer::PanoramicSphericalDisplay::META_Object
META_Object(osgViewer, PanoramicSphericalDisplay)
osgViewer::PanoramicSphericalDisplay::setRadius
void setRadius(double r)
Definition PanoramicSphericalDisplay:46
osgViewer::PanoramicSphericalDisplay::configure
virtual void configure(osgViewer::View &view) const
osgViewer::PanoramicSphericalDisplay::PanoramicSphericalDisplay
PanoramicSphericalDisplay(const PanoramicSphericalDisplay &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition PanoramicSphericalDisplay:33
osgViewer::PanoramicSphericalDisplay::getProjectionMatrix
const osg::Matrixd & getProjectionMatrix() const
Definition PanoramicSphericalDisplay:59
osgViewer::PanoramicSphericalDisplay::setCollar
void setCollar(double r)
Definition PanoramicSphericalDisplay:49
osgViewer::ViewConfig::ViewConfig
ViewConfig()
Definition osgViewer/View:41
osgViewer::View
Definition osgViewer/View:76
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Geometry
Definition Geometry:31
osg::Image
Definition Image:179
osg::Matrixd
Definition Matrixd:27
osg::ref_ptr
Definition ref_ptr:32
osgViewer
osg::Vec3
Vec3f Vec3
Definition Vec3:21
osg::Matrix
Matrixd Matrix
Definition Matrix:27
OSGVIEWER_EXPORT
#define OSGVIEWER_EXPORT
Definition osgViewer/Export:40
View