16 #include <osgViewer/View>
21 class DatabaseRequestHandler;
27 class DtChannelSpecificGroup;
28 class DtIntersectorResult;
30 class DtOsgChannelCreator;
31 class DtChannelManager;
32 class DtWindowConfiguration;
35 class DtOsgObserverObject;
36 class DtOsgCullVisitorParameters;
37 class DtTerrainPageSignaler;
39 class DtOsgChannelSensor;
52 virtual void childLoaded(
const osg::DatabaseRequestHandler*,
const osg::Group* page, osg::Node* child,
const std::string& fileName, osg::Node*& returnedNode)
const;
55 virtual void childPagedIn(
const osg::DatabaseRequestHandler*, osg::PagedLOD* page, osg::Node* child)
const;
58 virtual void childAboutToPageOut(
const osg::DatabaseRequestHandler*, osg::PagedLOD* page, osg::Node* child)
const;
60 virtual osg::DatabaseRequestHandlerCallback*
clone()
const;
94 virtual bool initialize();
98 virtual void initializeNormalized2DCamera();
99 virtual void initialize2DCamera(
int w,
int h);
100 virtual void initializeSceneCamera();
101 virtual void initializeRenderTexture();
103 virtual void initializeRTTCamera();
105 virtual void clearRttCamera();
107 virtual void recreateRTTCamera();
112 virtual void setShadowState(
bool enable);
115 virtual void addOverlayDrawablesToCameras();
122 virtual void initializeSignalConnections();
134 virtual void setSensorName(
const std::string& sensorName);
137 virtual void setClearColor(
float r,
float g,
float b,
float a);
142 virtual void setWindow(
DtWindow* view);
145 virtual const DtWindow* window()
const;
148 virtual void setViewport(
int x,
int y,
int width,
int height);
153 virtual void clearFrameBufferIfChanged();
156 virtual void getViewport(
int& x,
int& y,
int& width,
int& height)
const;
159 virtual void setCameraPosition(
double x,
double y,
double z);
162 virtual void setCameraOrientation(
double psi,
double theta,
double phi);
168 virtual void setCameraPositionAndOrientation(
double x,
double y,
169 double z,
double psi,
double theta,
double phi);
170 virtual void setCameraPositionAndOrientation(osg::Vec3d& pos,
174 virtual void getCameraPositionAndOrientation(osg::Vec3d& position,
175 osg::Quat& rotation)
const;
179 virtual void setChannelEnabled(
bool enabled);
183 virtual bool channelEnabled()
const;
185 virtual void update();
188 virtual void connectToObserver();
191 virtual osgViewer::View& view();
215 virtual void setRenderToTexture(
bool enabled);
220 virtual void setRenderToTextureFormat(
int format,
int sourceFormat,
int sourceType);
234 virtual void depthTextureUsesStencilBuffer(
bool useStencil);
237 virtual bool depthTextureUsesStencilBuffer();
240 virtual int shadowQuality()
const;
245 virtual std::vector<const osg::Camera*> getShadowableCameras()
const;
249 virtual void setProjectionResizePolicy(
254 virtual void updateProjection();
257 double &left,
double zNear,
double &right,
double &top,
double &bottom);
260 virtual void connectChannelToScene();
266 virtual bool processKeyboardEvent(
const DtKeyEvent & ev);
272 virtual void getWorldToWindowMatrix(osg::Matrix& worldToWindowMatrix)
const;
275 virtual void moveMouseToScreenLocation(
float screenX,
float screenY);
280 virtual void projectToScreen(
double dbX,
double dbY,
double dbZ,
281 double& screenX,
double& screenY,
double& screenZ);
284 virtual void projectToWorld(
double screenX,
double screenY,
285 double& dbX,
double& dbY,
double& dbZ);
291 virtual const std::string& name();
304 virtual void addPostProcessEffect(
const std::string& postProcessorEffect);
309 virtual void removePostProcessEffect(
const std::string& postProcessorEffect);
316 virtual void setEnablePostProcessors(
bool enable);
318 virtual bool getEnablePostProcessors();
321 virtual bool useOldChannelOffsetCalcuation()
const;
322 virtual void setUseOldChannelOffsetCalcuation(
bool enable);
326 virtual bool forceHdrLuminanceOverride();
328 virtual void setForceHdrLuminanceOverride(
bool force);
337 virtual void clearStateGraph(
void);
342 virtual void setEnableHdrPassthrough(
bool flag);
343 virtual bool enableHdrPassthrough();
347 virtual void setHdrOutputScale(
float scale);
350 virtual float hdrOutputScale();
353 virtual void screenCapture();
356 virtual void setOcclusionTextureEnabled(
bool enabled);
359 virtual void initOcclusionTexture();
362 virtual void updateCameraFrustumPlanes( std::vector<
DtVector4<double> >& planes );
366 virtual void updateAcquisitionBoxFrustumPlanes(
const int& boxCenterX,
const int& boxCenterY,
367 const int& boxWidth,
const int& boxHeight, std::vector<
DtVector4<double> >& planes );
375 virtual void releaseResources(osg::State* gcState);
379 virtual void updateShowTracksUniform(
bool value);
386 virtual void makeObserverToCameraMatrix(osg::Vec3d& orient,
387 osg::Matrixd& offsetObserverToCamera, osg::Matrixd& observerToCamera);
388 virtual void makeObserverToCameraMatrix(osg::Quat& qObserverToWorld,
389 osg::Matrixd& offsetObserverToCamera, osg::Matrixd& observerToCamera);
393 virtual void calculateNearFar(
double& zNear,
double& zFar);
398 virtual bool useAttachedForNearClip(
double alt);
401 virtual double calculateNearClip(
double alt,
double zFar);
404 virtual double calculateFarClip(
double alt);
410 virtual double calculateNearClipMagClamp(
double zNear,
double zFar,
float magLevel=2.);
413 virtual void projectFor3D();
416 virtual void projectFor2D();
420 virtual void connectRttCameraToScene();
425 virtual void stopUsingModelSet(
int modelSet);
430 virtual void startUsingModelSet(
int modelSet);
433 virtual void slot_visualizerRootAdded(
int modelSet,
int visualType);
436 virtual void slot_shadowsRemoved();
444 int setting,
bool value);
454 virtual void slot_windowConfigurationModified(
const std::string& deName,
458 virtual void slot_channelConfigurationModified(
const std::string& deName,
459 const std::string& windowName,
const std::string& oldChannelName,
463 virtual void slot_onCoordinateSystemChanged();
467 virtual void slot_paperMapEnabledChanged(
bool setting);
470 virtual void observerRemoved(
const std::string& observerName);
473 virtual void updateMultiSampleOverrideSetting();
478 virtual void getRenderTextureAttachmentInfo(
unsigned int&
level,
unsigned int& face,
unsigned int& sampleBuffers,
unsigned int& samples);
481 virtual void initializeRenderTextureColor();
484 virtual void initializeRenderTextureDepth();
490 virtual void calculateAndSetFocusPointDistance(
double zNear,
double zFar);
494 osgViewer::CompositeViewer* getOrCreateViewer();
bool myShadowState
Definition: DtOsgChannel.h:540
DtOsgObserverObject * myOsgObserverObject
Definition: DtOsgChannel.h:501
Abstract Base class.
Definition: DtWindow.h:25
bool myCoordinateSystemChanged
Definition: DtOsgChannel.h:538
std::vector< osg::Vec3d > myFocusPoints
Definition: DtOsgChannel.h:573
bool myLastFocusPointAttemptedOsgEarthFailed
Definition: DtOsgChannel.h:575
osg::ref_ptr< osg::DatabaseRequestHandlerCallback > myDatabasePagerCallback
Definition: DtOsgChannel.h:557
int myRenderTextureFormat
Definition: DtOsgChannel.h:503
DtOsgWindow * myOsgWindow
Definition: DtOsgChannel.h:500
This class encapsulates a Key event.
Definition: DtKeyEvent.h:16
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
bool myShowTracksEnabled
Definition: DtOsgChannel.h:579
bool myFrameBufferNeedsClear
Definition: DtOsgChannel.h:563
The channel creator for the abstract channel class.
Definition: DtOsgChannel.h:594
bool mySensorInitialized
Definition: DtOsgChannel.h:511
int myLastNumMultiSamplesOverride
Definition: DtOsgChannel.h:571
Descriptor for a single intersection result.
Definition: DtIntersector.h:33
Definition: DtOsgChannelSensor.h:22
PostProcessorEffectList myPostProcessorEffects
Definition: DtOsgChannel.h:544
The abstract channel creator for the abstract channel class.
Definition: DtChannel.h:169
This owns a list of channel configurations.
Definition: DtWindowConfiguration.h:28
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:77
osg::ref_ptr< osg::Texture > myRenderTexture
The textures the 3D scene renders into when post processing is on.
Definition: DtOsgChannel.h:528
osg::ref_ptr< osg::Texture > myOcclusionTexture
Definition: DtOsgChannel.h:530
bool myEnableHdrPassthrough
Definition: DtOsgChannel.h:559
This class encapsulates a mouse button event.
Definition: DtMouseEvent.h:19
bool myEnablePostProcessors
Definition: DtOsgChannel.h:550
bool myUseOldChannelOffsetCalcuation
Definition: DtOsgChannel.h:555
bool myChannelEnabled
Definition: DtOsgChannel.h:513
osg::ref_ptr< osgViewer::View > myView
Definition: DtOsgChannel.h:499
osg::ref_ptr< DtCameraNode > myNormalized2DCamera
Definition: DtOsgChannel.h:525
int myRenderTextureSourceType
Definition: DtOsgChannel.h:507
The abstract Channel Class.
Definition: DtChannel.h:30
Contains makVrv::DtCameraNode declaration.
std::list< std::string > PostProcessorEffectList
Definition: DtOsgChannel.h:299
DtOsgChannelSensor * myChannelSensor
Definition: DtOsgChannel.h:577
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:29
bool myRenderToTextureFlag
Definition: DtOsgChannel.h:539
float myHdrOutputScale
Definition: DtOsgChannel.h:561
The osg cull vistor parameters class provides additional culling and intersector parameters for choos...
Definition: DtOsgCullVisitorParameters.h:38
osg::Node::NodeMask myOldSceneCameraNodeMask
Definition: DtOsgChannel.h:546
osg::ref_ptr< osg::Group > myRoot
Definition: DtOsgChannel.h:515
Contains makVrv::DtChannel class.
bool myIsUsingTrackballManipulator
Definition: DtOsgChannel.h:537
bool myForceHdrLuminanceOverride
Definition: DtOsgChannel.h:560
It is expected that custom implementations of paging (whether inheriting from pagedLOD or not...
Definition: DtTerrainPageSignaler.h:30
VR-Vantage specific subclass of OSG camera.
Definition: DtCameraNode.h:29
ProjectionUnits
Definition: DtChannelConfiguration.h:39
osg::ref_ptr< DtCameraNode > mySceneCamera
Definition: DtOsgChannel.h:519
virtual DtOsgChannelSensor * findChannelSensor()
Definition: DtOsgChannel.h:371
boost::signalslib::signal< void(int, int, int, int)> signal_viewportChanged
Emitted when the channel's viewport changes dimensions.
Definition: DtOsgChannel.h:297
osg::ref_ptr< DtCameraNode > myRTTCamera
Slave camera configured to render to myRenderTexture.
Definition: DtOsgChannel.h:535
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:26
std::map< int, DtChannelSpecificGroup * > VisualTypeMap
Definition: DtOsgChannel.h:497
Class for generic lights This holds per-light data such as range, attenuation factors, colors, etc.
Definition: DtLight.h:52
bool myDepthTextureUsesStencilBuffer
Definition: DtOsgChannel.h:532
double myPreviousClampedNearClipDistance
Definition: DtOsgChannel.h:568
DtLight * myFlashlight
Definition: DtOsgChannel.h:548
bool myRenderTextureFormatDirty
Definition: DtOsgChannel.h:509
osg::ref_ptr< DtCameraNode > my2DCamera
Definition: DtOsgChannel.h:522
int myLastFocusPointAttempted
Definition: DtOsgChannel.h:574
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
int myRenderTextureSourceFormat
Definition: DtOsgChannel.h:505
Contains makVrv::DtOsgRenderer class.
ProjectionResizePolicy
Definition: DtChannelConfiguration.h:46
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtOsgObserverObject.h:45
A basic OSG display window, used to get the osg context for a display window.
Definition: DtOsgWindow.h:36
osg::ref_ptr< osg::Texture > myDepthTexture
Definition: DtOsgChannel.h:529