author | David Caabeiro <david.caabeiro@seqpoint.com> |
Fri, 25 Jun 2010 12:50:05 +0200 | |
changeset 0 | c316ab048e9d |
permissions | -rw-r--r-- |
0
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
1 |
/* |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
2 |
* Name : Overlay.h |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
3 |
* Description : |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
4 |
* Project : This file is part of OpenMAR, an Open Mobile Augmented Reality browser |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
5 |
* Website : http://OpenMAR.org |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
6 |
* |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
7 |
* Copyright (c) 2010 David Caabeiro |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
8 |
* |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
9 |
* All rights reserved. This program and the accompanying materials are made available |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
10 |
* under the terms of the Eclipse Public License v1.0 which accompanies this |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
11 |
* distribution, and is available at http://www.eclipse.org/legal/epl-v10.html |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
12 |
* |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
13 |
*/ |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
14 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
15 |
#ifndef OVERLAY_H_ |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
16 |
#define OVERLAY_H_ |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
17 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
18 |
#include <e32base.h> |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
19 |
#include <GLES/egl.h> |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
20 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
21 |
#include "POIOverlay.h" |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
22 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
23 |
#include "Matrix4d.h" |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
24 |
#include "Position.h" |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
25 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
26 |
class RWindow; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
27 |
class CWsBitmap; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
28 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
29 |
class CAccelerometer; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
30 |
class CMagnetometer; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
31 |
class CAutoRotation; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
32 |
class CManager; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
33 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
34 |
/** |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
35 |
* @brief Points of interest overlay |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
36 |
* |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
37 |
* Uses orientation and position to request POIs around the current location |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
38 |
*/ |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
39 |
class COverlay : public OpenMAR::CPOIOverlay, |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
40 |
public MPositionObserver |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
41 |
{ |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
42 |
public: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
43 |
static COverlay* NewL(SParameter& aParameter); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
44 |
~COverlay(); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
45 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
46 |
protected: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
47 |
COverlay(SParameter& aParameter); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
48 |
void ConstructL(); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
49 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
50 |
public: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
51 |
void StartL(); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
52 |
void Stop(); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
53 |
const CFbsBitmap& RenderScene(); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
54 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
55 |
protected: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
56 |
// From MPositionObserver |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
57 |
void PositionUpdateL(TInt aError, const TPosition& aPosition); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
58 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
59 |
public: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
60 |
TInt GetFocusedPOI(); |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
61 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
62 |
private: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
63 |
CPosition* iPosition; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
64 |
CAccelerometer* iAccelerometer; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
65 |
CMagnetometer* iMagnetometer; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
66 |
CAutoRotation* iAutoRotation; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
67 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
68 |
CManager* iManager; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
69 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
70 |
private: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
71 |
RWindow& iWindow; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
72 |
TRect iRect; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
73 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
74 |
EGLDisplay iEglDisplay; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
75 |
EGLSurface iEglSurface; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
76 |
EGLConfig iConfig; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
77 |
EGLContext iEglContext; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
78 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
79 |
CWsBitmap* iPixmap; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
80 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
81 |
private: |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
82 |
Matrix4d iProjection; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
83 |
Matrix4d iModelView; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
84 |
}; |
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
85 |
|
c316ab048e9d
First public commit
David Caabeiro <david.caabeiro@seqpoint.com>
parents:
diff
changeset
|
86 |
#endif // OVERLAY_H_ |