コード例 #1
0
            GpsMarkerModule::GpsMarkerModule(Eegeo::Location::ILocationService& locationService,
                                             Eegeo::Modules::Map::Layers::TerrainModelModule& terrainModelModule,
                                             Eegeo::Modules::Map::MapModule& mapModule,
                                             Eegeo::Modules::Core::RenderingModule& renderingModule,
                                             Eegeo::Resources::Interiors::InteriorInteractionModel& interiorInteractionModel,
                                             VisualMap::SdkModel::IVisualMapService& visualMapService,
                                             const bool createBlueSphereViews,
                                             ExampleAppMessaging::TMessageBus& messageBus)
            : m_renderableFilters(renderingModule.GetRenderableFilters())
            {
                m_pModel = Eegeo_NEW(GpsMarkerModel)(locationService, interiorInteractionModel, mapModule.GetBlueSphereModule().GetBlueSphereModel());

                m_pRingRenderableFactory = AccuracyRingRenderableFactory::Create(renderingModule);
                m_pRingRenderable = m_pRingRenderableFactory->BuildRenderable();
                m_pRingRenderable->SetColors(Eegeo::v4(18.0f/255.0f, 86.0f/255.0f, 172.0f/255.0f, 0.75f),
                                             Eegeo::v4(18.0f/255.0f, 86.0f/255.0f, 172.0f/255.0f, 0.8f));
                m_pRingView = Eegeo_NEW(AccuracyRingView)(*m_pRingRenderable);

                m_renderableFilters.AddRenderableFilter(*m_pRingView);

                m_pController = Eegeo_NEW(GpsMarkerController)(*m_pModel,
                                                               interiorInteractionModel,
                                                               locationService,
                                                               mapModule.GetEnvironmentFlatteningService(),
                                                               visualMapService,
                                                               mapModule.GetBlueSphereModule().GetBlueSphereView(),
                                                               mapModule.GetBlueSphereModule().GetBlueSphereAnchorView(),
                                                               createBlueSphereViews,
                                                               *m_pRingView,
                                                               messageBus);
            }
コード例 #2
0
    void MobileExampleApp::InitialisePinsModules(Eegeo::Modules::Map::MapModule& mapModule, Eegeo::EegeoWorld& world)
    {
        m_platformAbstractions.GetTextureFileLoader().LoadTexture(m_pinIconsTexture,
                                                                  Helpers::ImageHelpers::GetImageNameForDevice("SearchResultOnMap/PinIconTexturePage", ".png"),
                                                                  false);
        Eegeo_ASSERT(m_pinIconsTexture.textureId != 0);

        int numberOfTilesAlongEachAxisOfTexturePage = 4;
        m_pPinIconsTexturePageLayout = Eegeo_NEW(Eegeo::Rendering::RegularTexturePageLayout)(numberOfTilesAlongEachAxisOfTexturePage);

        float spriteWidth = m_pinDiameter;
        float spriteHeight = m_pinDiameter;

        Eegeo::Modules::Core::RenderingModule& renderingModule = world.GetRenderingModule();
        Eegeo::Modules::Map::Layers::TerrainModelModule& terrainModelModule = world.GetTerrainModelModule();

        m_pPinsModule = Eegeo_NEW(Eegeo::Pins::PinsModule)(
                            m_pinIconsTexture.textureId,
                            *m_pPinIconsTexturePageLayout,
                            renderingModule.GetGlBufferPool(),
                            renderingModule.GetShaderIdGenerator(),
                            renderingModule.GetMaterialIdGenerator(),
                            renderingModule.GetVertexBindingPool(),
                            renderingModule.GetVertexLayoutPool(),
                            renderingModule.GetRenderableFilters(),
                            terrainModelModule.GetTerrainHeightProvider(),
                            spriteWidth,
                            spriteHeight,
                            Eegeo::Rendering::LayerIds::InteriorEntities,
                            mapModule.GetEnvironmentFlatteningService(),
                            m_screenProperties,
                            false
                        );

        Eegeo::Modules::Map::Layers::InteriorsPresentationModule& interiorsPresentationModule = mapModule.GetInteriorsPresentationModule();
        
        m_pWorldPinsModule = Eegeo_NEW(ExampleApp::WorldPins::SdkModel::WorldPinsModule)(
                                 m_pPinsModule->GetRepository(),
                                 m_pPinsModule->GetController(),
                                 mapModule.GetEnvironmentFlatteningService(),
                                 m_identityProvider,
                                 m_messageBus,
                                 interiorsPresentationModule.GetInteriorsController());
    }