BVB Source Codes

CRYENGINE Show VehicleSeatGroup.h Source code

Return Download CRYENGINE: download VehicleSeatGroup.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 a seat group
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 12:03:2006: Created by Mathieu Pinard
  12.  
  13. *************************************************************************/
  14. #ifndef __VEHICLESEATGROUP_H__
  15. #define __VEHICLESEATGROUP_H__
  16.  
  17. #include "vector"
  18.  
  19. class CVehicleSeat;
  20.  
  21. class CVehicleSeatGroup
  22. {
  23. public:
  24.  
  25.         bool          Init(IVehicle* pVehicle, const CVehicleParams& paramsTable);
  26.         void          Reset();
  27.         void          Release() { delete this; }
  28.  
  29.         void          GetMemoryUsage(ICrySizer* s) const;
  30.  
  31.         unsigned int  GetSeatCount() { return m_seats.size(); }
  32.         CVehicleSeat* GetSeatByIndex(unsigned int index);
  33.         CVehicleSeat* GetNextSeat(CVehicleSeat* pCurrentSeat);
  34.         CVehicleSeat* GetNextFreeSeat(CVehicleSeat* pCurrentSeat);
  35.  
  36.         bool          IsGroupEmpty();
  37.  
  38.         void          OnPassengerEnter(CVehicleSeat* pSeat, EntityId passengerId) {}
  39.         void          OnPassengerExit(CVehicleSeat* pSeat, EntityId passengerId);
  40.         void          OnPassengerChangeSeat(CVehicleSeat* pNewSeat, CVehicleSeat* pOldSeat);
  41.  
  42. protected:
  43.  
  44.         CVehicle* m_pVehicle;
  45.  
  46.         typedef std::vector<CVehicleSeat*> TVehicleSeatVector;
  47.         TVehicleSeatVector m_seats;
  48.  
  49.         bool               m_isSwitchingReverse;
  50.  
  51.         friend class CVehicleSeat;
  52. };
  53.  
  54. #endif
  55.  
downloadVehicleSeatGroup.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