OpenXcom  1.0
Open-source clone of the original X-Com
FastLineClip.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 namespace OpenXcom
21 {
26 {
27 private:
28  double FC_xn, FC_yn, FC_xk, FC_yk;
29  void Clip0_Top(void);
30  void Clip0_Bottom(void);
31  void Clip0_Right(void);
32  void Clip0_Left(void);
33  void Clip1_Top(void);
34  void Clip1_Bottom(void);
35  void Clip1_Right(void);
36  void Clip1_Left(void);
37 public:
38  double Wxlef, Wxrig, Wytop, Wybot;
40  FastLineClip(double Wxl, double Wxr, double Wyt, double Wyb) : FC_xn(0), FC_yn(0), FC_xk(0), FC_yk(0)
41  {
42  Wxlef = Wxl;
43  Wxrig = Wxr;
44  Wytop = Wyt;
45  Wybot = Wyb;
46  };
50  int LineClip(double *x0, double *y0, double *x1, double *y1);
51 };
52 
53 }
int LineClip(double *x0, double *y0, double *x1, double *y1)
LineClip itself.
Definition: FastLineClip.cpp:74
Fast line clip.
Definition: FastLineClip.h:25
~FastLineClip()
Cleans up the fastlineclip.
Definition: FastLineClip.h:48
FastLineClip(double Wxl, double Wxr, double Wyt, double Wyb)
Creates a fastlineclip.
Definition: FastLineClip.h:40
Definition: BaseInfoState.cpp:40