openscenegraph
PanoramicSphericalDisplay
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
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
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGVIEWER_PanoramicSphericalDisplay
15#define OSGVIEWER_PanoramicSphericalDisplay 1
16
17#include <osgViewer/View>
18
19namespace osgViewer {
20
23{
24 public:
25
26 PanoramicSphericalDisplay(double radius=1.0, double collar=0.45, unsigned int screenNum=0, osg::Image* intensityMap=0, const osg::Matrixd& projectorMatrix = osg::Matrixd()):
27 _radius(radius),
28 _collar(collar),
29 _screenNum(screenNum),
30 _intensityMap(intensityMap),
31 _projectorMatrix(projectorMatrix) {}
32
34 ViewConfig(rhs, copyop),
35 _radius(rhs._radius),
36 _collar(rhs._collar),
37 _screenNum(rhs._screenNum),
38 _intensityMap(rhs._intensityMap),
39 _projectorMatrix(rhs._projectorMatrix) {}
40
41
43
44 virtual void configure(osgViewer::View& view) const;
45
46 void setRadius(double r) { _radius = r; }
47 double getRadius() const { return _radius; }
48
49 void setCollar(double r) { _collar = r; }
50 double getCollar() const { return _collar; }
51
52 void setScreenNum(unsigned int n) { _screenNum = n; }
53 unsigned int getScreenNum() const { return _screenNum; }
54
55 void setIntensityMap(osg::Image* im) { _intensityMap = im; }
56 const osg::Image* getIntensityMap() const { return _intensityMap.get(); }
57
58 void setProjectionMatrix(const osg::Matrixd& m) { _projectorMatrix = m; }
59 const osg::Matrixd& getProjectionMatrix() const { return _projectorMatrix; }
60
61 protected:
62
63 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;
64
65 double _radius;
66 double _collar;
67 unsigned int _screenNum;
70};
71
72}
73
74
75#endif
Definition PanoramicSphericalDisplay:23
double _collar
Definition PanoramicSphericalDisplay:66
double getRadius() const
Definition PanoramicSphericalDisplay:47
void setProjectionMatrix(const osg::Matrixd &m)
Definition PanoramicSphericalDisplay:58
double getCollar() const
Definition PanoramicSphericalDisplay:50
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
Definition PanoramicSphericalDisplay:65
osg::ref_ptr< osg::Image > _intensityMap
Definition PanoramicSphericalDisplay:68
void setIntensityMap(osg::Image *im)
Definition PanoramicSphericalDisplay:55
const osg::Image * getIntensityMap() const
Definition PanoramicSphericalDisplay:56
unsigned int _screenNum
Definition PanoramicSphericalDisplay:67
unsigned int getScreenNum() const
Definition PanoramicSphericalDisplay:53
osg::Matrixd _projectorMatrix
Definition PanoramicSphericalDisplay:69
void setScreenNum(unsigned int n)
Definition PanoramicSphericalDisplay:52
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
META_Object(osgViewer, PanoramicSphericalDisplay)
void setRadius(double r)
Definition PanoramicSphericalDisplay:46
virtual void configure(osgViewer::View &view) const
PanoramicSphericalDisplay(const PanoramicSphericalDisplay &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition PanoramicSphericalDisplay:33
const osg::Matrixd & getProjectionMatrix() const
Definition PanoramicSphericalDisplay:59
void setCollar(double r)
Definition PanoramicSphericalDisplay:49
Definition osgViewer/View:38
Definition osgViewer/View:76
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition Geometry:31
Definition Image:179
Definition Matrixd:27
Definition Vec3f:29
Definition ref_ptr:32
#define OSGVIEWER_EXPORT
Definition osgViewer/Export:40