diff options
author | Chris Xiong <chirs241097@gmail.com> | 2015-10-12 22:55:41 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2015-10-12 22:55:41 +0800 |
commit | 9b5621bda033c2e6b7c622c7494c56a172543554 (patch) | |
tree | f5fd661441867ca8a100d5c8aedcce430864d9d4 /include | |
parent | 627d814f487ac38d4f9b9b71da9bef46f33b3dad (diff) | |
download | bullet-lab-remix-9b5621bda033c2e6b7c622c7494c56a172543554.tar.xz |
Initial implementation of smPath.
Minor changes on the (s)coll effect.
Diffstat (limited to 'include')
-rw-r--r-- | include/smpath.hpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/smpath.hpp b/include/smpath.hpp new file mode 100644 index 0000000..48bb930 --- /dev/null +++ b/include/smpath.hpp @@ -0,0 +1,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 |