1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
10 #include "EntityObject.h"
12 // forward declaration.
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
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 //////////////////////////////////////////////////////////////////////////
38 //! Ctor must be protected.
43 void DeleteThis() { delete this; };
45 static float m_helperScale
;
49 * Class Description of TagPoint.
51 class CAIAnchorClassDesc
: public CObjectClassDesc
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__