BVB Source Codes

CRYENGINE Show VehiclePartTread.h Source code

Return Download CRYENGINE: download VehiclePartTread.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 tread for tanks
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 14:09:2005: Created by Mathieu Pinard
  12.  
  13. *************************************************************************/
  14. #ifndef __VEHICLEPARTTREAD_H__
  15. #define __VEHICLEPARTTREAD_H__
  16.  
  17. #include "VehicleSystem/VehiclePartBase.h"
  18.  
  19. class CVehicle;
  20.  
  21. class CVehiclePartTread
  22.         : public CVehiclePartBase
  23. {
  24.         IMPLEMENT_VEHICLEOBJECT
  25. public:
  26.  
  27.         CVehiclePartTread();
  28.         virtual ~CVehiclePartTread() {}
  29.  
  30.         // IVehiclePart
  31.         virtual bool            Init(IVehicle* pVehicle, const CVehicleParams& table, IVehiclePart* parent, CVehicle::SPartInitInfo& initInfo, int partType) override;
  32.         virtual void            InitGeometry();
  33.         virtual void            Reset() override;
  34.  
  35.         virtual bool            ChangeState(EVehiclePartState state, int flags = 0) override;
  36.  
  37.         virtual void            Physicalize() override;
  38.  
  39.         virtual const Matrix34& GetLocalTM(bool relativeToParentPart, bool forced = false) override;
  40.         virtual const Matrix34& GetWorldTM() override;
  41.         virtual const AABB&     GetLocalBounds() override;
  42.  
  43.         virtual void            Update(const float frameTime) override;
  44.  
  45.         virtual void            RegisterSerializer(IGameObjectExtension* gameObjectExt) override {}
  46.         virtual void            GetMemoryUsage(ICrySizer* s) const override
  47.         {
  48.                 s->Add(*this);
  49.                 s->AddObject(m_wheels);
  50.                 CVehiclePartBase::GetMemoryUsageInternal(s);
  51.         }
  52.         // ~IVehiclePart
  53.  
  54.         virtual void UpdateU();
  55.  
  56. protected:
  57.  
  58.         _smart_ptr<ICharacterInstance>     m_pCharInstance;
  59.         int                                m_lastWheelIndex;
  60.  
  61.         float                              m_uvSpeedMultiplier;
  62.  
  63.         bool                               m_bForceSetU;
  64.         float                              m_wantedU;
  65.         float                              m_currentU;
  66.  
  67.         _smart_ptr<IMaterial>              m_pMaterial;
  68.         _smart_ptr<IRenderShaderResources> m_pShaderResources;
  69.  
  70.         struct SWheelInfo
  71.         {
  72.                 int                       slot;
  73.                 int                       jointId;
  74.                 CVehiclePartSubPartWheel* pWheel;
  75.                 void                      GetMemoryUsage(ICrySizer* s) const
  76.                 {
  77.                         s->AddObject(pWheel);
  78.                 }
  79.         };
  80.  
  81.         IAnimationOperatorQueuePtr m_operatorQueue;
  82.  
  83.         typedef std::vector<SWheelInfo> TWheelInfoVector;
  84.         TWheelInfoVector m_wheels;
  85. };
  86.  
  87. #endif
  88.  
downloadVehiclePartTread.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