ScummVM API documentation
boundingbox.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program 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  * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BLADERUNNER_BOUNDING_BOX_H
23 #define BLADERUNNER_BOUNDING_BOX_H
24 
25 #include "bladerunner/vector.h"
26 
27 namespace BladeRunner {
28 
29 class SaveFileWriteStream;
30 
31 class BoundingBox {
32  Vector3 _vertices[2];
33 
34 public:
35  BoundingBox() {}
36  BoundingBox(float x0, float y0, float z0, float x1, float y1, float z1);
37 
38  void expand(float x0, float y0, float z0, float x1, float y1, float z1);
39  bool inside(float x, float y, float z) const;
40  bool inside(Vector3 &position) const;
41 
42  void setXYZ(float x0, float y0, float z0, float x1, float y1, float z1);
43  void getXYZ(float *x0, float *y0, float *z0, float *x1, float *y1, float *z1) const;
44 
45  float getZ0() const;
46  float getZ1() const;
47 };
48 
49 } // End of namespace BladeRunner
50 
51 #endif
Definition: actor.h:31
Definition: boundingbox.h:31
Definition: vector.h:47