BVB Source Codes

CRYENGINE Show VehicleViewFirstPerson.h Source code

Return Download CRYENGINE: download VehicleViewFirstPerson.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.    Description: Implements the first person pit view for vehicles
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 29:01:2006: Created by Mathieu Pinard
  12.  
  13. *************************************************************************/
  14. #ifndef __VEHICLEVIEWFIRSTPERSON_H__
  15. #define __VEHICLEVIEWFIRSTPERSON_H__
  16.  
  17. #include "VehicleViewBase.h"
  18.  
  19. class CVehicleViewFirstPerson
  20.         : public CVehicleViewBase
  21. {
  22.         IMPLEMENT_VEHICLEOBJECT;
  23. public:
  24.  
  25.         CVehicleViewFirstPerson();
  26.         virtual ~CVehicleViewFirstPerson() {}
  27.  
  28.         // IVehicleView
  29.         virtual bool        Init(IVehicleSeat* pSeat, const CVehicleParams& table) override;
  30.         virtual void        Reset() override;
  31.  
  32.         virtual const char* GetName() override       { return m_name; }
  33.         virtual bool        IsThirdPerson() override { return false; }
  34.  
  35.         virtual void        OnStartUsing(EntityId playerId) override;
  36.         virtual void        OnStopUsing() override;
  37.  
  38.         virtual void        Update(const float frameTime) override;
  39.         virtual void        UpdateView(SViewParams& viewParams, EntityId playerId = 0) override;
  40.  
  41.         virtual void        GetMemoryUsage(ICrySizer* s) const override;
  42.  
  43.         void                OffsetPosition(const Vec3& delta) override
  44.         {
  45. #ifdef SEG_WORLD
  46.                 m_viewPosition += delta;
  47. #endif
  48.         }
  49.         // ~IVehicleView
  50.  
  51.         // IVehicleEventListener
  52.         virtual void OnVehicleEvent(EVehicleEvent event, const SVehicleEventParams& params) override;
  53.         // ~IVehicleEventListener
  54.  
  55. protected:
  56.  
  57.         virtual Vec3 GetWorldPosGoal();
  58.         virtual Quat GetWorldRotGoal();
  59.         Quat         GetVehicleRotGoal();
  60.  
  61.         void         HideEntitySlots(IEntity* pEnt, bool hide);
  62.  
  63.         static const char* m_name;
  64.  
  65.         IVehicleHelper*    m_pHelper;
  66.         string             m_sCharacterBoneName;
  67.         Vec3               m_offset;
  68.         float              m_fov;
  69.         float              m_relToHorizon;
  70.         bool               m_hideVehicle;
  71.         int                m_frameSlot;
  72.         Matrix34           m_invFrame;
  73.         Vec3               m_frameObjectOffset;
  74.  
  75.         typedef std::multimap<EntityId, int> TSlots;
  76.         TSlots   m_slotFlags;
  77.  
  78.         Vec3     m_viewPosition;
  79.         Quat     m_viewRotation;
  80.  
  81.         float    m_speedRot;
  82.  
  83.         EntityId m_passengerId;
  84. };
  85.  
  86. #endif
  87.  
downloadVehicleViewFirstPerson.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