Initial changes to RenderableFieldlines

This commit is contained in:
Alexander Bock
2015-01-21 00:42:33 +01:00
parent 4a44905f48
commit f72d151c6c
6 changed files with 118 additions and 97 deletions

View File

@@ -22,14 +22,22 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef RENDERABLEFIELDLINES_H_
#define RENDERABLEFIELDLINES_H_
#ifndef __RENDERABLEFIELDLINES_H__
#define __RENDERABLEFIELDLINES_H__
// open space includes
#include <openspace/rendering/renderable.h>
// ghoul includes
#include <ghoul/opengl/programobject.h>
#include <openspace/properties/optionproperty.h>
#include <openspace/properties/stringproperty.h>
#include <ghoul/misc/dictionary.h>
#include <ghoul/opengl/ghoul_gl.h>
namespace ghoul {
namespace opengl {
class ProgramObject;
}
}
namespace openspace {
struct LinePoint;
@@ -37,23 +45,30 @@ namespace openspace {
class RenderableFieldlines : public Renderable {
public:
RenderableFieldlines(const ghoul::Dictionary& dictionary);
~RenderableFieldlines();
bool initialize();
bool deinitialize();
bool initialize() override;
bool deinitialize() override;
bool isReady() const override;
void render(const RenderData& data) override;
void update(const UpdateData& data) override;
private:
std::vector<std::vector<LinePoint> > getFieldlinesData(std::string filename, ghoul::Dictionary hintsDictionary);
//std::vector<std::vector<LinePoint> > getFieldlinesData(std::string filename, ghoul::Dictionary hintsDictionary);
std::vector<std::vector<LinePoint>> getFieldlinesData();
properties::OptionProperty _seedPointSource;
properties::StringProperty _seedPointSourceFile;
ghoul::opengl::ProgramObject* _program;
bool _programIsDirty;
ghoul::Dictionary _vectorFieldInformation;
ghoul::Dictionary _seedPointInformation;
std::vector<ghoul::Dictionary> _hintsDictionaries;
std::vector<std::string> _filenames;
std::vector<glm::vec3> _seedPoints;
ghoul::opengl::ProgramObject* _shader;
GLuint _fieldlineVAO;
GLuint _vertexPositionBuffer;
@@ -62,4 +77,5 @@ private:
};
} // namespace openspace
#endif // RENDERABLEFIELDLINES_H_
#endif // __RENDERABLEFIELDLINES_H__