コード例 #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
PinOverModelExample::PinOverModelExample(
    Eegeo::Modules::Core::RenderingModule& renderingModule,
    Eegeo::Modules::IPlatformAbstractionModule& platformAbstractionModule,
    Eegeo::Modules::Map::MapModule& mapModule,
    Eegeo::Rendering::AsyncTexturing::IAsyncTextureRequestor& textureRequestor,
    Eegeo::Lighting::GlobalFogging& fogging,
    Eegeo::Rendering::Materials::NullMaterialFactory& nullMaterialFactory,
    Eegeo::Camera::GlobeCamera::GlobeCameraController* pCameraController,
    Eegeo::Camera::GlobeCamera::GlobeCameraTouchController& cameraTouchController,
    const Eegeo::Rendering::ScreenProperties& initialScreenProperties
)
	: GlobeCameraExampleBase(pCameraController, cameraTouchController)
    , m_pin0UserData("Pin Zero(0) User Data")
	,m_pPin0(NULL)
	,m_fileIO(platformAbstractionModule.GetFileIO())
	,m_textureRequestor(textureRequestor)
	,m_pModel(NULL)
	,m_globalFogging(fogging)
	,m_renderableFilters(renderingModule.GetRenderableFilters())
	,m_nullMaterialFactory(nullMaterialFactory)
    ,m_pNullMaterial(NULL)
{
    Eegeo::Helpers::ITextureFileLoader& textureLoader = platformAbstractionModule.GetTextureFileLoader();

	textureLoader.LoadTexture(m_pinIconsTexture, "pin_over_model_example/PinIconTexturePage.png", true);
	Eegeo_ASSERT(m_pinIconsTexture.textureId != 0);

	// This example uses a texture page containing 2 x 2 icons.
	// Increase the following number to use a texture page containing more icons
	// (e.g. 3 for a page containing 3 x 3 icons)
	int numberOfTilesAlongEachAxisOfTexturePage = 2;
	m_pPinIconsTexturePageLayout = Eegeo_NEW(Eegeo::Rendering::RegularTexturePageLayout)(numberOfTilesAlongEachAxisOfTexturePage);

	// The following values specify the size and shape of the Pins within the 3D world.
	int spriteWidthInMetres = 64;
	int spriteHeightInMetres = 64;

	// N.B. The implementation for PinModule is given in PinModule.h as a guide for Apps that
	// require an alternate configuration of the various Pin related components.
    m_pPinsModule = Eegeo::Pins::PinsModule::Create(
                                    renderingModule,
                                    platformAbstractionModule,
                                    mapModule,
                                    m_pinIconsTexture.textureId,
                                    *m_pPinIconsTexturePageLayout,
                                    Eegeo::Rendering::LayerIds::PlaceNames,
                                    spriteWidthInMetres,
                                    spriteHeightInMetres,
                                    initialScreenProperties,
                                    false);

	CreateExamplePins();
}