MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / set_from_srt

Method set_from_srt

src/math/linear_algebra.cpp:122–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void mat4::set_from_srt(const float scaleX,
123 const float scaleY,
124 const float scaleZ,
125 const float rZ,
126 const float x,
127 const float y,
128 const float z) {
129 using Eigen::Affine3f;
130 using Eigen::AngleAxisf;
131 using Eigen::Vector3f;
132
133 auto t = Affine3f::Identity();
134 t.translate(Vector3f(x, y, z))
135 .rotate(AngleAxisf(rZ, Vector3f(0.0f, 0.0f, 1.0f)))
136 .scale(Vector3f(scaleX, scaleY, scaleZ));
137 this->mat_ = t.matrix();
138}
139
140float* mat4::data() {
141 return mat_.data();

Callers

nothing calls this directly

Calls 2

scaleMethod · 0.80
rotateMethod · 0.80

Tested by

no test coverage detected