Merge branch 'feature/fieldlines' into feature/ABuffer

Conflicts:
	src/rendering/renderablevolumegl.cpp
This commit is contained in:
Jonas Strandstedt
2014-07-18 13:51:07 -04:00
8 changed files with 123 additions and 106 deletions

View File

@@ -33,6 +33,7 @@
#include <ghoul/filesystem/file.h>
namespace openspace {
struct LinePoint;
class RenderableFieldlines : public Renderable {
public:
@@ -46,7 +47,7 @@ public:
virtual void update();
private:
std::vector<std::vector<glm::vec3> > getFieldlinesData(std::string filename, ghoul::Dictionary hintsDictionary);
std::vector<std::vector<LinePoint> > getFieldlinesData(std::string filename, ghoul::Dictionary hintsDictionary);
std::vector<ghoul::Dictionary> _hintsDictionaries;
std::vector<std::string> _filenames;

View File

@@ -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);

View File

@@ -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 {
@@ -71,8 +67,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;

View File

@@ -34,6 +34,16 @@ namespace ccmc {
namespace openspace {
struct LinePoint {
glm::vec3 position;
glm::vec4 color;
LinePoint(glm::vec3 pos, glm::vec4 col) {
position = pos;
color = col;
}
};
class KameleonWrapper {
public:
@@ -59,16 +69,16 @@ public:
float* getUniformSampledVectorValues(const std::string& xVar, const std::string& yVar,
const std::string& zVar, glm::size3_t outDimensions);
std::vector<std::vector<glm::vec3> > getClassifiedFieldLines(const std::string& xVar,
std::vector<std::vector<LinePoint> > getClassifiedFieldLines(const std::string& xVar,
const std::string& yVar, const std::string& zVar,
std::vector<glm::vec3> seedPoints, float stepSize);
std::vector<std::vector<glm::vec3> > getFieldLines(const std::string& xVar,
std::vector<std::vector<LinePoint> > getFieldLines(const std::string& xVar,
const std::string& yVar, const std::string& zVar,
std::vector<glm::vec3> seedPoints, float stepSize, glm::vec3 color);
std::vector<glm::vec3> seedPoints, float stepSize, glm::vec4 color);
std::vector<std::vector<glm::vec3> > getLorentzTrajectories(std::vector<glm::vec3> seedPoints,
glm::vec3 color, float stepsize);
std::vector<std::vector<LinePoint> > getLorentzTrajectories(std::vector<glm::vec3> seedPoints,
glm::vec4 color, float stepsize);
private:
std::vector<glm::vec3> traceCartesianFieldline(const std::string& xVar,
@@ -80,7 +90,7 @@ private:
void getGridVariables(std::string& x, std::string& y, std::string& z);
void progressBar(int current, int end);
glm::vec3 classifyFieldline(FieldlineEnd fEnd, FieldlineEnd bEnd);
glm::vec4 classifyFieldline(FieldlineEnd fEnd, FieldlineEnd bEnd);
ccmc::Model* _model;
Model _type;