BVB Source Codes

CRYENGINE Show VehicleSeatActionOrientatePartToView.h Source code

Return Download CRYENGINE: download VehicleSeatActionOrientatePartToView.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 action for orientate one or multiple vehicle parts
  8.       towards the view direction of the seat passanger
  9.  
  10.    -------------------------------------------------------------------------
  11.    History:
  12.    - 16:11:2005: Created by Benito G.R.
  13.  
  14. *************************************************************************/
  15.  
  16. #ifndef __VEHICLESEATACTIONORIENTATEPARTTOVIEW_H__
  17. #define __VEHICLESEATACTIONORIENTATEPARTTOVIEW_H__
  18.  
  19. class CVehicleSeatActionOrientatePartToView
  20.         : public IVehicleSeatAction
  21. {
  22.         IMPLEMENT_VEHICLEOBJECT
  23.  
  24. private:
  25.  
  26.         struct SOrientatePartInfo
  27.         {
  28.                 SOrientatePartInfo()
  29.                         : partIndex(-1)
  30.                         , orientationAxis(1.0f, 1.0f, 1.0f)
  31.                 {
  32.  
  33.                 }
  34.  
  35.                 int  partIndex;
  36.                 Vec3 orientationAxis;
  37.         };
  38.  
  39. public:
  40.  
  41.         CVehicleSeatActionOrientatePartToView();
  42.  
  43.         virtual bool Init(IVehicle* pVehicle, IVehicleSeat* pSeat, const CVehicleParams& table) override;
  44.         virtual void Reset() override   {}
  45.         virtual void Release() override { delete this; }
  46.  
  47.         virtual void StartUsing(EntityId passengerId) override;
  48.         virtual void ForceUsage() override                                                               {}
  49.         virtual void StopUsing() override;
  50.         virtual void OnAction(const TVehicleActionId actionId, int activationMode, float value) override {}
  51.  
  52.         virtual void Serialize(TSerialize ser, EEntityAspects aspects) override                          {}
  53.         virtual void PostSerialize() override                                                            {}
  54.         virtual void Update(const float deltaTime) override;
  55.  
  56.         virtual void OnVehicleEvent(EVehicleEvent event, const SVehicleEventParams& params) override {}
  57.  
  58.         virtual void GetMemoryUsage(ICrySizer* s) const override;
  59.  
  60. protected:
  61.  
  62.         Vec3 GetViewDirection() const;
  63.  
  64.         typedef std::vector<SOrientatePartInfo> TPartIndices;
  65.  
  66.         IVehicle*     m_pVehicle;
  67.         IVehicleSeat* m_pSeat;
  68.  
  69.         TPartIndices  m_controlledParts;
  70. };
  71.  
  72. #endif //__VEHICLESEATACTIONORIENTATEPARTTOVIEW_H__
  73.  
downloadVehicleSeatActionOrientatePartToView.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