aboutsummaryrefslogtreecommitdiff
path: root/include/smpath.hpp
blob: 48bb930eb39902ba4acc99d73f665239ed372251 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// -*- C++ -*-
/*
 * Simple MultimEdia LiTerator(SMELT)
 * by Chris Xiong 2015
 * Path/Curve header & implementation
 *
 * WARNING: This library is in development and interfaces would be very
 * unstable.
 *
 */
#ifndef SMPATH_H
#define SMPATH_H
#include "smmath.hpp"
class smPathBase
{
public:
	virtual smvec2d getPointOnPath(double percentage);
	virtual double getPathLength();
	virtual ~smPathBase(){};
};
class smPathSegment:public smPathBase
{
private:
	smvec2d a,b;
public:
	smPathSegment(smvec2d _a,smvec2d _b);
	smvec2d getPointOnPath(double percentage);
	double getPathLength();
};
class smPathCircular:public smPathBase
{
private:
	smvec2d ctr;
	double a,b,r;
public:
	smPathCircular(smvec2d _ctr,double _a,double _b,double _r);
	smvec2d getPointOnPath(double percentage);
	double getPathLength();
};
class smPathCollection
{
private:
	smPathBase* paths[16];
public:
};
#endif