BVB Source Codes

CRYENGINE Show MovementActor.h Source code

Return Download CRYENGINE: download MovementActor.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #pragma once
  4.  
  5. #ifndef MovementActor_h
  6.         #define MovementActor_h
  7.  
  8.         #include <CryAISystem/IMovementActor.h>
  9.         #include <CryAISystem/MovementRequest.h>
  10.         #include <CryAISystem/IPathfinder.h>
  11.  
  12. // The movement system processes the movement requests for an actor
  13. // in the order they come. Eaten off front-to-back. This is the queue.
  14. typedef std::deque<MovementRequestID> MovementRequestQueue;
  15.  
  16. // -------------------------------------------------------------------------------------------
  17.  
  18. // Contains the information related to one specific actor in the
  19. // context of movement.
  20. // Retrieve information about an actor through this object.
  21. struct MovementActor : public IMovementActor
  22. {
  23.         MovementActor(const EntityId _entityID, IMovementActorAdapter* _pAdapter)
  24.                 : entityID(_entityID)
  25.                 , requestIdCurrentlyInPlanner(0)
  26.                 , lastPointInPathIsSmartObject(false)
  27.                 , pAdapter(_pAdapter)
  28.         {
  29.                 assert(pAdapter);
  30.         }
  31.  
  32.         virtual ~MovementActor() {}
  33.  
  34.         // IMovementActor
  35.         virtual IMovementActorAdapter&    GetAdapter() const override;
  36.         virtual void                      RequestPathTo(const Vec3& destination, float lengthToTrimFromThePathEnd, const MNMDangersFlags dangersFlags,
  37.                                                         const bool considerActorsAsPathObstacles) override;
  38.         virtual Movement::PathfinderState GetPathfinderState() const override;
  39.         virtual const char*               GetName() const override;
  40.         virtual void                      Log(const char* message) override;
  41.  
  42.         virtual bool                      IsLastPointInPathASmartObject() const override { return lastPointInPathIsSmartObject; }
  43.         virtual EntityId                  GetEntityId() const override                   { return entityID; };
  44.         virtual MovementActorCallbacks    GetCallbacks() const override                  { return callbacks; };
  45.         // ~IMovementActor
  46.  
  47.         void      SetLowCoverStance();
  48.  
  49.         CAIActor* GetAIActor();
  50.  
  51.         std::shared_ptr<Movement::IPlanner> planner;
  52.         EntityId                            entityID;
  53.         MovementRequestQueue                requestQueue;
  54.         MovementRequestID                   requestIdCurrentlyInPlanner;
  55.         bool                                lastPointInPathIsSmartObject;
  56.  
  57.         MovementActorCallbacks              callbacks;
  58. private:
  59.         IMovementActorAdapter*              pAdapter;
  60. };
  61.  
  62. #endif // MovementActor_h
  63.  
downloadMovementActor.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top