MCPcopy Create free account
hub / github.com/baldurk/renderdoc / Update

Method Update

renderdoc/maths/camera.cpp:85–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void Camera::Update()
86{
87 if(!dirty)
88 return;
89
90 if(type == CameraType::FPSLook)
91 {
92 Matrix4f p = Matrix4f::Translation(-pos);
93 Matrix4f r = Matrix4f::RotationXYZ(-angles);
94
95 mat = r.Mul(p);
96 basis = mat.Transpose();
97 }
98 else
99 {
100 Matrix4f p = Matrix4f::Translation(-pos);
101 Matrix4f r = arcrot.GetMatrix();
102 Matrix4f d = Matrix4f::Translation(Vec3f(0.0f, 0.0f, dist));
103
104 mat = d.Mul(r.Mul(p));
105 basis = mat.Transpose();
106 }
107}
108
109const Matrix4f Camera::GetMatrix()
110{

Callers

nothing calls this directly

Calls 4

MulMethod · 0.80
TransposeMethod · 0.80
Vec3fClass · 0.70
GetMatrixMethod · 0.45

Tested by

no test coverage detected