Remove DynamicEphemeris as it is superseded by StaticEphemeris

This commit is contained in:
Alexander Bock
2016-04-25 14:04:05 +02:00
parent e4ba867e1e
commit c6ffc48c10
4 changed files with 0 additions and 106 deletions

View File

@@ -38,7 +38,6 @@ set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/dynamicephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.h
)
@@ -58,7 +57,6 @@ set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/dynamicephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.cpp
)

View File

@@ -44,7 +44,6 @@
#include <modules/base/rendering/multimodelgeometry.h>
#include <modules/base/ephemeris/staticephemeris.h>
#include <modules/base/ephemeris/dynamicephemeris.h>
#include <modules/base/ephemeris/spiceephemeris.h>
#include <ghoul/filesystem/filesystem>
@@ -75,7 +74,6 @@ void BaseModule::internalInitialize() {
auto fEphemeris = FactoryManager::ref().factory<Ephemeris>();
ghoul_assert(fEphemeris, "Ephemeris factory was not created");
fEphemeris->registerClass<StaticEphemeris>("Static");
fEphemeris->registerClass<StaticEphemeris>("Dynamic");
fEphemeris->registerClass<SpiceEphemeris>("Spice");
auto fPlanetGeometry = FactoryManager::ref().factory<planetgeometry::PlanetGeometry>();

View File

@@ -1,56 +0,0 @@
/*****************************************************************************************
* *
* 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. *
****************************************************************************************/
#include <modules/base/ephemeris/dynamicephemeris.h>
namespace {
const std::string KeyPosition = "Position";
}
namespace openspace {
DynamicEphemeris::DynamicEphemeris(const ghoul::Dictionary& dictionary)
: _position(0.f, 0.f, 0.f, 0.f)
{
const bool hasPosition = dictionary.hasKeyAndValue<glm::vec4>(KeyPosition);
if (hasPosition) {
glm::vec4 tmp;
dictionary.getValue(KeyPosition, tmp);
_position = tmp;
}
}
DynamicEphemeris::~DynamicEphemeris() {}
const psc& DynamicEphemeris::position() const {
return _position;
}
void DynamicEphemeris::setPosition(psc pos) {
_position = pos;
}
void DynamicEphemeris::update(const UpdateData&) {}
} // namespace openspace

View File

@@ -1,46 +0,0 @@
/*****************************************************************************************
* *
* 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 __DYNAMICEPHEMERIS_H__
#define __DYNAMICEPHEMERIS_H__
#include <openspace/scene/ephemeris.h>
namespace openspace {
class DynamicEphemeris: public Ephemeris {
public:
DynamicEphemeris(const ghoul::Dictionary& dictionary
= ghoul::Dictionary());
virtual ~DynamicEphemeris();
virtual const psc& position() const;
virtual void update(const UpdateData& data) override;
void setPosition(psc pos);
private:
psc _position;
};
} // namespace openspace
#endif // __DYNAMICEPHEMERIS_H__