You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libsegl/catmullromspline.h

34 lines
622 B

#ifndef __CATMULLROMSPLINE_H
#define __CATMULLROMSPLINE_H
#include <iostream>
#include <SDL.h>
#include <SDL_opengl.h>
#include "matrix.h"
#include "punkt2d.h"
#include "punkt3d.h"
namespace segl {
class CatmullRomSpline {
private:
Matrix *cr;
float s;
void makeMatrix();
public:
CatmullRomSpline(float _s=0.5f);
Matrix getPosition(float u, Matrix &controlpoints);
Punkt3D getPosition(float u, Punkt3D a, Punkt3D b, Punkt3D c, Punkt3D d);
Punkt2D getPosition(float u, Punkt2D a, Punkt2D b, Punkt2D c, Punkt2D d);
void setS(float _s);
~CatmullRomSpline();
};
} // namespace segl
#endif