ported the University CGI demo from WINDOWS + GLUT + GLEW + GLU + OpenGL 4 to LINUX WAYLAND + EGL + GLES 2 with minimal cuts
This commit is contained in:
35
GL_STUFF/HEADERS/CURVES/CurvesLoader.hpp
Executable file
35
GL_STUFF/HEADERS/CURVES/CurvesLoader.hpp
Executable file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <regex>
|
||||
#include <iostream>
|
||||
#include "./Curve.hpp"
|
||||
#include "Bezier.hpp"
|
||||
#include "NURBS.hpp"
|
||||
|
||||
class CurvesLoader {
|
||||
static string currentCurveType;
|
||||
static vector<glm::vec3>* pointsBuffer;
|
||||
|
||||
static vector<NURBS*> NURBSes;
|
||||
static vector<Bezier3Segments*> beziers;
|
||||
|
||||
static unsigned int NURBSOrder;
|
||||
static NURBSType NURBS_TYPE;
|
||||
static vector<float>* NURBSWeights;
|
||||
|
||||
static char lineHeader[128];
|
||||
static char* res;
|
||||
static FILE* file;
|
||||
|
||||
static std::smatch pieces;
|
||||
static void beginCurve(string str, std::smatch pieces, std::regex regex);
|
||||
static NURBS* BasicNURBS();
|
||||
static NURBS* ClampedNURBS();
|
||||
static NURBS* CyclicNURBS();
|
||||
static void closeNURBS();
|
||||
static void closeBezier();
|
||||
static void closePendingCurve();
|
||||
static void parseVertexData(string str);
|
||||
public:
|
||||
static bool loadCurves(std::string path, vector<Curve*>& curves);
|
||||
};
|
||||
Reference in New Issue
Block a user