17
17
#ifndef BZF_BOX_BUILDING_H
18
18
#define BZF_BOX_BUILDING_H
19
19
20
- #include " common.h"
21
- #include < string>
20
+ // Inherits from
22
21
#include " Obstacle.h"
23
22
23
+ // System headers
24
+ #include < string>
25
+ #include < glm/fwd.hpp>
26
+
24
27
class BoxBuilding : public Obstacle
25
28
{
26
29
public:
27
30
BoxBuilding ();
28
- BoxBuilding (const float * pos, float rotation,
31
+ BoxBuilding (const glm::vec3 & pos, float rotation,
29
32
float width, float breadth, float height,
30
33
bool drive = false , bool shoot = false ,
31
34
bool ricochet = false , bool invisible = false );
@@ -39,28 +42,28 @@ class BoxBuilding : public Obstacle
39
42
bool isFlatTop () const ;
40
43
41
44
float intersect (const Ray&) const ;
42
- void getNormal (const float * p, float * n) const ;
43
- void get3DNormal (const float * p, float * n) const ;
45
+ void getNormal (const glm::vec3 & p, glm::vec3 & n) const override ;
46
+ void get3DNormal (const glm::vec3 & p, glm::vec3 & n) const override ;
44
47
inline bool isInvisible () const ;
45
48
46
- bool inCylinder (const float * p, float radius, float height) const ;
47
- bool inBox (const float * p, float angle,
48
- float halfWidth, float halfBreadth, float height) const ;
49
- bool inMovingBox (const float * oldP, float oldAngle,
50
- const float * newP, float newAngle,
51
- float halfWidth, float halfBreadth, float height) const ;
52
- bool isCrossing (const float * p, float angle,
49
+ bool inCylinder (const glm::vec3 & p, float radius, float height) const override ;
50
+ bool inBox (const glm::vec3 & p, float angle,
51
+ float halfWidth, float halfBreadth, float height) const override ;
52
+ bool inMovingBox (const glm::vec3 & oldP, float oldAngle,
53
+ const glm::vec3 & newP, float newAngle,
54
+ float halfWidth, float halfBreadth, float height) const override ;
55
+ bool isCrossing (const glm::vec3 & p, float angle,
53
56
float halfWidth, float halfBreadth, float height,
54
- float * plane) const ;
57
+ glm::vec4 * plane) const override ;
55
58
56
59
bool getHitNormal (
57
- const float * pos1, float azimuth1,
58
- const float * pos2, float azimuth2,
60
+ const glm::vec3 & pos1, float azimuth1,
61
+ const glm::vec3 & pos2, float azimuth2,
59
62
float halfWidth, float halfBreadth,
60
63
float height,
61
- float * normal ) const ;
64
+ glm::vec3 & normal ) const override ;
62
65
63
- void getCorner (int index, float * pos) const ;
66
+ void getCorner (int index, glm::vec3 & pos) const ;
64
67
65
68
int packSize () const ;
66
69
void *pack (void *) const ;
0 commit comments