GeoGen Development snapshot a3

ggen_path.h

Go to the documentation of this file.
00001 /*
00002 
00003     This file is part of GeoGen.
00004 
00005     GeoGen is free software: you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation, either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     GeoGen is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with GeoGen.  If not, see <http://www.gnu.org/licenses/>.
00017 
00018 */
00019 
00024 #pragma once
00025 
00026 #include "ggen_support.h"
00027 #include "ggen_point.h"
00028 #include <list>
00029 
00033 class GGen_Path{
00034           public:
00035                     typedef list<GGen_Point>::iterator Iterator;
00036 
00037                     list<GGen_Point> points;
00038 
00042                     GGen_Path();
00043 
00048                     void AddPoint(GGen_Point& point);
00049                     
00055                     void AddPointByCoords(GGen_CoordOffset x, GGen_CoordOffset y);
00056 
00061                     void RemovePoint(uint32 index);
00062 
00068                     void InsertPoint(uint32 index, GGen_Point& point);
00069                     
00076                     void InsertPointByCoords(uint32 index, GGen_CoordOffset x, GGen_CoordOffset y);
00077 
00082                     GGen_CoordOffset GetMinX();
00083                     
00088                     GGen_CoordOffset GetMinY();
00089 
00094                     GGen_CoordOffset GetMaxX();
00095 
00100                     GGen_CoordOffset GetMaxY();
00101 
00106                     GGen_CoordOffset GetAverageX();
00107                     
00112                     GGen_CoordOffset GetAverageY();
00113 
00118                     GGen_CoordOffset GetCenterX();
00119                     
00124                     GGen_CoordOffset GetCenterY();
00125 
00129                     void Clear();
00130 
00136                     void Move(GGen_CoordOffset x, GGen_CoordOffset y);
00137 
00148                     void Transform(GGen_CoordOffset origin_x, GGen_CoordOffset origin_y, double a11, double a12, double a21, double a22);
00149                     
00156                     void Rotate(GGen_CoordOffset origin_x, GGen_CoordOffset origin_y, int32 angle);
00157 
00165                     void Shear(GGen_CoordOffset origin_x, GGen_CoordOffset origin_y, int32 horizontal_shear, int32 vertical_shear);
00166 
00173                     void Flip(GGen_CoordOffset origin_x, GGen_CoordOffset origin_y, GGen_Direction direction);
00174 
00182                     void Scale(GGen_CoordOffset origin_x, GGen_CoordOffset origin_y, double ratio_x, double ratio_y);
00183 };