Clean up volume rendering code

This commit is contained in:
Emil Axelsson
2017-01-24 16:25:19 +01:00
parent 17cc48621a
commit 6cd91ef44c
6 changed files with 6 additions and 68 deletions
@@ -72,6 +72,4 @@ private:
}
#include <modules/kameleonvolume/kameleonvolumereader.inl>
#endif
@@ -1,52 +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. *
****************************************************************************************/
namespace openspace {
//KameleonMetaData KameleonVolumeReader::getMetaData() {
/*
using GridUnits = std::tuple<std::string, std::string, std::string>;
GridUnits units = _kameleonWrapper.getGridUnits();
std::string unit0 = std::get<0>(units);
std::string unit1 = std::get<1>(units);
std::string unit2 = std::get<2>(units);
glm::vec3 scaling;
if (unit0 == 'R' && unit1 == 'R' && unit2 == 'R') {
scaling.x = scaling.y = scaling.z = openspace::distanceconstants::EarthRadius;
}
if (unit0 == '')
VolumeMetaData metaData(VolumeMetaData::GridType::Cartesian, scaling );
*/
//}
}
@@ -161,7 +161,7 @@ std::string KameleonVolumeRaycaster::getRaycastPath() const {
}
std::string KameleonVolumeRaycaster::getHelperPath() const {
return GlslHelperPath; // no helper file
return GlslHelperPath;
}
void KameleonVolumeRaycaster::setStepSize(float stepSize) {
@@ -22,8 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __KAMELEONVOLUMERAYCASTER_H__
#define __KAMELEONVOLUMERAYCASTER_H__
#ifndef __OPENSPACE_MODULE_KAMELEONVOLUME___KAMELEONVOLUMERAYCASTER_H__
#define __OPENSPACE_MODULE_KAMELEONVOLUME___KAMELEONVOLUMERAYCASTER_H__
#include <string>
@@ -158,8 +158,6 @@ RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dict
_autoGridType = true;
}
}
// TODO: read transformation: position/rotation/scale from dictionary.
}
RenderableKameleonVolume::~RenderableKameleonVolume() {}
@@ -189,10 +187,8 @@ bool RenderableKameleonVolume::initialize() {
updateRaycasterModelTransform();
});
_raycaster->initialize();
OsEng.renderEngine().raycasterManager().attachRaycaster(*_raycaster.get());
std::function<void(bool)> onChange = [&](bool enabled) {
@@ -221,9 +217,6 @@ bool RenderableKameleonVolume::initialize() {
addProperty(_gridType);
addProperty(_cache);
addPropertySubOwner(_clipPlanes.get());
return true;
}
@@ -369,7 +362,6 @@ bool RenderableKameleonVolume::isReady() const {
}
void RenderableKameleonVolume::update(const UpdateData& data) {
// forward this transformation!
if (_raycaster) {
_raycaster->setStepSize(_stepSize);
}
@@ -22,8 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __RENDERABLEKAMELEONVOLUME_H__
#define __RENDERABLEKAMELEONVOLUME_H__
#ifndef __OPENSPACE_MODULE_KAMELEONVOLUME___RENDERABLEKAMELEONVOLUME_H__
#define __OPENSPACE_MODULE_KAMELEONVOLUME___RENDERABLEKAMELEONVOLUME_H__
#include <openspace/properties/vectorproperty.h>
#include <openspace/properties/optionproperty.h>
@@ -99,4 +99,4 @@ private:
};
}
#endif // __RENDERABLETOYVOLUME_H__
#endif // __RENDERABLEKAMELEONVOLUME_H__