Carlo Collodi / kangaroo

Dependencies:   QEI mbed

include/geom.hpp

Committer:
calamaridudeman
Date:
2013-11-24
Revision:
37:bf257a0154db
Parent:
23:112c0be5a7f3
Child:
43:68faf056ed5c

File content as of revision 37:bf257a0154db:

#include "mbed.h"

#ifndef GEOM_HPP
#define GEOM_HPP

class Tuple{
    public:
        Tuple(int xin, int yin);
        
        int x;
        int y;
};

class Joints{
    public:
        Joints(float t1in, float t2in);
        
        float t1;
        float t2;
};

class Point {
    public:
        Point(float xin, float yin, float thetain);
    
        float x;
        float y;
        float theta;
};

class Line {
    public:
        Line(Point p1, Point p2);
        
        Point p1;
        Point p2;
};

class BezCurve {

    public:
        BezCurve(Point *ptsin, int sizein);
        
        void startCurve();
        Point getPoint(float alpha);
        Point getPoint();
        void setAlpha(float alpha);
        float incrementAlpha();
        float incrementAlpha(float velin, float time);
        void setAdot(float velin);
        Point newPoint();
        
        Point *pts;
        
    private:
        int size;
        float alpha;
        float vel;
        Timer t;
};

#endif