Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GenericCameraShakeProgress.c
Go to the documentation of this file.
1 
6 {
7  protected vector m_vTranslation;
8  protected vector m_vRotation;
9  protected float m_fFovScale = 1.0;
10  protected bool m_bIsRunning;
11 
12  override bool IsRunning()
13  {
14  return m_bIsRunning;
15  }
16 
17  override void Apply(inout vector transformMatrix[4], inout float fieldOfView)
18  {
19  vector shakeMatrix[4];
20  Math3D.AnglesToMatrix(m_vRotation, shakeMatrix);
21  shakeMatrix[3] = m_vTranslation;
22 
23  vector modifiedMatrix[4];
24  Math3D.MatrixMultiply4(transformMatrix, shakeMatrix, modifiedMatrix);
25  transformMatrix[0] = modifiedMatrix[0]; // Math3D.MatrixCopy does not seem to work with inout params?
26  transformMatrix[1] = modifiedMatrix[1];
27  transformMatrix[2] = modifiedMatrix[2];
28  transformMatrix[3] = modifiedMatrix[3];
29 
30  fieldOfView = m_fFovScale * fieldOfView;
31  }
32 
33  override void Clear()
34  {
35  m_vTranslation = vector.Zero;
36  m_vRotation = vector.Zero;
37  m_fFovScale = 1.0;
38  }
39 };
SCR_BaseCameraShakeProgress
Definition: SCR_BaseCameraShakeProgress.c:4
SCR_GenericCameraShakeProgress
Definition: SCR_GenericCameraShakeProgress.c:5
m_fFovScale
protected float m_fFovScale
Definition: SCR_CameraShakeManagerComponent.c:11