BVB Source Codes

CRYENGINE Show CryModEffMorph.h Source code

Return Download CRYENGINE: download CryModEffMorph.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #pragma once
  4.  
  5. #include <CryAnimation/CryCharMorphParams.h>
  6.  
  7. class CryModelAnimationContainer;
  8.  
  9. class CryModEffMorph
  10. {
  11. public:
  12.         // advances the current time of the played animation and returns the blending factor by which this animation affects the bone pose
  13.         void Tick(f32 fDeltaTime);
  14.  
  15.         // starts the morphing sequence
  16.         void StartMorph(int nMorphTargetId, const CryCharMorphParams& rParams);
  17.  
  18.         // returns false when this morph target is inactive
  19.         bool isActive() const;
  20.  
  21.         // returns the blending factor for this morph target
  22.         f32 getBlending() const;
  23.  
  24.         // returns the morph target
  25.         int  getMorphTargetId() const;
  26.  
  27.         void setTime(f32 fTime)   { m_fTime = fTime; }
  28.         void setSpeed(f32 fSpeed) { m_Params.m_fSpeed = fSpeed; }
  29.         void stop();
  30.  
  31.         f32  getTime() const { return m_fTime; }
  32.         void freeze()        { m_nFlags |= m_Params.FLAGS_FREEZE; }
  33.  
  34.         void GetMemoryUsage(ICrySizer* pSizer) const
  35.         {
  36.                 pSizer->AddObject(this, sizeof(*this));
  37.                 pSizer->AddObject(&m_Params, sizeof(m_Params));
  38.                 pSizer->AddObject(m_fTime);
  39.                 pSizer->AddObject(m_nMorphTargetId);
  40.                 pSizer->AddObject(m_nFlags);
  41.         }
  42. public:
  43.  
  44.         // the animation container that will answer all questions regarding the morph target
  45.         //CryModelAnimationContainer* m_pAnimations;
  46.  
  47.         // the blend time
  48.         CryCharMorphParams m_Params;
  49.         // time of morphing
  50.         f32                m_fTime;
  51.         // morph target id
  52.         int                m_nMorphTargetId;
  53.         unsigned           m_nFlags; // the copy of the flags from m_Params
  54. };
  55.  
downloadCryModEffMorph.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