VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtMultiResPaperMap Class Reference

class DtMultiResPaperMap: More...

Inheritance diagram for DtMultiResPaperMap:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtMultiResPaperMap ()
 default constructor.
virtual ~DtMultiResPaperMap ()
 destructor
virtual bool init (const DtFilename &path, DtPaperMapRecord *paperMapRec, const Coordinate_System *coordSys)
 Load the papermap. coordSys is the coordinate system of the terrain database.
virtual bool loadImage (const DtFilename &imageFile, const Coordinate_System *coordSys)
virtual const DtString mapType () const
const DtFilename & mtlFilename () const
void setCacheImages (bool)
bool cacheImages () const
virtual void setMapFolder (const DtFilename &folder)
virtual const DtFilename & mapFolder () const
virtual bool hasAlpha () const
virtual bool canLoadImage () const
 Returns true if image can be loaded into memory.

Static Public Member Functions

static DtPaperMapcreate ()
static void setAllowOptimization (bool)
 Turns on/off image caching and optimization system.
static bool allowOptimization ()

Protected Member Functions

virtual bool getImageSlice (const Coordinate_System *coordSys, const DtExtent &viewportExtent, const DtDisplaySize &screenSize, DtPoint &bitmapLocation, int &scaledBitmapSizeX, int &scaledBitmapSizeY, QImage &image, bool useMask, QColor *backgroundColor)
 Returns a pointer to the slice of the image we need to display.
virtual bool getImageSlice (const Coordinate_System *coordSys, const DtExtent &viewportExtent, const DtDisplaySize &screenSize, DtPoint &bitmapLocation, int &scaledBitmapSizeX, int &scaledBitmapSizeY, bool useMask, QColor *backgroundColor, QImage *retImage)
 Called from either of the two above methods, returns the resultant image in the image supplied.
virtual bool drawAsImage () const
 Currently does not support alpha channel in image, so this will always return false.
virtual void emptyActiveMapList ()
virtual void emptyCachedMapList ()
virtual bool addMapToActiveList (DtRasterMap *map)
virtual bool recheckMaps (const DtExtent &dbExtent, double resolution, QSize &imageSizeFull, QSize &imageSizeSet, const Coordinate_System *coordSys, DtExtent &globalExtent)
virtual void paintMap (const Coordinate_System *coordSys, DtMultiResActiveMapRecord &imageData, QRect &redraw, QImage *destImage, int pixWidth, int pixHeight, const DtExtent &dbExtent)
virtual void calcWindowRect (DtMultiResActiveMapRecord &imageData, int pixWidth, int pixHeight, const DtExtent &dbExtent, QPoint &topLeft, QPoint &bottomRight)
virtual bool getExtentIntersection (const DtExtent &rect1, const DtExtent &rect2, DtExtent &intersectionRect)
virtual bool loadRasterSet (const DtFilename &filename, const Coordinate_System *coordSys)
virtual void unloadRasterSet ()
virtual void getXandYIncrements (const Coordinate_System *coordSys, double &xIncrement, double &yIncrement)
virtual void initCacheInformation (const Coordinate_System *coordSys)
virtual double resolutionFor (const Coordinate_System *coordSys, const DtExtent &extent)
virtual void imageShift (const Coordinate_System *coordSys, const DtExtent &dbExtent)
 Will shift the current image to account for new sub images being placed in.
virtual bool screenLocation (const Coordinate_System *coordSys, DtMultiResActiveMapRecord &imageData, int pixWidth, int pixHeight, const DtExtent &dbExtent, DtDisplayPoint &wll, DtDisplayPoint &wur)

Protected Attributes

DtFilename myMapFolder
DtRasterMapSetmyRasterSet
DtRasterMapResSetmyCurrentResSet
DtFilename myMtlFile
bool myCachedInformation
 Used only if geodetic split and not a geodetic database.
DtExtent myImageExtent
QSize myImageSize
bool myCacheImages
 If true (default is false) images, when loaded, will not be unloaded but rather cached in the system.
bool myOptimizeCacheImages
 Set if in optimization mode to true.
bool myOptimization
 Set to true to turn on drawing optimization.
bool myHasAlpha
 True if one of the raster maps has an alpha channel.
DtPtrQList
< DtMultiResActiveMapRecord * > 
myActiveMapList
QHash< DtRasterMap
*, DtMultiResActiveMapRecord * > 
myCachedImages

Static Protected Attributes

static bool theAllowOptimization

Private Member Functions

 DtMultiResPaperMap (const DtMultiResPaperMap &orig)
 copy constructor: Not Implemented
DtMultiResPaperMapoperator= (const DtMultiResPaperMap &rhs)
 assignment operator: Not Implemented

Detailed Description

class DtMultiResPaperMap:

Instances of this class are individual papermaps, loaded from a file in in some raster format.


Constructor & Destructor Documentation

default constructor.

destructor

copy constructor: Not Implemented


Member Function Documentation

virtual bool DtMultiResPaperMap::init ( const DtFilename &  path,
DtPaperMapRecord paperMapRec,
const Coordinate_System coordSys 
) [virtual]

Load the papermap. coordSys is the coordinate system of the terrain database.

Reimplemented from DtPixmapPaperMap.

virtual bool DtMultiResPaperMap::loadImage ( const DtFilename &  imageFile,
const Coordinate_System coordSys 
) [virtual]

Reimplemented from DtPixmapPaperMap.

virtual const DtString DtMultiResPaperMap::mapType ( ) const [virtual]

Reimplemented from DtPixmapPaperMap.

static DtPaperMap* DtMultiResPaperMap::create ( ) [static]

Reimplemented from DtPixmapPaperMap.

const DtFilename & DtMultiResPaperMap::mtlFilename ( ) const [inline]

References myMtlFile.

References myCacheImages.

References myCacheImages.

virtual void DtMultiResPaperMap::setMapFolder ( const DtFilename &  folder) [virtual]
virtual const DtFilename& DtMultiResPaperMap::mapFolder ( ) const [virtual]
bool DtMultiResPaperMap::hasAlpha ( ) const [inline, virtual]

Reimplemented from DtPixmapPaperMap.

References myHasAlpha.

void DtMultiResPaperMap::setAllowOptimization ( bool  b) [inline, static]

Turns on/off image caching and optimization system.

References theAllowOptimization.

References theAllowOptimization.

virtual bool DtMultiResPaperMap::canLoadImage ( ) const [virtual]

Returns true if image can be loaded into memory.

Reimplemented from DtPixmapPaperMap.

virtual bool DtMultiResPaperMap::getImageSlice ( const Coordinate_System coordSys,
const DtExtent viewportExtent,
const DtDisplaySize screenSize,
DtPoint bitmapLocation,
int &  scaledBitmapSizeX,
int &  scaledBitmapSizeY,
QImage &  image,
bool  useMask,
QColor *  backgroundColor 
) [protected, virtual]

Returns a pointer to the slice of the image we need to display.

Reimplemented from DtPixmapPaperMap.

virtual bool DtMultiResPaperMap::getImageSlice ( const Coordinate_System coordSys,
const DtExtent viewportExtent,
const DtDisplaySize screenSize,
DtPoint bitmapLocation,
int &  scaledBitmapSizeX,
int &  scaledBitmapSizeY,
bool  useMask,
QColor *  backgroundColor,
QImage *  retImage 
) [protected, virtual]

Called from either of the two above methods, returns the resultant image in the image supplied.

Returns a pointer to the slice of the image we need to display

virtual bool DtMultiResPaperMap::drawAsImage ( ) const [protected, virtual]

Currently does not support alpha channel in image, so this will always return false.

virtual void DtMultiResPaperMap::emptyActiveMapList ( ) [protected, virtual]
virtual void DtMultiResPaperMap::emptyCachedMapList ( ) [protected, virtual]
virtual bool DtMultiResPaperMap::addMapToActiveList ( DtRasterMap map) [protected, virtual]
virtual bool DtMultiResPaperMap::recheckMaps ( const DtExtent dbExtent,
double  resolution,
QSize &  imageSizeFull,
QSize &  imageSizeSet,
const Coordinate_System coordSys,
DtExtent globalExtent 
) [protected, virtual]
virtual void DtMultiResPaperMap::paintMap ( const Coordinate_System coordSys,
DtMultiResActiveMapRecord imageData,
QRect &  redraw,
QImage *  destImage,
int  pixWidth,
int  pixHeight,
const DtExtent dbExtent 
) [protected, virtual]
virtual void DtMultiResPaperMap::calcWindowRect ( DtMultiResActiveMapRecord imageData,
int  pixWidth,
int  pixHeight,
const DtExtent dbExtent,
QPoint &  topLeft,
QPoint &  bottomRight 
) [protected, virtual]
virtual bool DtMultiResPaperMap::getExtentIntersection ( const DtExtent rect1,
const DtExtent rect2,
DtExtent intersectionRect 
) [protected, virtual]

Reimplemented from DtPixmapPaperMap.

virtual bool DtMultiResPaperMap::loadRasterSet ( const DtFilename &  filename,
const Coordinate_System coordSys 
) [protected, virtual]
virtual void DtMultiResPaperMap::unloadRasterSet ( ) [protected, virtual]
virtual void DtMultiResPaperMap::getXandYIncrements ( const Coordinate_System coordSys,
double &  xIncrement,
double &  yIncrement 
) [protected, virtual]
virtual void DtMultiResPaperMap::initCacheInformation ( const Coordinate_System coordSys) [protected, virtual]
virtual double DtMultiResPaperMap::resolutionFor ( const Coordinate_System coordSys,
const DtExtent extent 
) [protected, virtual]
virtual void DtMultiResPaperMap::imageShift ( const Coordinate_System coordSys,
const DtExtent dbExtent 
) [protected, virtual]

Will shift the current image to account for new sub images being placed in.

virtual bool DtMultiResPaperMap::screenLocation ( const Coordinate_System coordSys,
DtMultiResActiveMapRecord imageData,
int  pixWidth,
int  pixHeight,
const DtExtent dbExtent,
DtDisplayPoint wll,
DtDisplayPoint wur 
) [protected, virtual]
DtMultiResPaperMap& DtMultiResPaperMap::operator= ( const DtMultiResPaperMap rhs) [private]

assignment operator: Not Implemented


Member Data Documentation

DtFilename DtMultiResPaperMap::myMapFolder [protected]
DtFilename DtMultiResPaperMap::myMtlFile [protected]

Referenced by mtlFilename().

Used only if geodetic split and not a geodetic database.

Reimplemented from DtPixmapPaperMap.

If true (default is false) images, when loaded, will not be unloaded but rather cached in the system.

Set this flag to true when performance is more of an issue than memory usage.

Referenced by cacheImages(), and setCacheImages().

Set if in optimization mode to true.

Use different flag in case not in optimization mode but still want to cache images

Set to true to turn on drawing optimization.

True if one of the raster maps has an alpha channel.

Referenced by hasAlpha().


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)