Gl Graph
Gl Graph Source of lines3d.h
#ifndef LINES3D_H #define LINES3D_H #include <vector> #include <iostream> #include <fstream> #include <string> #include <algorithm> #define GL_GLEXT_PROTOTYPES #include <GL/gl.h> #include <drawabledatareader.h> #include <globjectdata.h> class Lines3D : public DrawableDataReader { public: Lines3D(); Lines3D(std::string * filename, std::string * format, int maxline,std::unordered_map<std::string, std::string> * args) ; void updateMinMax(Vec3f &pts); void addData(float y); void addData(float x, float y, float z); void draw(); void init(); void print(); int getElementNb() const ; void updateColor(); float getMinX() { return vmin.getX(); }; float getMaxX() { return vmax.getX(); }; float getMinY() { return vmin.getY(); }; float getMaxY() { return vmax.getY(); }; void onFileOpen(); bool onLineRead(std::string line); void onFileClose(); private: Vec3f vmin; Vec3f vmax; GlLineStripData gllinedata; std::vector<Vec3f> ptsdata; }; #endif