19 #include <matrix/vlVector.h>
21 #include <osgViewer/View>
26 class DatabaseRequestHandler;
32 class DtChannelSpecificGroup;
33 class DtIntersectorResult;
34 class DtIntersectorsContainer;
36 class DtOsgChannelCreator;
37 class DtOsgEmptySceneLogo;
38 class DtChannelManager;
39 class DtWindowConfiguration;
42 class DtOsgObserverObject;
43 class DtOsgCullVisitorParameters;
44 class DtTerrainPageSignaler;
46 class DtOsgChannelSensor;
72 virtual bool initialize();
76 virtual void initializeNormalized2DCamera();
77 virtual void initialize2DCamera(
int w,
int h);
78 virtual void initializeSceneCamera();
79 virtual void initializeRenderTexture();
81 virtual void initializeRTTCamera();
83 virtual void clearRttCamera();
85 virtual void recreateRTTCamera();
90 virtual void setShadowState(
bool enable);
93 virtual void addOverlayDrawablesToCameras();
100 virtual void initializeSignalConnections();
112 virtual void setSensorName(
const std::string& sensorName);
115 virtual void setClearColor(
float r,
float g,
float b,
float a);
120 virtual void setWindow(
DtWindow* view);
123 virtual const DtWindow* window()
const;
126 virtual void setViewport(
int x,
int y,
int width,
int height);
131 virtual void clearFrameBufferIfChanged();
134 virtual void getViewport(
int& x,
int& y,
int& width,
int& height)
const;
137 virtual void setCameraPosition(
double x,
double y,
double z);
140 virtual void setCameraOrientation(
double psi,
double theta,
double phi);
146 virtual void setCameraPositionAndOrientation(
double x,
double y,
147 double z,
double psi,
double theta,
double phi);
148 virtual void setCameraPositionAndOrientation(osg::Vec3d& pos,
152 virtual void getCameraPositionAndOrientation(osg::Vec3d& position,
153 osg::Quat& rotation)
const;
165 virtual void setChannelEnabled(
bool enabled,
bool partial)
override;
169 virtual bool channelEnabled()
const;
171 virtual void update();
174 virtual void connectToObserver();
177 virtual osgViewer::View& view();
201 virtual void setRenderToTexture(
bool enabled);
206 virtual void setRenderToTextureFormat(
int format,
int sourceFormat,
int sourceType);
220 virtual void setDepthTextureUsesStencilBuffer(
bool useStencil);
223 virtual bool depthTextureUsesStencilBuffer()
const;
226 virtual int shadowQuality()
const;
231 virtual std::vector<const osg::Camera*> getShadowableCameras()
const;
235 virtual void setProjectionResizePolicy(
240 virtual void updateProjection();
243 double &left,
double zNear,
double &right,
double &top,
double &bottom);
246 double& left,
double zNear,
double& right,
double& top,
double& bottom);
249 virtual void connectChannelToScene();
255 virtual bool processKeyboardEvent(
const DtKeyEvent & ev);
261 virtual void getWorldToWindowMatrix(osg::Matrix& worldToWindowMatrix)
const;
264 virtual void moveMouseToScreenLocation(
float screenX,
float screenY);
269 virtual void projectToScreen(
double dbX,
double dbY,
double dbZ,
270 double& screenX,
double& screenY,
double& screenZ)
const override;
273 virtual void projectToWorld(
double screenX,
double screenY,
274 double& dbX,
double& dbY,
double& dbZ)
const override;
284 std::vector<DtElementID>* ignoreList = 0)
override;
287 virtual const std::string& name();
300 virtual void addPostProcessEffect(
const std::string& postProcessorEffect);
305 virtual void removePostProcessEffect(
const std::string& postProcessorEffect);
308 virtual bool hasPostProcessEffect(
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);
387 virtual std::vector<DtElementID> entitiesInFrustum()
override;
394 virtual void makeObserverToCameraMatrix(osg::Vec3d& orient,
395 osg::Matrixd& offsetObserverToCamera, osg::Matrixd& observerToCamera);
396 virtual void makeObserverToCameraMatrix(osg::Quat& qObserverToWorld,
397 osg::Matrixd& offsetObserverToCamera, osg::Matrixd& observerToCamera);
401 virtual void calculateNearFar(
double& zNear,
double& zFar);
406 virtual bool useAttachedForNearClip(
double alt);
409 virtual double calculateNearClip(
double alt,
double zFar);
412 virtual double calculateFarClip(
double alt);
418 virtual double calculateNearClipMagClamp(
double zNear,
double zFar,
float magLevel=2.);
421 virtual void projectFor3D();
424 virtual void projectFor2D();
428 virtual void connectRttCameraToScene();
441 virtual void slot_visualizerRootAdded(
DtModelSetId modelSet,
int visualType);
444 virtual void slot_shadowsRemoved();
452 int setting,
bool value);
466 virtual void slot_windowConfigurationModified(
const std::string& deName,
470 virtual void slot_channelConfigurationModified(
const std::string& deName,
471 const std::string& windowName,
const std::string& oldChannelName,
475 virtual void slot_onCoordinateSystemChanged();
479 virtual void slot_paperMapEnabledChanged(
bool setting);
482 virtual void observerRemoved(
const std::string& observerName);
485 virtual void updateMultiSampleOverrideSetting();
490 virtual void getRenderTextureAttachmentInfo(
unsigned int&
level,
unsigned int& face,
unsigned int& sampleBuffers,
unsigned int& samples);
493 virtual void initializeRenderTextureColor();
496 virtual void initializeRenderTextureDepth();
499 virtual void initializeRttCameraDepth();
502 virtual void changedRttCameraFbo();
508 virtual void calculateAndSetFocusPointDistance(
double zNear,
double zFar);
512 osgViewer::CompositeViewer* getOrCreateViewer();
515 virtual void flipHorizontal(
bool flip);
520 const std::vector<DtVector>& points)
const;
bool myShadowState
Definition: DtOsgChannel.h:566
IntersectProperties
The IntersectProperties enum is a flag set that indicates the types of nodes to be considered for int...
Definition: DtIntersector.h:31
DtOsgObserverObject * myOsgObserverObject
Definition: DtOsgChannel.h:527
Abstract Base class.
Definition: DtWindow.h:25
bool myCoordinateSystemChanged
Definition: DtOsgChannel.h:564
DtOsgEmptySceneLogo * myEmptySceneLogo
Definition: DtOsgChannel.h:614
std::vector< osg::Vec3d > myFocusPoints
Definition: DtOsgChannel.h:605
osg::ref_ptr< osg::DatabaseRequestHandlerCallback > myDatabasePagerCallback
Definition: DtOsgChannel.h:584
int myRenderTextureFormat
Definition: DtOsgChannel.h:529
DtOsgWindow * myOsgWindow
Definition: DtOsgChannel.h:526
This class encapsulates a Key event.
Definition: DtKeyEvent.h:16
static int theRunningCameraId
This is used to give names to each camera created. This is appended to the camera name This is useful...
Definition: DtOsgChannel.h:619
#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:610
bool myFrameBufferNeedsClear
Definition: DtOsgChannel.h:590
The channel creator for the abstract channel class.
Definition: DtOsgChannel.h:634
Utility class that contains intersectors for all model sets in the system (3d, xr, 2d) Use an object of this class when all models sets can be possibly needed. When you know which model set you need, you can just use the DtIntersectorCreator to create an intersector for a model set Models sets corresponding to 3d, xr and 2d are created by default (these correspond to values of 0, 1 and 5) Additional model sets can be registered with DtIntersectorsContainer::registerModelSet.
Definition: DtIntersectorsContainer.h:37
bool mySensorInitialized
Definition: DtOsgChannel.h:537
int myLastNumMultiSamplesOverride
Definition: DtOsgChannel.h:603
Descriptor for a single intersection result.
Definition: DtIntersectorResult.h:21
Definition: DtOsgChannelSensor.h:22
PostProcessorEffectList myPostProcessorEffects
Definition: DtOsgChannel.h:570
The abstract channel creator for the abstract channel class.
Definition: DtChannel.h:192
This owns a list of channel configurations.
Definition: DtWindowConfiguration.h:26
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:55
osg::ref_ptr< osg::Texture > myRenderTexture
The textures the 3D scene renders into when post processing is on.
Definition: DtOsgChannel.h:554
osg::ref_ptr< osg::Texture > myOcclusionTexture
Definition: DtOsgChannel.h:556
bool myEnableHdrPassthrough
Definition: DtOsgChannel.h:586
This class encapsulates a mouse button event.
Definition: DtMouseEvent.h:19
bool myEnablePostProcessors
Definition: DtOsgChannel.h:577
bool myUseOldChannelOffsetCalcuation
Definition: DtOsgChannel.h:582
bool myChannelEnabled
Definition: DtOsgChannel.h:539
osg::ref_ptr< osgViewer::View > myView
Definition: DtOsgChannel.h:525
osg::ref_ptr< DtCameraNode > myNormalized2DCamera
Definition: DtOsgChannel.h:551
int myRenderTextureSourceType
Definition: DtOsgChannel.h:533
The abstract Channel Class.
Definition: DtChannel.h:35
Contains makVrv:DtIntersector class.
This class handles displaying a logo for a channel when the channel scene is empty. An empty scene means that no terrain is loaded. On overlay is used to hide the scene until the terrain loads.
Definition: DtOsgEmptySceneLogo.h:46
Contains makVrv::DtCameraNode declaration.
std::list< std::string > PostProcessorEffectList
Emitted when the channel's viewport changes dimensions.
Definition: DtOsgChannel.h:295
DtOsgChannelSensor * myChannelSensor
Definition: DtOsgChannel.h:608
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:32
bool myRenderToTextureFlag
Definition: DtOsgChannel.h:565
float myHdrOutputScale
Definition: DtOsgChannel.h:588
The osg cull vistor parameters class provides additional culling and intersector parameters for choos...
Definition: DtOsgCullVisitorParameters.h:43
osg::Node::NodeMask myOldRTTCameraNodeMask
Definition: DtOsgChannel.h:573
osg::Node::NodeMask myOldSceneCameraNodeMask
Definition: DtOsgChannel.h:572
osg::ref_ptr< osg::Group > myRoot
Definition: DtOsgChannel.h:541
Contains makVrv::DtChannel class.
bool myIsUsingTrackballManipulator
Definition: DtOsgChannel.h:563
bool myForceHdrLuminanceOverride
Definition: DtOsgChannel.h:587
VR-Vantage specific subclass of OSG camera.
Definition: DtCameraNode.h:30
ProjectionUnits
Definition: DtChannelConfiguration.h:37
osg::ref_ptr< DtCameraNode > mySceneCamera
Definition: DtOsgChannel.h:545
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:293
osg::ref_ptr< DtCameraNode > myRTTCamera
Slave camera configured to render to myRenderTexture.
Definition: DtOsgChannel.h:561
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:24
std::map< int, DtChannelSpecificGroup * > VisualTypeMap
Definition: DtOsgChannel.h:523
Class for generic lights This holds per-light data such as range, attenuation factors, colors, etc.
Definition: DtLight.h:49
bool myDepthTextureUsesStencilBuffer
Definition: DtOsgChannel.h:558
double myPreviousClampedNearClipDistance
Definition: DtOsgChannel.h:600
DtLight * myFlashlight
Definition: DtOsgChannel.h:575
bool myRenderTextureFormatDirty
Definition: DtOsgChannel.h:535
osg::ref_ptr< DtCameraNode > my2DCamera
Definition: DtOsgChannel.h:548
int myLastFocusPointAttempted
Definition: DtOsgChannel.h:606
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtModelSetId
Definition: DtModelSetEnums.h:19
int myRenderTextureSourceFormat
Definition: DtOsgChannel.h:531
Contains makVrv::DtOsgRenderer class.
Definition: DtIntersector.h:33
ProjectionResizePolicy
Definition: DtChannelConfiguration.h:44
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtOsgObserverObject.h:49
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:555
bool myLastMirrorMode
Definition: DtOsgChannel.h:595