Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_GenericCameraShakeProgress.c
Go to the documentation of this file.
1
6{
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 {
36 m_vRotation = vector.Zero;
37 m_fFovScale = 1.0;
38 }
39};
override void Apply(inout vector transformMatrix[4], inout float fieldOfView)