solve merge conflict

This commit is contained in:
Michael Nilsson
2016-05-17 12:53:29 -04:00
74 changed files with 490 additions and 42 deletions

34
.gitignore vendored
View File

@@ -44,12 +44,8 @@ gui/externaltimecontrol/mainwindow.h
data/scene/rosetta/67P/obj/67P_rotated_5_130.obj
data/spice/NewHorizonsKernels/
data/spice/RosettaKernels/
data/scene/newhorizons/pluto/plutoprojection/textures/
data/scene/newhorizons/pluto/plutoprojection/textures/Shenk_180.jpg
data/scene/newhorizons/pluto/plutoprojection/textures/barycenter.png
data/scene/newhorizons/pluto/plutoprojection/textures/defaultProj.png
data/scene/newhorizons/pluto/plutoprojection/textures/pluto_highres_180.jpg
data/scene/newhorizons/pluto/plutoprojection/utcEvents.txt
data/scene/newhorizons/pluto/pluto/textures/
data/scene/newhorizons/pluto/pluto/utcEvents.txt
data/scene/rosetta/rosetta/obj/mainbodyros.obj
data/scene/rosetta/rosetta/obj/solarpanelleft.obj
data/scene/rosetta/rosetta/obj/solarpanelright.obj
@@ -69,7 +65,7 @@ data/scene/uranus/textures/uranus.jpg
data/scene/venus/textures/venus.jpg
data/scene/dawn/vestaprojection/VestaComet/VestaComet_5000.obj
data/spice/DawnKernels/
data/scene/newhorizons/jupiter/jupiterprojection/ProjectionsOfInterest/
data/scene/newhorizons/jupiter/jupiter/ProjectionsOfInterest/
data/scene/rosetta/67P/textures/black.jpg
data/scene/rosetta/67P/textures/defaultProj.png
data/scene/rosetta/67P/textures/gray.jpg
@@ -77,12 +73,12 @@ data/scene/rosetta/67P/textures/gray.png
data/scene/rosetta/67P/textures/texmapflipped.jpg
data/scene/rosetta/67P/textures/white.jpg
data/scene/rosetta/67P/textures/white.png
data/scene/newhorizons/jupiter/callistoprojection/textures/callisto.jpg
data/scene/newhorizons/jupiter/callisto/textures/callisto.jpg
data/scene/dawn/ceres/textures/gray.png
data/scene/newhorizons/pluto/charonprojection/textures/Charon-Text.png
data/scene/newhorizons/pluto/charonprojection/textures/charon_highres.jpg
data/scene/newhorizons/pluto/charonprojection/textures/charon_highres_annotated.jpg
data/scene/newhorizons/pluto/charonprojection/textures/defaultProj.png
data/scene/newhorizons/pluto/charon/textures/Charon-Text.png
data/scene/newhorizons/pluto/charon/textures/charon_highres.jpg
data/scene/newhorizons/pluto/charon/textures/charon_highres_annotated.jpg
data/scene/newhorizons/pluto/charon/textures/defaultProj.png
data/scene/dawn/dawn/obj/mainbodydawn.obj
data/scene/dawn/dawn/obj/solarpanelleft.obj
data/scene/dawn/dawn/obj/solarpanelright.obj
@@ -93,9 +89,9 @@ data/scene/earth/textures/earth_bluemarble.jpg
data/scene/earth/textures/earth_bluemarble_height.jpg
data/scene/earth/textures/earth_night.jpg
data/scene/earth/textures/marker.png
data/scene/newhorizons/jupiter/europaprojection/textures/europa.jpg
data/scene/newhorizons/jupiter/ganymedeprojection/textures/ganymede.jpg
data/scene/newhorizons/jupiter/ioprojection/textures/io.jpg
data/scene/newhorizons/jupiter/europa/textures/europa.jpg
data/scene/newhorizons/jupiter/ganymede/textures/ganymede.jpg
data/scene/newhorizons/jupiter/io/textures/io.jpg
data/scene/jupiter/jupiter/textures/jupiter.jpg
data/scene/mars/textures/mars.jpg
data/scene/mercury/textures/mercury.jpg
@@ -109,9 +105,9 @@ data/scene/newhorizons/newhorizons/textures/labels.png
data/scene/pluto/textures/
data/scene/pluto/textures/Shenk_180.jpg
data/scene/pluto/textures/pluto_highres_180.jpg
data/scene/newhorizons/pluto/plutoprojection/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt
data/scene/newhorizons/pluto/plutoprojection/textures/3.jpg
data/scene/newhorizons/pluto/plutoprojection/textures/Pluto-Text.png
data/scene/newhorizons/pluto/pluto/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt
data/scene/newhorizons/pluto/pluto/textures/3.jpg
data/scene/newhorizons/pluto/pluto/textures/Pluto-Text.png
data/scene/dawn/vestaprojection/VestaComet/VestaComet.mtl
data/scene/dawn/vestaprojection/textures/defaultProj_backup.png
data/scene/dawn/vestaprojection/textures/dummy.jpg
@@ -122,7 +118,7 @@ data/spice/de430_1850-2150.bsp
data/spice/jup260.bsp
data/BATSRUS.cdf
data/ENLIL.cdf
data/scene/newhorizons/pluto/plutoprojection/images
data/scene/newhorizons/pluto/pluto/images
data/spice/nh_kernels/
data/scene/jupiter/jupiter/textures/Jupiter-text.png
data/scene/jupiter/callisto/textures/callisto.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -8,7 +8,13 @@ function preInitialization()
critical objects.
]]--
openspace.time.setTime("2015-07-14T10:00:00.00")
-- openspace.time.setTime("2015-07-08T15:57:45.00")
-- openspace.time.setTime("2015-07-12T07:41:00.00")
-- openspace.time.setTime("2015-07-12T15:43:00.00")
-- openspace.time.setTime("2015-07-12T22:19:20.00")
-- openspace.time.setTime("2015-07-13T20:59:00.00")
-- openspace.time.setTime("2015-07-14T02:41:55.00")
openspace.time.setTime("2015-07-14T10:05:00.00")
openspace.time.setDeltaTime(0)
dofile(openspace.absPath('${SCRIPTS}/bind_keys.lua'))
end

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 284 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

View File

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View File

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

View File

Before

Width:  |  Height:  |  Size: 282 KiB

After

Width:  |  Height:  |  Size: 282 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 304 B

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -50,7 +50,7 @@ return {
MieColor = {1.0, 1.0, 1.0}
},
Projection = {
Sequence = "${OPENSPACE_DATA}/scene/newhorizons/pluto/plutoprojection/images",
Sequence = "${OPENSPACE_DATA}/scene/newhorizons/pluto/plutoprojection/all_images",
EventFile = "${OPENSPACE_DATA}/scene/newhorizons/pluto/plutoprojection/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt",
SequenceType = "hybrid",
Observer = "NEW HORIZONS",

View File

@@ -28,6 +28,8 @@
#include "ghoul/io/model/modelreadermultiformat.h"
#include "ghoul/opengl/vertexbufferobject.h"
#include <openspace/util/powerscaledcoordinate.h>
namespace {
const std::string _loggerCat = "MultiModelGeometry";
}
@@ -65,9 +67,16 @@ namespace openspace {
_vertices.reserve(vertices.size());
for (const auto & v : vertices)
{
psc p = PowerScaledCoordinate::CreatePowerScaledCoordinate(
v.location[0],
v.location[1],
v.location[2]
);
Vertex vv;
memcpy(vv.location, v.location, sizeof(GLfloat) * 3);
vv.location[3] = 1.0;
//memcpy(vv.location, v.location, sizeof(GLfloat) * 3);
memcpy(vv.location, glm::value_ptr(p.vec4()), sizeof(GLfloat) * 4);
//vv.location[3] = 1.0;
memcpy(vv.tex, v.tex, sizeof(GLfloat) * 2);
memcpy(vv.normal, v.normal, sizeof(GLfloat) * 3);
_vertices.push_back(vv);

View File

@@ -257,7 +257,7 @@ void RenderablePlane::createPlane() {
// ============================
const GLfloat size = _size.value()[0];
const GLfloat w = _size.value()[1];
const GLfloat vertex_data[] = { // square of two triangles (sigh)
const GLfloat vertex_data[] = {
// x y z w s t
-size, -size, 0.f, w, 0.f, 0.f,
size, size, 0.f, w, 1.f, 1.f,

View File

@@ -0,0 +1,45 @@
#########################################################################################
# #
# 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(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledebugplane.h
)
source_group("Header Files" FILES ${HEADER_FILES})
set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledebugplane.cpp
)
source_group("Source Files" FILES ${SOURCE_FILES})
set(SHADER_FILES
)
source_group("Shader Files" FILES ${SHADER_FILES})
create_new_module(
"Debugging"
debugging_module
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)

View File

@@ -0,0 +1,48 @@
/*****************************************************************************************
* *
* 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/debugging/debuggingmodule.h>
#include <openspace/rendering/renderable.h>
#include <openspace/util/factorymanager.h>
#include <ghoul/misc/assert.h>
#include <modules/debugging/rendering/renderabledebugplane.h>
namespace openspace {
DebuggingModule::DebuggingModule()
: OpenSpaceModule("Debugging")
{}
void DebuggingModule::internalInitialize() {
auto fRenderable = FactoryManager::ref().factory<Renderable>();
ghoul_assert(fRenderable, "No renderable factory existed");
fRenderable->registerClass<RenderableDebugPlane>("RenderableDebugPlane");
}
} // namespace openspace

View File

@@ -0,0 +1,42 @@
/*****************************************************************************************
* *
* 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 __DEBUGGINGMODULE_H__
#define __DEBUGGINGMODULE_H__
#include <openspace/util/openspacemodule.h>
namespace openspace {
class DebuggingModule : public OpenSpaceModule {
public:
DebuggingModule();
protected:
void internalInitialize() override;
};
} // namespace openspace
#endif // __DEBUGGINGMODULE_H__

View File

@@ -0,0 +1 @@
set(DEFAULT_MODULE ON)

View File

@@ -0,0 +1,206 @@
/*****************************************************************************************
* *
* 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. *
****************************************************************************************/
// @TODO: Clean up this class and make it not copy much code from RenderablePlane ---abock
#include <modules/debugging/rendering/renderabledebugplane.h>
#include <openspace/engine/configurationmanager.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/util/powerscaledcoordinate.h>
#include <openspace/scene/scenegraphnode.h>
#include <openspace/rendering/renderengine.h>
#include <modules/newhorizons/rendering/renderableplanetprojection.h>
#include <ghoul/filesystem/filesystem>
#include <ghoul/io/texture/texturereader.h>
#include <ghoul/opengl/programobject.h>
#include <ghoul/opengl/texture.h>
#include <ghoul/opengl/textureunit.h>
namespace {
const std::string _loggerCat = "RenderablePlaneTexture";
}
namespace openspace {
RenderableDebugPlane::RenderableDebugPlane(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _texture("texture", "Texture", -1, -1, 255)
, _billboard("billboard", "Billboard", false)
, _size("size", "Size", glm::vec2(1,1), glm::vec2(0.f), glm::vec2(1.f, 25.f))
, _origin(Origin::Center)
, _shader(nullptr)
, _quad(0)
, _vertexPositionBuffer(0)
{
glm::vec2 size;
dictionary.getValue("Size", size);
_size = size;
if (dictionary.hasKey("Name")){
dictionary.getValue("Name", _nodeName);
}
std::string origin;
if (dictionary.getValue("Origin", origin)) {
if (origin == "LowerLeft") {
_origin = Origin::LowerLeft;
}
else if (origin == "LowerRight") {
_origin = Origin::LowerRight;
}
else if (origin == "UpperLeft") {
_origin = Origin::UpperLeft;
}
else if (origin == "UpperRight") {
_origin = Origin::UpperRight;
}
else if (origin == "Center") {
_origin = Origin::Center;
}
}
// Attempt to get the billboard value
bool billboard = false;
if (dictionary.getValue("Billboard", billboard)) {
_billboard = billboard;
}
addProperty(_texture);
addProperty(_billboard);
addProperty(_size);
_size.onChange([this](){ _planeIsDirty = true; });
setBoundingSphere(_size.value());
}
RenderableDebugPlane::~RenderableDebugPlane() {
}
bool RenderableDebugPlane::isReady() const {
bool ready = true;
if (!_shader)
ready &= false;
return ready;
}
bool RenderableDebugPlane::initialize() {
glGenVertexArrays(1, &_quad); // generate array
glGenBuffers(1, &_vertexPositionBuffer); // generate buffer
createPlane();
if (_shader == nullptr) {
// Plane Program
RenderEngine& renderEngine = OsEng.renderEngine();
_shader = renderEngine.buildRenderProgram("PlaneProgram",
"${MODULE_BASE}/shaders/plane_vs.glsl",
"${MODULE_BASE}/shaders/plane_fs.glsl"
);
if (!_shader)
return false;
}
return isReady();
}
bool RenderableDebugPlane::deinitialize() {
glDeleteVertexArrays(1, &_quad);
_quad = 0;
glDeleteBuffers(1, &_vertexPositionBuffer);
_vertexPositionBuffer = 0;
RenderEngine& renderEngine = OsEng.renderEngine();
if (_shader) {
renderEngine.removeRenderProgram(_shader);
_shader = nullptr;
}
return true;
}
void RenderableDebugPlane::render(const RenderData& data) {
glm::mat4 transform = glm::mat4(1.0);
if (_billboard)
transform = glm::inverse(data.camera.viewRotationMatrix());
// Activate shader
_shader->activate();
_shader->setUniform("ViewProjection", data.camera.viewProjectionMatrix());
_shader->setUniform("ModelTransform", transform);
setPscUniforms(*_shader.get(), data.camera, data.position);
ghoul::opengl::TextureUnit unit;
unit.activate();
glBindTexture(GL_TEXTURE_2D, _texture);
_shader->setUniform("texture1", unit);
glBindVertexArray(_quad);
glDrawArrays(GL_TRIANGLES, 0, 6);
_shader->deactivate();
}
void RenderableDebugPlane::update(const UpdateData& data) {
if (_shader->isDirty())
_shader->rebuildFromFile();
if (_planeIsDirty)
createPlane();
}
void RenderableDebugPlane::createPlane() {
// ============================
// GEOMETRY (quad)
// ============================
const GLfloat size = _size.value()[0];
const GLfloat w = _size.value()[1];
const GLfloat vertex_data[] = {
// x y z w s t
-size, -size, 0.f, w, 0.f, 0.f,
size, size, 0.f, w, 1.f, 1.f,
-size, size, 0.f, w, 0.f, 1.f,
-size, -size, 0.f, w, 0.f, 0.f,
size, -size, 0.f, w, 1.f, 0.f,
size, size, 0.f, w, 1.f, 1.f,
};
glBindVertexArray(_quad); // bind array
glBindBuffer(GL_ARRAY_BUFFER, _vertexPositionBuffer); // bind buffer
glBufferData(GL_ARRAY_BUFFER, sizeof(vertex_data), vertex_data, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 6, reinterpret_cast<void*>(0));
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 6, reinterpret_cast<void*>(sizeof(GLfloat) * 4));
}
} // namespace openspace

View File

@@ -0,0 +1,85 @@
/*****************************************************************************************
* *
* 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 __RENDERABLEDEBUGPLANE_H__
#define __RENDERABLEDEBUGPLANE_H__
#include <openspace/rendering/renderable.h>
#include <openspace/properties/stringproperty.h>
#include <openspace/properties/vectorproperty.h>
#include <openspace/util/updatestructures.h>
namespace ghoul {
namespace filesystem {
class File;
}
namespace opengl {
class ProgramObject;
class Texture;
}
}
namespace openspace {
struct LinePoint;
class RenderableDebugPlane: public Renderable {
enum class Origin {
LowerLeft, LowerRight, UpperLeft, UpperRight, Center
};
public:
RenderableDebugPlane(const ghoul::Dictionary& dictionary);
~RenderableDebugPlane();
bool initialize() override;
bool deinitialize() override;
bool isReady() const override;
void render(const RenderData& data) override;
void update(const UpdateData& data) override;
private:
void createPlane();
properties::IntProperty _texture;
properties::BoolProperty _billboard;
properties::Vec2Property _size;
Origin _origin;
std::string _nodeName;
bool _planeIsDirty;
std::unique_ptr<ghoul::opengl::ProgramObject> _shader;
GLuint _quad;
GLuint _vertexPositionBuffer;
};
} // namespace openspace
#endif // __RENDERABLEDEBUGPLANE_H__

View File

@@ -37,7 +37,6 @@ set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simpletfbrickselector.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemultiresvolume.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/tsp.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/histogram.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/histogrammanager.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/errorhistogrammanager.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/localerrorhistogrammanager.h
@@ -54,7 +53,6 @@ set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simpletfbrickselector.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemultiresvolume.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/tsp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/histogram.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/histogrammanager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/errorhistogrammanager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/localerrorhistogrammanager.cpp

View File

@@ -28,7 +28,7 @@
#include <cmath>
#include <modules/multiresvolume/rendering/errorhistogrammanager.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <openspace/util/progressbar.h>

View File

@@ -27,7 +27,7 @@
#include <fstream>
#include <modules/multiresvolume/rendering/tsp.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <map>
#include <ghoul/glm.h>

View File

@@ -28,7 +28,7 @@
#include <cassert>
#include <modules/multiresvolume/rendering/histogrammanager.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
namespace {
const std::string _loggerCat = "HistogramManager";

View File

@@ -27,7 +27,7 @@
#include <fstream>
#include <modules/multiresvolume/rendering/tsp.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
namespace openspace {

View File

@@ -28,7 +28,7 @@
#include <cmath>
#include <modules/multiresvolume/rendering/localerrorhistogrammanager.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <openspace/util/progressbar.h>

View File

@@ -27,7 +27,7 @@
#include <fstream>
#include <modules/multiresvolume/rendering/tsp.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <map>
#include <ghoul/glm.h>

View File

@@ -25,7 +25,7 @@
#include <modules/multiresvolume/rendering/tsp.h>
#include <modules/multiresvolume/rendering/localtfbrickselector.h>
#include <modules/multiresvolume/rendering/localerrorhistogrammanager.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <openspace/rendering/transferfunction.h>
#include <algorithm>
#include <cassert>

View File

@@ -25,7 +25,7 @@
#include <modules/multiresvolume/rendering/tsp.h>
#include <modules/multiresvolume/rendering/simpletfbrickselector.h>
#include <modules/multiresvolume/rendering/histogrammanager.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <openspace/rendering/transferfunction.h>
#include <algorithm>
#include <cassert>

View File

@@ -25,7 +25,7 @@
#include <modules/multiresvolume/rendering/tsp.h>
#include <modules/multiresvolume/rendering/tfbrickselector.h>
#include <modules/multiresvolume/rendering/errorhistogrammanager.h>
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <openspace/rendering/transferfunction.h>
#include <algorithm>
#include <cassert>

View File

@@ -192,8 +192,8 @@ bool RenderableModelProjection::initialize() {
if (_programObject == nullptr) {
RenderEngine& renderEngine = OsEng.renderEngine();
_programObject = renderEngine.buildRenderProgram("ModelShader",
"${MODULES}/newhorizons/shaders/modelShader_vs.glsl",
"${MODULES}/newhorizons/shaders/modelShader_fs.glsl");
"${MODULE_NEWHORIZONS}/shaders/modelShader_vs.glsl",
"${MODULE_NEWHORIZONS}/shaders/modelShader_fs.glsl");
if (!_programObject)
return false;
@@ -202,8 +202,8 @@ bool RenderableModelProjection::initialize() {
if (_fboProgramObject == nullptr) {
_fboProgramObject = ghoul::opengl::ProgramObject::Build("ProjectionPass",
"${MODULES}/newhorizons/shaders/projectionPass_vs.glsl",
"${MODULES}/newhorizons/shaders/projectionPass_fs.glsl");
"${MODULE_NEWHORIZONS}/shaders/projectionPass_vs.glsl",
"${MODULE_NEWHORIZONS}/shaders/projectionPass_fs.glsl");
if (!_fboProgramObject)
return false;
}
@@ -336,7 +336,9 @@ void RenderableModelProjection::render(const RenderData& data) {
_viewProjection = data.camera.viewProjectionMatrix();
_programObject->setUniform("ViewProjection", _viewProjection);
_programObject->setUniform("ModelTransform", _transform);
setPscUniforms(*_programObject.get(), data.camera, data.position);
setPscUniforms(*_programObject, data.camera, data.position);
_geometry->setUniforms(*_programObject);
textureBind();
_geometry->render();

View File

@@ -276,6 +276,13 @@ void RenderablePlaneProjection::updatePlane(const Image img, double currentTime)
projection[1][0], projection[1][1], projection[1][2], projection[1][3], 0, 0, // Lower left 4 = 1
projection[0][0], projection[0][1], projection[0][2], projection[0][3], 1, 0, // Lower right 5
projection[3][0], projection[3][1], projection[3][2], projection[3][3], 1, 1, // Upper left 6 = 2
//projection[1][0], projection[1][1], projection[1][2], projection[1][3], 0, 1, // Lower left 1
//projection[3][0], projection[3][1], projection[3][2], projection[3][3], 1, 0, // Upper right 2
//projection[2][0], projection[2][1], projection[2][2], projection[2][3], 0, 0, // Upper left 3
//projection[1][0], projection[1][1], projection[1][2], projection[1][3], 0, 1, // Lower left 4 = 1
//projection[0][0], projection[0][1], projection[0][2], projection[0][3], 1, 1, // Lower right 5
//projection[3][0], projection[3][1], projection[3][2], projection[3][3], 1, 0, // Upper left 6 = 2
};
//projection[1][0], projection[1][1], projection[1][2], projection[1][3], 0, 1, // Lower left 1
// projection[3][0], projection[3][1], projection[3][2], projection[3][3], 1, 0, // Upper right 2

View File

@@ -7,12 +7,13 @@ return {
-- Sets the scene that is to be loaded by OpenSpace. A scene file is a description
-- of all entities that will be visible during an instance of OpenSpace
-- Scene = "${SCENE}/default_nh.scene",
Scene = "${SCENE}/default.scene",
-- Scene = "${SCENE}/default-modified.scene",
-- Scene = "${SCENE}/rosetta.scene",
-- Scene = "${SCENE}/dawn.scene",
-- Scene = "${SCENE}/newhorizons.scene",
Paths = {
SGCT = "${BASE_PATH}/config/sgct",

View File

@@ -87,6 +87,7 @@ set(OPENSPACE_SOURCE
${OPENSPACE_BASE_DIR}/src/util/screenlog.cpp
${OPENSPACE_BASE_DIR}/src/util/spicemanager.cpp
${OPENSPACE_BASE_DIR}/src/util/syncbuffer.cpp
${OPENSPACE_BASE_DIR}/src/util/histogram.cpp
${OPENSPACE_BASE_DIR}/src/util/time.cpp
${OPENSPACE_BASE_DIR}/src/util/time_lua.inl
${OPENSPACE_BASE_DIR}/src/util/transformationmanager.cpp
@@ -168,6 +169,7 @@ set(OPENSPACE_HEADER
${OPENSPACE_BASE_DIR}/include/openspace/util/time.h
${OPENSPACE_BASE_DIR}/include/openspace/util/updatestructures.h
${OPENSPACE_BASE_DIR}/include/openspace/util/transformationmanager.h
${OPENSPACE_BASE_DIR}/include/openspace/util/histogram.h
)
# Place files into source groups

View File

@@ -22,7 +22,7 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <modules/multiresvolume/rendering/histogram.h>
#include <openspace/util/histogram.h>
#include <ghoul/logging/logmanager.h>