BVB Source Codes

CRYENGINE Show VehiclePartMassBox.h Source code

Return Download CRYENGINE: download VehiclePartMassBox.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 simple box-shaped part for mass distribution
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 17:10:2005: Created by MichaelR
  12.  
  13. *************************************************************************/
  14. #ifndef __VEHICLEPARTMASSBOX_H__
  15. #define __VEHICLEPARTMASSBOX_H__
  16.  
  17. #include "VehiclePartBase.h"
  18.  
  19. class CVehicle;
  20.  
  21. class CVehiclePartMassBox
  22.         : public CVehiclePartBase
  23. {
  24.         IMPLEMENT_VEHICLEOBJECT
  25. public:
  26.  
  27.         CVehiclePartMassBox();
  28.         ~CVehiclePartMassBox();
  29.  
  30.         // IVehiclePart
  31.         virtual bool            Init(IVehicle* pVehicle, const CVehicleParams& table, IVehiclePart* parent, CVehicle::SPartInitInfo& initInfo, int partType) override;
  32.         virtual void            Reset() override;
  33.  
  34.         virtual void            Physicalize() override;
  35.  
  36.         virtual const Matrix34& GetLocalTM(bool relativeToParentPart, bool forced = false) override;
  37.         virtual const Matrix34& GetWorldTM() override;
  38.         virtual const AABB&     GetLocalBounds() override;
  39.  
  40.         virtual void            Update(const float frameTime) override;
  41.         virtual void            Serialize(TSerialize ser, EEntityAspects aspects) override;
  42.  
  43.         virtual void            GetMemoryUsage(ICrySizer* s) const override
  44.         {
  45.                 s->Add(*this);
  46.                 CVehiclePartBase::GetMemoryUsageInternal(s);
  47.         }
  48.         // ~IVehiclePart
  49.  
  50. protected:
  51.  
  52.         Matrix34 m_localTM;
  53.         Matrix34 m_worldTM;
  54.         Vec3     m_size;
  55.         float    m_drivingOffset;
  56.  
  57. private:
  58.         enum EMassBoxDrivingType
  59.         {
  60.                 eMASSBOXDRIVING_DEFAULT    = 1 << 0,
  61.                 eMASSBOXDRIVING_NORMAL     = 1 << 1,
  62.                 eMASSBOXDRIVING_INTHEAIR   = 1 << 2,
  63.                 eMASSBOXDRIVING_INTHEWATER = 1 << 3,
  64.                 eMASSBOXDRIVING_DESTROYED  = 1 << 4,
  65.         };
  66.         void SetupDriving(EMassBoxDrivingType drive);
  67.         EMassBoxDrivingType m_Driving; //0 default 1 driving 2 in the air
  68. };
  69.  
  70. #endif
  71.  
downloadVehiclePartMassBox.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