00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00025
00026 #ifndef _LOGIC_H_
00027 #define _LOGIC_H_
00028
00029 #include "Point.h"
00030 #include "Line.h"
00031
00032 #include <vector>
00033
00034 namespace GpuQuadraticCurveRender
00035 {
00036
00040 class Logic
00041 {
00042 public:
00044 Logic(void);
00045
00047 ~Logic(void);
00048
00052 void EnablePoints(void);
00053
00057 void EnableLines(void);
00058
00062 void EnableTriangles(void);
00063
00065 bool ArePointsEnabled(void);
00066
00068 bool AreLinesEnabled(void);
00069
00071 bool AreTrianglesEnabled(void);
00072
00074 const std::vector<Point>& GetQuadraticControlPoints(void) const;
00075
00077 const std::vector<Line>& GetQuadraticLines(void) const;
00078
00080 const std::vector<int>& GetQuadraticIndices(void) const;
00081
00085 void SetQuadraticControlPoint(int pointIndex, const Point& point);
00086
00092 bool AreQuadraticControlPointsIntersected(const Point& point, int& controlPointIndex, float pointSize);
00093
00094 private:
00096 std::vector<Point> m_quadraticControlPoints;
00097
00099 std::vector<Line> m_quadraticLines;
00100
00102 std::vector<int> m_quadraticIndices;
00103
00105 bool m_enabledPoints;
00106
00108 bool m_enabledLines;
00109
00111 bool m_enabledTriangles;
00112
00114 Logic(const Logic&);
00115
00117 Logic& operator=(const Logic&);
00118
00119 bool AreControlPointsIntersected(const std::vector<Point>& points, const Point& point, int& controlPointIndex, float pointSize);
00120 };
00121
00122 }
00123
00124 #endif