OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FastLineClip.h
1 /*
2  * Copyright 2010 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom 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 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom 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 OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_FASTLINECLIIP_H
20 #define OPENXCOM_FASTLINECLIIP_H
21 
22 namespace OpenXcom
23 {
28 {
29 private:
30  double FC_xn, FC_yn, FC_xk, FC_yk;
31  void Clip0_Top(void);
32  void Clip0_Bottom(void);
33  void Clip0_Right(void);
34  void Clip0_Left(void);
35  void Clip1_Top(void);
36  void Clip1_Bottom(void);
37  void Clip1_Right(void);
38  void Clip1_Left(void);
39 public:
40  double Wxlef, Wxrig, Wytop, Wybot;
42  FastLineClip(double Wxl, double Wxr, double Wyt, double Wyb) : FC_xn(0), FC_yn(0), FC_xk(0), FC_yk(0)
43  {
44  Wxlef = Wxl;
45  Wxrig = Wxr;
46  Wytop = Wyt;
47  Wybot = Wyb;
48  };
52  int LineClip(double *x0, double *y0, double *x1, double *y1);
53 };
54 
55 }
56 
57 #endif
int LineClip(double *x0, double *y0, double *x1, double *y1)
LineClip itself.
Definition: FastLineClip.cpp:74
Fast line clip.
Definition: FastLineClip.h:27
~FastLineClip()
Cleans up the fastlineclip.
Definition: FastLineClip.h:50
FastLineClip(double Wxl, double Wxr, double Wyt, double Wyb)
Creates a fastlineclip.
Definition: FastLineClip.h:42