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