VR-Forces 4.0.4 Class Documentation
include/terrainDbFactory/pprMap.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: pprMap.h,v $ $Revision: 1.22 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 #ifndef PPRMAP_H
00010 #define PPRMAP_H
00011 
00012 #include "terrainDbFactory/terrainDbFactoryDefines.h"
00013 #include <vlutil/vlString.h>
00014 
00015 class DtPoint;
00016 class DtDisplaySize;
00017 class DtPaperMapRecord;
00018 class Coordinate_System;
00019 class DtExtent;
00020 class DtFilename;
00021 class QImage;
00022 class QString;
00023 class QColor;
00024 
00025 
00026 // class DtPaperMap:
00027 //
00028 // Instances of this class are individual papermaps, loaded from a file in
00029 // in some raster format.
00030 
00031 class DT_DLL_terrainDbFactory DtPaperMap
00032 {
00033 
00034 public:
00035 
00036    enum DtCoordinateSystem
00037    {
00038       DtCSGeodetic,
00039       DtCSUtm,
00040       DtCSLcc,
00041       DtCSInvalid,
00042       DtCSFlatEarth,
00043       DtCSLast
00044    };
00045 
00046    enum AlphaMode
00047    {
00048       NoAlpha,
00049       AlphaMask,
00050       AlphaBlend
00051    };
00052 
00053    // default constructor.
00054    DtPaperMap();
00055 
00056    // destructor
00057    virtual ~DtPaperMap();
00058 
00059    // Load the papermap.
00060    virtual bool init
00061    (
00062       const DtFilename& path,
00063       DtPaperMapRecord* paperMapRec,
00064       const Coordinate_System* coordSys
00065    );
00066 
00067    // Returns a pointer to the scaled bitmap.
00068    virtual bool getScaledImage
00069    (
00070       const Coordinate_System* coordSys,
00071       const DtExtent& viewportExtent,
00072       const DtDisplaySize& screenSize,
00073       DtPoint& bitmapLocation,
00074       QImage& image,
00075       bool useMask,
00076       QColor* backgroundColor = 0,
00077       int* scaledBitmapX = NULL, int* scaledBitmapY = NULL
00078    ) = 0;
00079 
00080    // Returns the type of papermap (pixmap, rpf, multires)
00081    virtual const DtString mapType() const = 0;
00082 
00083    // Returns the name of this papermap level
00084    virtual const DtString& name(void) const;
00085 
00086    virtual void setName(const DtString& name);
00087 
00088    // Sets whether or not to hide/show papermap
00089    virtual void setShow(bool b);
00090    
00091    // Gets whether or not to show this papermap
00092    virtual bool show(void);
00093 
00094    // Get/set the alpha method to be used when drawing this map.
00095    virtual DtPaperMap::AlphaMode alphaMode() const;
00096 
00097    virtual void setAlphaMode(DtPaperMap::AlphaMode alphaMode);
00098 
00099    // Sets transparency level for bitmaps that do not have an alpha
00100    // channel.  Set from 0 (opaque) to 100 (completely transparent).
00101    virtual void setTransparencyLevel(int d);
00102 
00103    virtual int transparencyLevel() const;
00104 
00105    virtual const Coordinate_System* coordSys() const;
00106 
00107    // Set up the coordinate system of the papermap. Check it against the terrain's
00108    // coordinate system.
00109    virtual bool setCoordSys(DtPaperMap::DtCoordinateSystem sys,const Coordinate_System* terrainSys);
00110    DtPaperMap::DtCoordinateSystem coordinateSystemType() const;
00111 
00112    static DtPaperMap * create();
00113 
00114 protected:
00115 
00116    // copy constructor
00117    DtPaperMap(const DtPaperMap& orig);
00118 
00119    // assignment operator
00120    DtPaperMap& operator=(const DtPaperMap& rhs);
00121 
00122    const Coordinate_System* myCoordinateSystem;
00123 
00124    bool myDeleteCoordSys;
00125    bool myShow;
00126    DtString myName;
00127    DtPaperMap::AlphaMode myAlphaMode;
00128    DtPaperMap::DtCoordinateSystem myCoordinateSystemType;
00129 
00130    int myTransparencyLevel;
00131 };
00132 
00133 #endif

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)