!I (1670414, 1670415, 1670416, 1670424, 1670431):
[CRYENGINE.git] / Code / Sandbox / EditorQt / Objects / AIAnchor.h
blob43bda36c7e0c419e806268e94aa4286b5252ffee
1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
3 #ifndef __aianchor_h__
4 #define __aianchor_h__
6 #if _MSC_VER > 1000
7 #pragma once
8 #endif
10 #include "EntityObject.h"
12 // forward declaration.
13 struct IAIObject;
15 /*!
16 * CAIAnchor is an special tag point,that registered with AI, and tell him what to do when AI is idle.
19 class CAIAnchor : public CEntityObject
21 public:
22 DECLARE_DYNCREATE(CAIAnchor)
24 //////////////////////////////////////////////////////////////////////////
25 // Overrides from CBaseObject.
26 //////////////////////////////////////////////////////////////////////////
27 virtual bool Init(CBaseObject* prev, const string& file);
28 virtual void InitVariables() {}
29 virtual void Display(DisplayContext& disp);
30 virtual bool HitTest(HitContext& hc);
31 virtual void GetLocalBounds(AABB& box);
32 virtual void SetScale(const Vec3& scale) {} // Ignore scale
33 virtual void SetHelperScale(float scale) { m_helperScale = scale; };
34 virtual float GetHelperScale() { return m_helperScale; };
35 //////////////////////////////////////////////////////////////////////////
37 protected:
38 //! Ctor must be protected.
39 CAIAnchor();
41 float GetRadius();
43 void DeleteThis() { delete this; };
45 static float m_helperScale;
48 /*!
49 * Class Description of TagPoint.
51 class CAIAnchorClassDesc : public CObjectClassDesc
53 public:
54 ObjectType GetObjectType() { return OBJTYPE_AIPOINT; };
55 const char* ClassName() { return "AIAnchor"; };
56 const char* Category() { return "AI"; };
57 CRuntimeClass* GetRuntimeClass() { return RUNTIME_CLASS(CAIAnchor); };
58 virtual bool IsCreatable() const override { return gEnv->pEntitySystem->GetClassRegistry()->FindClass("AIAnchor"); }
61 #endif // __aianchor_h__