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

Method RotationZYX

renderdoc/maths/matrix.cpp:235–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235Matrix4f Matrix4f::RotationZYX(const Vec3f &rot)
236{
237 Quatf Qx = Quatf::AxisAngle(Vec3f(1.0f, 0.0f, 0.0f), rot.x);
238 Quatf Qy = Quatf::AxisAngle(Vec3f(0.0f, 1.0f, 0.0f), rot.y);
239 Quatf Qz = Quatf::AxisAngle(Vec3f(0.0f, 0.0f, 1.0f), rot.z);
240
241 Quatf R = Qx * Qy * Qz;
242
243 return R.GetMatrix();
244}
245
246Matrix4f Matrix4f::RotationXYZ(const Vec3f &rot)
247{

Callers

nothing calls this directly

Calls 2

Vec3fClass · 0.70
GetMatrixMethod · 0.45

Tested by

no test coverage detected