Created dataSphere

This commit is contained in:
Sebastian Piwell
2016-05-03 14:32:04 -04:00
parent ddb3345af8
commit 5e5e9244f5
8 changed files with 214 additions and 9 deletions

View File

@@ -30,6 +30,8 @@ set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/dataplane.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/textureplane.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/kameleonplane.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/cygnetsphere.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/datasphere.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacecygnet.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/colorbar.h
${CMAKE_CURRENT_SOURCE_DIR}/util/iswamanager.h
@@ -43,6 +45,8 @@ set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/dataplane.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/textureplane.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/kameleonplane.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/cygnetsphere.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/datasphere.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacecygnet.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/colorbar.cpp
${CMAKE_CURRENT_SOURCE_DIR}/util/iswamanager.cpp

View File

@@ -33,6 +33,7 @@
#include <modules/iswa/rendering/textureplane.h>
#include <modules/iswa/rendering/dataplane.h>
#include <modules/iswa/rendering/kameleonplane.h>
#include <modules/iswa/rendering/datasphere.h>
#include <modules/iswa/rendering/screenspacecygnet.h>
namespace openspace {
@@ -49,6 +50,7 @@ namespace openspace {
fRenderable->registerClass<TexturePlane>("TexturePlane");
fRenderable->registerClass<DataPlane>("DataPlane");
fRenderable->registerClass<KameleonPlane>("KameleonPlane");
fRenderable->registerClass<DataSphere>("DataSphere");
auto fScreenSpaceRenderable = FactoryManager::ref().factory<ScreenSpaceRenderable>();
ghoul_assert(fScreenSpaceRenderable, "No fScreenSpaceRenderable factory existed");

View File

@@ -0,0 +1,46 @@
// * 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/iswa/rendering/cygnetsphere.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/rendering/renderengine.h>
#include <openspace/util/spicemanager.h>
#include <openspace/util/time.h>
namespace openspace{
CygnetSphere::CygnetSphere(const ghoul::Dictionary& dictionary)
:ISWACygnet(dictionary)
,_futureObject(nullptr)
{}
CygnetSphere::~CygnetSphere(){}
bool CygnetSphere::isReady() const{
return true;
}
void CygnetSphere::render(const RenderData& data){
}
void CygnetSphere::update(const UpdateData& data){
}
} //namespace openspace

View File

@@ -0,0 +1,49 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2015 *
* *
* 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 __CYGNETSPHERE_H__
#define __CYGNETSPHERE_H__
#include <modules/iswa/rendering/iswacygnet.h>
namespace openspace{
class CygnetSphere : public ISWACygnet {
public:
CygnetSphere(const ghoul::Dictionary& dictionary);
~CygnetSphere();
virtual bool isReady() const override;
virtual void render(const RenderData& data) override;
virtual void update(const UpdateData& data) override;
protected:
virtual bool loadTexture() = 0;
virtual bool updateTexture() = 0;
std::shared_ptr<DownloadManager::FileFuture> _futureObject;
};
} //namespace openspace
#endif // __CYGNETSPHERE_H__

View File

@@ -46,12 +46,12 @@ friend class ISWAGroup;
// virtual void update(const UpdateData& data) override; //moved to cygnetPlane
protected:
void transferFunctionsFile(std::string tfPath){ _transferFunctionsFile.setValue(tfPath); };
void normValues(glm::vec2 normValues){ _normValues.setValue(normValues); };
void backgroundValues(glm::vec2 backgroundValues){ _backgroundValues.setValue(backgroundValues); };
void useLog(bool useLog){ _useLog.setValue(useLog); };
void normValues(glm::vec2 normValues){ _normValues.setValue(normValues); };
void useHistogram(bool useHistogram){ _useHistogram.setValue(useHistogram); };
void dataOptions(std::vector<int> options){ _dataOptions.setValue(options); };
void transferFunctionsFile(std::string tfPath){ _transferFunctionsFile.setValue(tfPath); };
void backgroundValues(glm::vec2 backgroundValues){ _backgroundValues.setValue(backgroundValues); };
// const std::vector<openspace::properties::SelectionProperty::Option>& dataOptions() const {return _dataOptions.options(); };

View File

@@ -0,0 +1,52 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2015 *
* *
* 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/iswa/rendering/datasphere.h>
namespace openspace {
DataSphere::DataSphere(const ghoul::Dictionary& dictionary)
:CygnetSphere(dictionary)
{}
DataSphere::~DataSphere(){}
bool DataSphere::initialize(){
return true;
}
bool DataSphere::deinitialize(){
return true;
}
bool DataSphere::loadTexture(){
return true;
}
bool DataSphere::updateTexture(){
return true;
}
} //namespace openspace

View File

@@ -0,0 +1,50 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2015 *
* *
* 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 __DATASPHERE_H__
#define __DATASPHERE_H__
#include <modules/iswa/rendering/cygnetsphere.h>
namespace openspace{
class DataSphere : public CygnetSphere {
public:
DataSphere(const ghoul::Dictionary& dictionary);
~DataSphere();
virtual bool initialize() override;
virtual bool deinitialize() override;
protected:
private:
virtual bool loadTexture() override;
virtual bool updateTexture() override;
};
} //namespace openspace
#endif //__DATASPHERE_H__

View File

@@ -23,20 +23,22 @@
****************************************************************************************/
#include <modules/iswa/util/iswamanager.h>
#include <ghoul/filesystem/filesystem>
#include <modules/kameleon/include/kameleonwrapper.h>
#include <modules/iswa/rendering/dataplane.h>
#include <modules/iswa/rendering/textureplane.h>
#include <openspace/util/time.h>
#include <modules/iswa/rendering/datasphere.h>
#include <modules/iswa/rendering/screenspacecygnet.h>
#include <modules/iswa/ext/json/json.hpp>
#include <modules/iswa/rendering/iswacygnet.h>
#include <modules/iswa/rendering/iswagroup.h>
#include <fstream>
#include <ghoul/filesystem/filesystem>
#include <modules/kameleon/include/kameleonwrapper.h>
#include <openspace/util/time.h>
#include <modules/iswa/ext/json/json.hpp>
#include <openspace/scripting/scriptengine.h>
#include <openspace/scripting/script_helper.h>
#include <ghoul/lua/ghoul_lua.h>
#include <ghoul/lua/lua_helper.h>
#include <modules/iswa/rendering/iswacygnet.h>
#include <modules/iswa/rendering/iswagroup.h>
#include "iswamanager_lua.inl";