Solve merge conflicts.

This commit is contained in:
Kalle Bladin
2016-04-27 16:19:35 -04:00
5 changed files with 145 additions and 34 deletions

View File

@@ -0,0 +1,8 @@
<GDAL_WMS>
<Service name="TiledWMS">
<ServerUrl>http://map1.vis.earthdata.nasa.gov/twms-geo/twms.cgi?</ServerUrl>
<TiledGroupName>MODIS TERRA tileset</TiledGroupName>
<Change key="${time}">2016-04-12</Change>
</Service>
<MaxConnections>20</MaxConnections>
</GDAL_WMS>

View File

@@ -38,13 +38,13 @@
#include <ghoul/misc/assert.h>
namespace {
const std::string _loggerCat = "RenderableGlobe";
const std::string _loggerCat = "RenderableGlobe";
const std::string keyFrame = "Frame";
const std::string keyGeometry = "Geometry";
const std::string keyShading = "PerformShading";
const std::string keyFrame = "Frame";
const std::string keyGeometry = "Geometry";
const std::string keyShading = "PerformShading";
const std::string keyBody = "Body";
const std::string keyBody = "Body";
}
namespace openspace {
@@ -70,18 +70,16 @@ namespace openspace {
//addSwitchValue(std::shared_ptr<ClipMapGlobe>(new ClipMapGlobe(dictionary, _ellipsoid)), 1e9);
addSwitchValue(std::shared_ptr<ChunkLodGlobe>(new ChunkLodGlobe(dictionary, _ellipsoid)), 1e9);
addSwitchValue(std::shared_ptr<GlobeMesh>(new GlobeMesh(dictionary)), 1e10);
}
RenderableGlobe::~RenderableGlobe() {
}
}
RenderableGlobe::~RenderableGlobe() {
}
void RenderableGlobe::update(const UpdateData& data) {
// set spice-orientation in accordance to timestamp
_stateMatrix = SpiceManager::ref().positionTransformMatrix(_frame, "GALACTIC", data.time);
_time = data.time;
DistanceSwitch::update(data);
}
void RenderableGlobe::update(const UpdateData& data) {
// set spice-orientation in accordance to timestamp
_stateMatrix = SpiceManager::ref().positionTransformMatrix(_frame, "GALACTIC", data.time);
_time = data.time;
DistanceSwitch::update(data);
}
} // namespace openspace

View File

@@ -0,0 +1,110 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __LATLONPATCH_H__
#define __LATLONPATCH_H__
#include <memory>
#include <glm/glm.hpp>
// open space includes
#include <openspace/rendering/renderable.h>
#include <modules/globebrowsing/datastructures/latlon.h>
#include <modules/globebrowsing/rendering/grid.h>
#include <modules/globebrowsing/rendering/clipmapgrid.h>
#include <modules/globebrowsing/rendering/frustrumculler.h>
#include <modules/globebrowsing/rendering/texturetileset.h>
namespace ghoul {
namespace opengl {
class ProgramObject;
}
}
namespace openspace {
class LonLatPatch;
class Geometry;
using std::shared_ptr;
using std::unique_ptr;
using ghoul::opengl::ProgramObject;
class PatchRenderer {
public:
PatchRenderer();
~PatchRenderer();
protected:
unique_ptr<ProgramObject> _programObject;
TextureTileSet _tileSet;
};
//////////////////////////////////////////////////////////////////////////////////////
// PATCH RENDERER SUBCLASSES //
//////////////////////////////////////////////////////////////////////////////////////
class LatLonPatchRenderer : public PatchRenderer {
public:
LatLonPatchRenderer(shared_ptr<Grid> grid);
void renderPatch(
const LatLonPatch& patch,
const RenderData& data,
double radius);
void renderPatch(
const LatLonPatch& patch,
const RenderData& data,
double radius,
const TileIndex& ti);
private:
TwmsTileProvider tileProvider;
shared_ptr<Grid> _grid;
};
class ClipMapPatchRenderer : public PatchRenderer {
public:
ClipMapPatchRenderer(shared_ptr<ClipMapGrid> grid);
void renderPatch(
const LatLon& patchSize,
const RenderData& data,
double radius);
private:
shared_ptr<ClipMapGrid> _grid;
};
} // namespace openspace
#endif // __LATLONPATCH_H__

View File

@@ -38,6 +38,7 @@
//#include <test_twmstileprovider.inl>
#include <test_ellipsoid.inl>
//#include <test_luaconversions.inl>
//#include <test_powerscalecoordinates.inl>
//#include <test_angle.inl>

View File

@@ -25,38 +25,32 @@
#include "gtest/gtest.h"
#include "gdal.h"
#include "gdal_priv.h"
#include <ogr_spatialref.h>
#include "cpl_conv.h"
#include "cpl_string.h"
//#include "wms/wmsdriver.h"
// Error: cannot open source file "wms/wmsdriver.h"
//#include "wms/wmsdriver.h"
// Error: cannot open source file "wms/wmsmetadataset.h"
//#include "wms/wmsmetadataset.h"
class GdalWmsTest : public testing::Test {};
TEST_F(GdalWmsTest, Simple) {
//GDALRegister_WMS();
GDALDataset *poDataset;
GDALAllRegister();
std::string testFile = absPath("../data/scene/debugglobe/map_service_configs/TERRA_CR_B143_2016-04-12.wms");
poDataset = (GDALDataset *)GDALOpen(testFile.c_str(), GA_ReadOnly);
/*
GDALWMSDataset* wms_dataset = GDALOpen("../test.xml", GA_ReadOnly);
if (wms_dataset)
{
;
}
*/
// This assertion fails
ASSERT_NE(poDataset, nullptr) << "Failed to load testFile";
/*
GDALDataset *poDataset;
GDALAllRegister();
poDataset = (GDALDataset *)GDALOpen("filename", GA_ReadOnly);
if (poDataset == NULL)
{
std::cout << "NULL" << std::endl;
}*/
}