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/CurveIterator.hpp
Executable file
35
GL_STUFF/HEADERS/CURVES/CurveIterator.hpp
Executable file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "./Curve.hpp"
|
||||
|
||||
enum class CurveIterationMode
|
||||
{
|
||||
BASIC,
|
||||
LENGTH
|
||||
};
|
||||
|
||||
class CurveIterator {
|
||||
private:
|
||||
Curve *curve;
|
||||
unsigned int steps;
|
||||
CurveIterationMode iterationMode;
|
||||
float estimatedLength;
|
||||
int basicStepCounter;
|
||||
float lengthStepCounter;
|
||||
float leftBound;
|
||||
float rightBound;
|
||||
float lastIncrement;
|
||||
|
||||
void resetIterator();
|
||||
void computeLength();
|
||||
|
||||
public:
|
||||
CurveIterator(Curve *curve, unsigned int steps, CurveIterationMode basicOrLength);
|
||||
void nextStep();
|
||||
float getStep();
|
||||
void setProgress(float at);
|
||||
glm::vec3 evaluation();
|
||||
glm::vec3 derivation();
|
||||
|
||||
Curve* getCurve();
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user