Main Page · Modules · All Classes · Class Hierarchy
MEDefs.hpp
1 /*
2  * This file is part of the AiBO+ project
3  *
4  * Copyright (C) 2005-2016 Csaba Kertész (csaba.kertesz@gmail.com)
5  *
6  * AiBO+ is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * AiBO+ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19  *
20  */
21 
22 #pragma once
23 
30 typedef enum
31 {
37 
41 struct MEColor
42 {
43  MEColor(unsigned char red, unsigned char green, unsigned char blue);
44 
46  unsigned char Red;
48  unsigned char Green;
50  unsigned char Blue;
51 };
52 
56 struct MEPoint
57 {
58  MEPoint(int x = -1, int y = -1);
59 
60  bool IsValid() const;
61 
63  int X;
65  int Y;
66 };
67 
79 extern float MEGetInteriorAngle(const MEPoint& point1, const MEPoint& point2, const MEPoint& point3);
80 
93 extern MEPoint MEComputeLineIntersection(const MEPoint& line1_point1, const MEPoint& line1_point2,
94  const MEPoint& line2_point1, const MEPoint& line2_point2);
95 
int X
X position.
Definition: MEDefs.hpp:63
MEProcessStateType
Definition: MEDefs.hpp:30
float MEGetInteriorAngle(const MEPoint &point1, const MEPoint &point2, const MEPoint &point3)
Get the interior angle between three points.
Definition: MEDefs.cpp:45
int Y
Y position.
Definition: MEDefs.hpp:65
Point.
Definition: MEDefs.hpp:56
Color.
Definition: MEDefs.hpp:41
unsigned char Blue
Blue component.
Definition: MEDefs.hpp:50
MEPoint MEComputeLineIntersection(const MEPoint &line1_point1, const MEPoint &line1_point2, const MEPoint &line2_point1, const MEPoint &line2_point2)
Compute intersection point between two lines.
Definition: MEDefs.cpp:55
unsigned char Red
Red component.
Definition: MEDefs.hpp:46
unsigned char Green
Green component.
Definition: MEDefs.hpp:48