![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2007 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtOsgWindowManager.h,v $ $Revision: 1.17 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 00015 #include <vrvOsg/vrvOsg.h> 00016 #include <vrvCore/DtWindowManager.h> 00017 00018 #include <osg/Timer> 00019 #include <osg/Vec3> 00020 00021 namespace osg 00022 { 00023 class FrameStamp; 00024 } 00025 00026 namespace osgViewer 00027 { 00028 class CompositeViewer; 00029 } 00030 00031 namespace makVrv 00032 { 00035 class DT_DLL_VRVOSG DtOsgWindowManager : public DtWindowManager 00036 { 00037 public: 00038 00040 DtOsgWindowManager(DtDe& de,DtWindowConfigurations& configs); 00041 00043 virtual ~DtOsgWindowManager(); 00044 00047 virtual bool tick(); 00048 00051 virtual void destroyWindow( DtWindow* window ); 00052 00054 osgViewer::CompositeViewer& createOrGetViewer(); 00055 00058 virtual bool isVisibleAndCloseToCamera( 00059 float sphereRadius, 00060 float sphereCenterX, float sphereCenterY, float sphereCenterZ, 00061 float distance, float upX, float upY, float upZ) const; 00062 00065 bool makeContextCurrent(); 00066 00068 int maxTextureUnits() const; 00069 00070 protected: 00071 00072 osgViewer::CompositeViewer* myViewer; 00073 osg::Timer_t myStartTime; 00074 }; 00075 00079 class DT_DLL_VRVOSG DtOsgWindowManagerCreator : public DtWindowManagerCreator 00080 { 00081 public: 00083 virtual DtWindowManager* create(DtDe& anIG,DtWindowConfigurations& 00084 viewConfigs); 00085 }; 00086 } 00087