Added functionality for getting the model barycenter in kameleonwrapper and moving the raycasting box by an offset. Also cleaned up renderablevolumegl a bit

This commit is contained in:
Hans-Christian Helltegen
2014-07-07 14:26:22 -04:00
parent 1996acf997
commit aff61620c8
5 changed files with 52 additions and 41 deletions
@@ -42,6 +42,7 @@ public:
protected:
ghoul::opengl::Texture* loadVolume(const std::string& filepath, const ghoul::Dictionary& hintsDictionary);
glm::vec3 getVolumeOffset(const std::string& filepath, const ghoul::Dictionary& hintsDictionary);
ghoul::RawVolumeReader::ReadHints readHints(const ghoul::Dictionary& dictionary);
ghoul::opengl::Texture* loadTransferFunction(const std::string& filepath);
@@ -35,10 +35,6 @@
#include <ghoul/io/rawvolumereader.h>
#include <ghoul/filesystem/file.h>
namespace sgct_utils {
class SGCTBox;
}
namespace openspace {
class RenderableVolumeGL: public RenderableVolume {
@@ -67,8 +63,7 @@ private:
GLuint _boxArray;
ghoul::opengl::ProgramObject *_boxProgram;
sgct_utils::SGCTBox* _box;
glm::vec3 _boxScaling;
glm::vec3 _boxScaling, _boxOffset;
GLint _MVPLocation, _modelTransformLocation, _typeLocation;
bool _updateTransferfunction;