VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtOsgEarthCacheHandler Class Reference

DtOsgEarthCacheHandler, using QThread to run in a separate thread. More...

Inheritance diagram for makVrv::DtOsgEarthCacheHandler:
Inheritance graph
[legend]

Classes

class  CacheArea
class  VertexInfo

Signals

void QtSignal_updateProgress (int progress)
 Qt signal to emit the cache progress.
void QtSignal_cacheFinished ()
 Qt signal to emit when the cache finished.

Public Member Functions

virtual ~DtOsgEarthCacheHandler ()
 CTOR.
virtual bool isFinished ()
 whether cache is finished.
virtual bool isCanceled ()
 whether cache is canceled.
virtual void run ()
 Reimplement run() function to use the QThread,all code executed in this function will be in a worker thread.
virtual void initialize ()
 initializ,create the event processor etc
virtual void setMapNode (osgEarth::MapNode *mapNode)
 Set the MapNode that forms the root of an osgEarth map.
virtual void setLowestLOD (int lowestLevel)
 Sets the lowest LOD to cache,only applies for image and elevation layers.
virtual void setHighestLOD (int highestLevel)
 Sets the maximum LOD to cache,only applies for image and elevation layers.
virtual void setBound (osgEarth::Bounds bound)
 Sets the Bound of the selected area.
virtual std::string getEstimateInfo ()
 Gets the estimation info string of cache.
virtual void cleanup (bool checkSpecifyCacheCheckBox, bool deleteAll=false)
 Clean up.
virtual osgEarth::Bounds getCorrectBound ()
 Gets the correct bound,the bound need correct min/max vertex.
virtual osg::Matrix getWorldToWindowMatirx ()
 get the world to window matrix
DtOsgEarthCacheEditingEventProcessorgetEventProcessor ()
 get the event processor
DtOsgEarthCacheInterfacegetOsgEarthCacheInterface ()
 get the DtOsgEarthCache interface
virtual void onGenerateCacheButtonClicked ()
 Functions called by the DtOsgEarthCacheLogic.
virtual void onSelectOsgEarthChanged (const std::string &file)
virtual void onSpecifyCacheAreaCheckBoxChanged (int checked)
virtual void onEstimateMessageBoxResult (int result)
virtual void onProgressUpdate (int progress)
virtual void onCleanup ()
virtual void onClearAreaButtonClicked ()
virtual void onStartLongitudeChanged (double value, bool isFromSlider)
virtual void onStartLatitudeChanged (double value, bool isFromSlider)
virtual void onEndLongitudeChanged (double value, bool isFromSlider)
virtual void onEndLatitudeChanged (double value, bool isFromSlider)
virtual void onLowestLODChanged (int lowLOD)
virtual void onHighestLODChanged (int highLOD)
virtual void onCancelButtonClicked ()
virtual void onCacheFinished ()
virtual void onCacheFinishedMessageBoxResult (int result)

Protected Member Functions

 DtOsgEarthCacheHandler (DtDe &de, DtOsgEarthCacheInterface *iFace)
 Protected Constructor.
virtual void initializeChannel ()
 initialize the channel and render
virtual void slot_postTick ()
 update the rectangle if it is dirty
virtual void slot_place (DtVector geocentricPos)
 slot when the user place the vertex, emit by the signal in the event processor
virtual void slot_locationChanged (DtVector geocentricPos)
 slot when the user move the mouse, emit by the signal in the event processor
virtual void slot_drag ()
 slot when the user drag the vertex of the rectangle, emit by the signal in the event processor
virtual void slot_windowToBeDestroyed (DtWindow *window)
 slot when the window got destroyed
virtual void slot_channelToBeDestroyed (const std::string &display, const std::string &window, const std::string &channel)
 slot when the channel got destroyed
virtual void slot_updateProgress (int progress)
 slot when update the cache progress
virtual void slot_cacheFinished ()
 slot when cache finished
virtual void connectSignals ()
 connect all the signals
virtual void disconnectSignals ()
 disconnect all the signals
virtual std::string formatEstimateTimeandSpace (double estimateTime, double estimateSize)
 Formats the estimate time and space.

Protected Attributes

DtDemyDe
DtCameraNodemyCameraNode
 need keep this to cast the geocentric coordinate back to screen space
DtOsgEarthCacheInterfacemyInterface
DtSignalConnectionManager mySignals
DtOsgEarthCachemyOsgEarthCache
DtChannelmyChannel
 the channel we drag area on
CacheArea myCacheArea
osgEarth::MapNode * myMapNode
DtOsgEarthCacheEditingEventProcessormyEventProcessor
bool mySpecifyArea
 if you dont select an area, the whole terrain is cached
bool myChannelInitialized
int myLowestLOD
int myHighestLOD
double myEstimateTime
double myEstimateSize

Friends

class DtOsgEarthCacheHandlerCreator

Detailed Description

DtOsgEarthCacheHandler, using QThread to run in a separate thread.

Constructor & Destructor Documentation

virtual makVrv::DtOsgEarthCacheHandler::~DtOsgEarthCacheHandler ( )
virtual

CTOR.

makVrv::DtOsgEarthCacheHandler::DtOsgEarthCacheHandler ( DtDe de,
DtOsgEarthCacheInterface iFace 
)
protected

Protected Constructor.

Use DtOsgEarthCacheHandlerCreator to create instances of this class

Member Function Documentation

virtual void makVrv::DtOsgEarthCacheHandler::onGenerateCacheButtonClicked ( )
virtual

Functions called by the DtOsgEarthCacheLogic.

Reimplemented in makVrf::DtVrfOsgEarthCacheHandler.

virtual void makVrv::DtOsgEarthCacheHandler::onSelectOsgEarthChanged ( const std::string &  file)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onSpecifyCacheAreaCheckBoxChanged ( int  checked)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onEstimateMessageBoxResult ( int  result)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onProgressUpdate ( int  progress)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onCleanup ( )
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onClearAreaButtonClicked ( )
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onStartLongitudeChanged ( double  value,
bool  isFromSlider 
)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onStartLatitudeChanged ( double  value,
bool  isFromSlider 
)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onEndLongitudeChanged ( double  value,
bool  isFromSlider 
)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onEndLatitudeChanged ( double  value,
bool  isFromSlider 
)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onLowestLODChanged ( int  lowLOD)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onHighestLODChanged ( int  highLOD)
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onCancelButtonClicked ( )
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onCacheFinished ( )
virtual
virtual void makVrv::DtOsgEarthCacheHandler::onCacheFinishedMessageBoxResult ( int  result)
virtual
virtual bool makVrv::DtOsgEarthCacheHandler::isFinished ( )
virtual

whether cache is finished.

virtual bool makVrv::DtOsgEarthCacheHandler::isCanceled ( )
virtual

whether cache is canceled.

void makVrv::DtOsgEarthCacheHandler::QtSignal_updateProgress ( int  progress)
signal

Qt signal to emit the cache progress.

void makVrv::DtOsgEarthCacheHandler::QtSignal_cacheFinished ( )
signal

Qt signal to emit when the cache finished.

virtual void makVrv::DtOsgEarthCacheHandler::run ( )
virtual

Reimplement run() function to use the QThread,all code executed in this function will be in a worker thread.

virtual void makVrv::DtOsgEarthCacheHandler::initialize ( )
virtual

initializ,create the event processor etc

virtual void makVrv::DtOsgEarthCacheHandler::setMapNode ( osgEarth::MapNode *  mapNode)
virtual

Set the MapNode that forms the root of an osgEarth map.

virtual void makVrv::DtOsgEarthCacheHandler::setLowestLOD ( int  lowestLevel)
virtual

Sets the lowest LOD to cache,only applies for image and elevation layers.

virtual void makVrv::DtOsgEarthCacheHandler::setHighestLOD ( int  highestLevel)
virtual

Sets the maximum LOD to cache,only applies for image and elevation layers.

virtual void makVrv::DtOsgEarthCacheHandler::setBound ( osgEarth::Bounds  bound)
virtual

Sets the Bound of the selected area.

virtual std::string makVrv::DtOsgEarthCacheHandler::getEstimateInfo ( )
virtual

Gets the estimation info string of cache.

virtual void makVrv::DtOsgEarthCacheHandler::cleanup ( bool  checkSpecifyCacheCheckBox,
bool  deleteAll = false 
)
virtual

Clean up.

Parameters
namecheckSpecifyCacheCheckBox whether check the Specify Check Box .
namedeleteAll,if true,it will delete the actual geometry data ,otherwise just hide the polygon.

Reimplemented in makVrf::DtVrfOsgEarthCacheHandler.

virtual osgEarth::Bounds makVrv::DtOsgEarthCacheHandler::getCorrectBound ( )
virtual

Gets the correct bound,the bound need correct min/max vertex.

Returns
osgEarth::Bounds
virtual osg::Matrix makVrv::DtOsgEarthCacheHandler::getWorldToWindowMatirx ( )
virtual

get the world to window matrix

DtOsgEarthCacheEditingEventProcessor* makVrv::DtOsgEarthCacheHandler::getEventProcessor ( )

get the event processor

DtOsgEarthCacheInterface* makVrv::DtOsgEarthCacheHandler::getOsgEarthCacheInterface ( )

get the DtOsgEarthCache interface

virtual void makVrv::DtOsgEarthCacheHandler::initializeChannel ( )
protectedvirtual

initialize the channel and render

virtual void makVrv::DtOsgEarthCacheHandler::slot_postTick ( )
protectedvirtual

update the rectangle if it is dirty

virtual void makVrv::DtOsgEarthCacheHandler::slot_place ( DtVector  geocentricPos)
protectedvirtual

slot when the user place the vertex, emit by the signal in the event processor

Parameters
namegeocentricPos the geocentric pos passed by the event processor
virtual void makVrv::DtOsgEarthCacheHandler::slot_locationChanged ( DtVector  geocentricPos)
protectedvirtual

slot when the user move the mouse, emit by the signal in the event processor

Parameters
namegeocentricPos the geocentric pos passed by the event processor
virtual void makVrv::DtOsgEarthCacheHandler::slot_drag ( )
protectedvirtual

slot when the user drag the vertex of the rectangle, emit by the signal in the event processor

virtual void makVrv::DtOsgEarthCacheHandler::slot_windowToBeDestroyed ( DtWindow window)
protectedvirtual

slot when the window got destroyed

virtual void makVrv::DtOsgEarthCacheHandler::slot_channelToBeDestroyed ( const std::string &  display,
const std::string &  window,
const std::string &  channel 
)
protectedvirtual

slot when the channel got destroyed

virtual void makVrv::DtOsgEarthCacheHandler::slot_updateProgress ( int  progress)
protectedvirtual

slot when update the cache progress

Parameters
progressthe cache progress of the current layer(0-100)
virtual void makVrv::DtOsgEarthCacheHandler::slot_cacheFinished ( )
protectedvirtual

slot when cache finished

virtual void makVrv::DtOsgEarthCacheHandler::connectSignals ( )
protectedvirtual

connect all the signals

virtual void makVrv::DtOsgEarthCacheHandler::disconnectSignals ( )
protectedvirtual

disconnect all the signals

virtual std::string makVrv::DtOsgEarthCacheHandler::formatEstimateTimeandSpace ( double  estimateTime,
double  estimateSize 
)
protectedvirtual

Formats the estimate time and space.

Friends And Related Function Documentation

friend class DtOsgEarthCacheHandlerCreator
friend

Member Data Documentation

DtDe& makVrv::DtOsgEarthCacheHandler::myDe
protected
DtCameraNode* makVrv::DtOsgEarthCacheHandler::myCameraNode
protected

need keep this to cast the geocentric coordinate back to screen space

DtOsgEarthCacheInterface* makVrv::DtOsgEarthCacheHandler::myInterface
protected
DtSignalConnectionManager makVrv::DtOsgEarthCacheHandler::mySignals
protected
DtOsgEarthCache* makVrv::DtOsgEarthCacheHandler::myOsgEarthCache
protected
DtChannel* makVrv::DtOsgEarthCacheHandler::myChannel
protected

the channel we drag area on

CacheArea makVrv::DtOsgEarthCacheHandler::myCacheArea
protected
osgEarth::MapNode* makVrv::DtOsgEarthCacheHandler::myMapNode
protected
DtOsgEarthCacheEditingEventProcessor* makVrv::DtOsgEarthCacheHandler::myEventProcessor
protected
bool makVrv::DtOsgEarthCacheHandler::mySpecifyArea
protected

if you dont select an area, the whole terrain is cached

bool makVrv::DtOsgEarthCacheHandler::myChannelInitialized
protected
int makVrv::DtOsgEarthCacheHandler::myLowestLOD
protected
int makVrv::DtOsgEarthCacheHandler::myHighestLOD
protected
double makVrv::DtOsgEarthCacheHandler::myEstimateTime
protected
double makVrv::DtOsgEarthCacheHandler::myEstimateSize
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)