OpenSceneGraph 3.6.5
WoWVxDisplay
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_WoWVxDisplay
15#define OSGVIEWER_WoWVxDisplay 1
16
17#include <osgViewer/View>
18
19namespace osgViewer {
20
23{
24 public:
25
26 // default to 20" display, type can be 20 to 42.
27 WoWVxDisplay(unsigned int type=20, unsigned int screenNum=0):
28 _screenNum(screenNum),
29 _wow_content(0x02),
30 _wow_factor(0x40),
31 _wow_offset(0x80),
32 _wow_disparity_Zd(0.459813f),
33 _wow_disparity_vz(6.180772f),
34 _wow_disparity_M(-1586.34f),
35 _wow_disparity_C(127.5f) { if (type==42) WoWVx42(); }
36
37 WoWVxDisplay(unsigned int screenNum, unsigned char wow_content, unsigned char wow_factor, unsigned char wow_offset, float wow_disparity_Zd, float wow_disparity_vz, float wow_disparity_M, float wow_disparity_C):
38 _screenNum(screenNum),
39 _wow_content(wow_content),
40 _wow_factor(wow_factor),
41 _wow_offset(wow_offset),
42 _wow_disparity_Zd(wow_disparity_Zd),
43 _wow_disparity_vz(wow_disparity_vz),
44 _wow_disparity_M(wow_disparity_M),
45 _wow_disparity_C(wow_disparity_C) {}
46
57
59
60 virtual void configure(osgViewer::View& view) const;
61
62 void setScreenNum(unsigned int n) { _screenNum = n; }
63 unsigned int getScreenNum() const { return _screenNum; }
64
65 void WoWVx20()
66 {
67 _wow_disparity_Zd = 0.459813f;
68 _wow_disparity_vz = 6.180772f;
69 _wow_disparity_M = -1586.34f;
70 _wow_disparity_C = 127.5f;
71 }
72
73 void WoWVx42()
74 {
75 _wow_disparity_Zd = 0.467481f;
76 _wow_disparity_vz = 7.655192f;
77 _wow_disparity_M = -1960.37f;
78 _wow_disparity_C = 127.5f;
79 }
80
81 void setContent(unsigned char c) { _wow_content = c; }
82 double getContent() const { return _wow_content; }
83
84 void setFactor(unsigned char c) { _wow_factor = c; }
85 double getFactor() const { return _wow_factor; }
86
87 void setOffset(unsigned char c) { _wow_offset = c; }
88 double getOffset() const { return _wow_offset; }
89
90 void setDisparityZD(float c) { _wow_disparity_Zd = c; }
91 float getDisparityZD() const { return _wow_disparity_Zd; }
92
93 void setDisparityVZ(float c) { _wow_disparity_vz = c; }
94 float getDisparityVZ() const { return _wow_disparity_vz; }
95
96 void setDisparityM(float c) { _wow_disparity_M = c; }
97 float getDisparityM() const { return _wow_disparity_M; }
98
99 void setDisparityC(float c) { _wow_disparity_C = c; }
100 float getDisparityC() const { return _wow_disparity_C; }
101
102 protected:
103
104 unsigned int _screenNum;
105 unsigned char _wow_content;
106 unsigned char _wow_factor;
107 unsigned char _wow_offset;
112};
113
114#if 0
116class OSGVIEWER_EXPORT DepthPartition : public Config
117{
118 public:
119
120 DepthPartition(DepthPartitionSettings* dsp=0);
121
122 DepthPartition(const ViewForWoWVxDisplay& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
123
124 META_Object(osgViewer,DepthPartition);
125
126 void setDepthPartionSettings(DepthPartitionSettings* dsp) const { _dps = dps; }
127 const DepthPartitionSettings* getDepthPartionSettings() const { return _dps; }
128
130 bool setUpDepthPartitionForCamera(osg::Camera* cameraToPartition, DepthPartitionSettings* dps=0);
131
132 virtual void configure(osgViewer::View& view) const;
133
134 protected:
135};
136
137#endif
138
139}
140
141
142#endif
#define META_Object(library, name)
META_Object macro define the standard clone, isSameKindAs and className methods.
Definition Object:46
The osgViewer library provides high level viewer functionality designed to make it easier to write a ...
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
float getDisparityVZ() const
Definition WoWVxDisplay:94
double getContent() const
Definition WoWVxDisplay:82
void setScreenNum(unsigned int n)
Definition WoWVxDisplay:62
unsigned int getScreenNum() const
Definition WoWVxDisplay:63
double getOffset() const
Definition WoWVxDisplay:88
virtual void configure(osgViewer::View &view) const
configure method that is overridden by Config subclasses.
float _wow_disparity_M
Definition WoWVxDisplay:110
WoWVxDisplay(const WoWVxDisplay &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition WoWVxDisplay:47
unsigned int _screenNum
Definition WoWVxDisplay:104
float getDisparityZD() const
Definition WoWVxDisplay:91
float getDisparityC() const
Definition WoWVxDisplay:100
double getFactor() const
Definition WoWVxDisplay:85
void WoWVx42()
Definition WoWVxDisplay:73
void setDisparityM(float c)
Definition WoWVxDisplay:96
void setFactor(unsigned char c)
Definition WoWVxDisplay:84
WoWVxDisplay(unsigned int screenNum, unsigned char wow_content, unsigned char wow_factor, unsigned char wow_offset, float wow_disparity_Zd, float wow_disparity_vz, float wow_disparity_M, float wow_disparity_C)
Definition WoWVxDisplay:37
WoWVxDisplay(unsigned int type=20, unsigned int screenNum=0)
Definition WoWVxDisplay:27
float _wow_disparity_Zd
Definition WoWVxDisplay:108
void setDisparityC(float c)
Definition WoWVxDisplay:99
void setDisparityZD(float c)
Definition WoWVxDisplay:90
unsigned char _wow_offset
Definition WoWVxDisplay:107
META_Object(osgViewer, WoWVxDisplay)
float getDisparityM() const
Definition WoWVxDisplay:97
void setDisparityVZ(float c)
Definition WoWVxDisplay:93
float _wow_disparity_C
Definition WoWVxDisplay:111
void setContent(unsigned char c)
Definition WoWVxDisplay:81
void WoWVx20()
Definition WoWVxDisplay:65
float _wow_disparity_vz
Definition WoWVxDisplay:109
unsigned char _wow_factor
Definition WoWVxDisplay:106
unsigned char _wow_content
Definition WoWVxDisplay:105
void setOffset(unsigned char c)
Definition WoWVxDisplay:87
ViewConfig()
Definition View:41
View holds a single view on a scene, this view may be composed of one or more slave cameras.
Definition View:76
#define OSGVIEWER_EXPORT
Definition Export:40

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.