VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
paperMap.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: pprMap.h,v $ $Revision: 1.22 $ $State: Exp $
7 *******************************************************************************/
8 
9 #ifndef PPRMAP_H
10 #define PPRMAP_H
11 
13 #include <vlutil/vlString.h>
14 
15 class DtPoint;
16 class DtDisplaySize;
17 class DtPaperMapRecord;
18 class Coordinate_System;
19 class DtExtent;
20 class DtFilename;
21 class QImage;
22 class QString;
23 class QColor;
24 
25 
26 // class DtPaperMap:
27 //
28 // Instances of this class are individual papermaps, loaded from a file in
29 // in some raster format.
30 
32 {
33 
34 public:
35 
37  {
43  DtCSLast
44  };
45 
46  enum AlphaMode
47  {
50  AlphaBlend
51  };
52 
53  // default constructor.
54  DtPaperMap();
55 
56  // destructor
57  virtual ~DtPaperMap();
58 
59  // Load the papermap.
60  virtual bool init
61  (
62  const DtFilename& path,
63  DtPaperMapRecord* paperMapRec,
64  const Coordinate_System* coordSys
65  );
66 
67  // Returns a pointer to the scaled bitmap.
68  virtual bool getScaledImage
69  (
70  const Coordinate_System* coordSys,
71  const DtExtent& viewportExtent,
72  const DtDisplaySize& screenSize,
73  DtPoint& bitmapLocation,
74  QImage& image,
75  bool useMask,
76  QColor* backgroundColor = 0,
77  int* scaledBitmapX = NULL, int* scaledBitmapY = NULL
78  ) = 0;
79 
80  // Returns the type of papermap (pixmap, rpf, multires)
81  virtual const DtString mapType() const = 0;
82 
83  // Returns the name of this papermap level
84  virtual const DtString& name(void) const;
85 
86  virtual void setName(const DtString& name);
87 
88  // Sets whether or not to hide/show papermap
89  virtual void setShow(bool b);
90 
91  // Gets whether or not to show this papermap
92  virtual bool show(void);
93 
94  // Get/set the alpha method to be used when drawing this map.
95  virtual DtPaperMap::AlphaMode alphaMode() const;
96 
97  virtual void setAlphaMode(DtPaperMap::AlphaMode alphaMode);
98 
99  // Sets transparency level for bitmaps that do not have an alpha
100  // channel. Set from 0 (opaque) to 100 (completely transparent).
101  virtual void setTransparencyLevel(int d);
102 
103  virtual int transparencyLevel() const;
104 
105  virtual const Coordinate_System* coordSys() const;
106 
107  // Set up the coordinate system of the papermap. Check it against the terrain's
108  // coordinate system.
109  virtual bool setCoordSys(DtPaperMap::DtCoordinateSystem sys,const Coordinate_System* terrainSys);
110  DtPaperMap::DtCoordinateSystem coordinateSystemType() const;
111 
112  static DtPaperMap * create();
113 
114 protected:
115 
116  // copy constructor
117  DtPaperMap(const DtPaperMap& orig);
118 
119  // assignment operator
120  DtPaperMap& operator=(const DtPaperMap& rhs);
121 
123 
125  bool myShow;
129 
131 };
132 
133 #endif
Definition: paperMap.h:39
const Coordinate_System * myCoordinateSystem
Definition: paperMap.h:122
Definition: paperMap.h:49
DtPaperMap::AlphaMode myAlphaMode
Definition: paperMap.h:127
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
Definition: paperMap.h:42
DtString myName
Definition: paperMap.h:126
Definition: coordSystem.h:54
Definition: paperMapRecord.h:22
Definition: paperMap.h:41
Definition: paperMap.h:31
DtCoordinateSystem
Definition: paperMap.h:36
Definition: paperMap.h:40
#define DT_DLL_terrainDbFactory
Definition: terrainDbFactoryDefines.h:23
AlphaMode
Definition: paperMap.h:46
Definition: paperMap.h:38
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Definition: paperMap.h:48
bool myShow
Definition: paperMap.h:125
int myTransparencyLevel
Definition: paperMap.h:130
DtPaperMap::DtCoordinateSystem myCoordinateSystemType
Definition: paperMap.h:128
bool myDeleteCoordSys
Definition: paperMap.h:124
Definition: point.h:34

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)