Emergency 20 Dokumentation  4.2.0
EVirtualObject.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
14 
16 
17 #include <qsf/map/Entity.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Namespace ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25 
26 
27  //[-------------------------------------------------------]
28  //[ Classes ]
29  //[-------------------------------------------------------]
35  {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Public methods ]
40  //[-------------------------------------------------------]
41  public:
42  EVirtualObject(qsf::Entity& entity);
43  virtual ~EVirtualObject();
44 
45  // ::EActor
46  virtual qsf::Entity& getQsfEntity() override { return mEntity; }
47  virtual bool hasTag(const qsf::StringHash& tag) const override;
48  virtual float GetBoundingRadius() override { return 0.0f; } // TODO(co) Implement me
49  virtual float GetBoundingRadiusXZ() const override { return 0.0f; } // TODO(co) Implement me
50  virtual float GetBoundingRadiusHeight() const override { return 0.0f; } // TODO(co) Implement me
51  virtual glm::vec3 GetBBMidPoint() const override { return glm::vec3(); } // TODO(co) Implement me
52 
53  // ::EVirtualObject
54  virtual qsf::PolygonComponent& getPolygonComponent() const override;
55  virtual bool IsWalkable() override { return EActorBase::IsWalkable(); }
56  virtual qsf::ai::ETerrain* GetTerrain() override { return EActorBase::GetTerrain(); }
57  virtual qsf::ai::ETerrain* GetTerrain(int) override { return nullptr; } // TODO(fw) Implement me
58  virtual void initOwnerPlayer() override { mOwnerPlayer = EActorBase::initOwnerPlayer(); }
59 
60 
61  //[-------------------------------------------------------]
62  //[ Private methods ]
63  //[-------------------------------------------------------]
64  private:
65  qsf::WeakPtr<qsf::PolygonComponent> mPolygonComponent;
66 
67 
68  };
69 
70 
71 //[-------------------------------------------------------]
72 //[ Namespace ]
73 //[-------------------------------------------------------]
74 } // em5
Definition: ActionPriority.h:13
Polygon component class.
Definition: PolygonComponent.h:44
virtual float GetBoundingRadius() override
Definition: EVirtualObject.h:48
Entity class.
Definition: Entity.h:46
EActor wrapper base class.
Definition: EActorBase.h:39
Emergency 5 implementation of EVirtualObject wrapper class for a QSF entity.
Definition: EVirtualObject.h:34
virtual qsf::ai::ETerrain * GetTerrain() override
Definition: EVirtualObject.h:56
virtual float GetBoundingRadiusXZ() const override
Definition: EVirtualObject.h:49
virtual ~EVirtualObject()
qsf::Entity & mEntity
Definition: EActorBase.h:62
Definition: terrain.h:79
virtual float GetBoundingRadiusHeight() const override
Definition: EVirtualObject.h:50
int mOwnerPlayer
Definition: EActor.h:225
virtual qsf::ai::ETerrain * GetTerrain(int) override
Definition: EVirtualObject.h:57
qsf::ai::ETerrain * GetTerrain()
virtual qsf::Entity & getQsfEntity() override
Definition: EVirtualObject.h:46
virtual bool IsWalkable() override
Definition: EVirtualObject.h:55
virtual glm::vec3 GetBBMidPoint() const override
Definition: EVirtualObject.h:51
EVirtualObject wrapper class for a QSF entity.
Definition: EVirtualObject.h:47
Compile time string hash class.
Definition: StringHash.h:59
virtual qsf::PolygonComponent & getPolygonComponent() const override
EVirtualObject()
Definition: EVirtualObject.h:63
virtual void initOwnerPlayer() override
Definition: EVirtualObject.h:58
virtual bool hasTag(const qsf::StringHash &tag) const override