BVB Source Codes

CRYENGINE Show VehiclePartAttachment.h Source code

Return Download CRYENGINE: download VehiclePartAttachment.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 attachment socket for vehicle entity attachments
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 09:06:2006: Created by MichaelR
  12.  
  13. *************************************************************************/
  14. #ifndef __VEHICLEPARTATTACHMENT_H__
  15. #define __VEHICLEPARTATTACHMENT_H__
  16.  
  17. #include "VehiclePartBase.h"
  18.  
  19. class CVehicle;
  20.  
  21. class CVehiclePartEntityAttachment
  22.         : public CVehiclePartBase
  23. {
  24.         IMPLEMENT_VEHICLEOBJECT
  25. public:
  26.  
  27.         // IVehiclePartAttachment
  28.         virtual bool            Init(IVehicle* pVehicle, const CVehicleParams& table, IVehiclePart* parent, CVehicle::SPartInitInfo& initInfo, int partType) override;
  29.         //virtual void InitGeometry();
  30.         virtual void            PostInit() override;
  31.  
  32.         virtual void            Update(const float frameTime) override;
  33.  
  34.         virtual const Matrix34& GetLocalTM(bool relativeToParentPart, bool forced = false) override;
  35.         virtual const Matrix34& GetWorldTM() override;
  36.  
  37.         virtual void            SetLocalTM(const Matrix34& localTM) override;
  38.         virtual const AABB& GetLocalBounds() override;
  39.  
  40.         virtual void        GetMemoryUsage(ICrySizer* s) const override
  41.         {
  42.                 s->Add(*this);
  43.                 CVehiclePartBase::GetMemoryUsageInternal(s);
  44.         }
  45.         // ~IVehiclePartAttachment
  46.  
  47.         void     SetAttachmentEntity(EntityId entityId);
  48.         IEntity* GetAttachmentEntity();
  49.  
  50. protected:
  51.         void UpdateAttachment();
  52.         void DetachAttachment();
  53.  
  54.         EntityId m_attachmentId;
  55.  
  56.         Matrix34 m_localTM;
  57.         Matrix34 m_worldTM;
  58. };
  59.  
  60. #endif
  61.  
downloadVehiclePartAttachment.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