You can now specify seedpoints in the mod-file for fieldlines

This commit is contained in:
Hans-Christian Helltegen
2014-06-05 13:26:10 -04:00
parent 3373ffd10d
commit 4a08f10d66
7 changed files with 107 additions and 65 deletions
+2 -1
View File
@@ -52,9 +52,10 @@ public:
virtual void update();
protected:
// Renderable();
std::string findPath(const std::string& path);
private:
PowerScaledScalar boundingSphere_;
std::string _relativePath;
};
} // namespace openspace
@@ -26,7 +26,7 @@
#define RENDERABLEFIELDLINES_H_
// open space includes
#include <openspace/rendering/renderablevolume.h>
#include <openspace/rendering/renderable.h>
// ghoul includes
#include <ghoul/opengl/programobject.h>
@@ -40,7 +40,7 @@
namespace openspace {
class RenderableFieldlines : public RenderableVolume {
class RenderableFieldlines : public Renderable {
public:
RenderableFieldlines(const ghoul::Dictionary& dictionary);
~RenderableFieldlines();
@@ -54,6 +54,7 @@ public:
private:
ghoul::Dictionary _hintsDictionary;
std::string _filename;
std::vector<glm::vec3> _seedPoints;
ghoul::opengl::ProgramObject* _fieldlinesProgram;
GLuint _VAO;
@@ -62,12 +63,14 @@ private:
ghoul::filesystem::File* _vertexSourceFile;
ghoul::filesystem::File* _fragmentSourceFile;
bool _programUpdateOnSave;
void safeShaderCompilation();
std::vector<GLint> _lineStart;
std::vector<GLsizei> _lineCount;
bool _programUpdateOnSave;
void safeShaderCompilation();
};
} // namespace openspace
@@ -29,7 +29,6 @@
#include <openspace/rendering/renderable.h>
// ghoul includes
#include <ghoul/opengl/programobject.h>
#include <ghoul/opengl/texture.h>
#include <ghoul/io/rawvolumereader.h>
@@ -37,23 +36,18 @@ namespace openspace {
class RenderableVolume: public Renderable {
public:
// constructors & destructor
RenderableVolume(const ghoul::Dictionary& dictionary);
~RenderableVolume();
protected:
std::string findPath(const std::string& path);
ghoul::opengl::Texture* loadVolume(const std::string& filepath, const ghoul::Dictionary& hintsDictionary);
ghoul::RawVolumeReader::ReadHints readHints(const ghoul::Dictionary& dictionary);
ghoul::opengl::Texture* loadTransferFunction(const std::string& filepath);
private:
// relative path
std::string _relativePath;
};
} // namespace openspace
#endif
#endif