use "ARCH=arch_name make" restructured project folder, implementations and headers together under sources/
35 lines
636 B
C++
Executable File
35 lines
636 B
C++
Executable File
#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();
|
|
|
|
}; |