forked from themrdemonized/xray-monolith
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathR_Backend_xform.h
More file actions
71 lines (63 loc) · 1.64 KB
/
R_Backend_xform.h
File metadata and controls
71 lines (63 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef r_backend_xformH
#define r_backend_xformH
#pragma once
class ECORE_API R_xforms
{
public:
Fmatrix m_w; // Basic - world
Fmatrix m_invw; // derived - world2local, cached
Fmatrix m_v; // Basic - view
Fmatrix m_p; // Basic - projection
Fmatrix m_wv; // Derived - world2view
Fmatrix m_vp; // Derived - view2projection
Fmatrix m_wvp; // Derived - world2view2projection
Fmatrix m_w_prev;
Fmatrix m_v_prev;
Fmatrix m_p_prev;
Fmatrix m_wv_prev;
Fmatrix m_vp_prev;
Fmatrix m_wvp_prev;
R_constant* c_w;
R_constant* c_invw;
R_constant* c_v;
R_constant* c_p;
R_constant* c_wv;
R_constant* c_vp;
R_constant* c_wvp;
R_constant* c_w_prev;
R_constant* c_v_prev;
R_constant* c_p_prev;
R_constant* c_wv_prev;
R_constant* c_vp_prev;
R_constant* c_wvp_prev;
private:
bool m_bInvWValid;
public:
R_xforms();
void unmap();
void set_W(const Fmatrix& m);
void set_V(const Fmatrix& m);
void set_P(const Fmatrix& m);
IC const Fmatrix& get_W() { return m_w; }
IC const Fmatrix& get_V() { return m_v; }
IC const Fmatrix& get_P() { return m_p; }
IC void set_c_w(R_constant* C);
IC void set_c_invw(R_constant* C);
IC void set_c_v(R_constant* C);
IC void set_c_p(R_constant* C);
IC void set_c_wv(R_constant* C);
IC void set_c_vp(R_constant* C);
IC void set_c_wvp(R_constant* C);
void set_W_prev(const Fmatrix& m);
void set_V_prev(const Fmatrix& m);
void set_P_prev(const Fmatrix& m);
IC void set_c_w_prev(R_constant* C);
IC void set_c_v_prev(R_constant* C);
IC void set_c_p_prev(R_constant* C);
IC void set_c_wv_prev(R_constant* C);
IC void set_c_vp_prev(R_constant* C);
IC void set_c_wvp_prev(R_constant* C);
private:
void apply_invw();
};
#endif