MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / getMatrixValues

Function getMatrixValues

src/OpenColorIO/GpuShaderUtils.cpp:222–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220
221template<typename T, int N>
222std::string getMatrixValues(const T * mtx, GpuLanguage lang, bool transpose)
223{
224 std::string vals;
225
226 for(int i=0 ; i<N*N-1 ; ++i)
227 {
228 const int line = i/N;
229 const int col = i%N;
230 const int idx = transpose ? col*N+line : line*N+col;
231
232 vals += getFloatString(mtx[idx], lang) + ", ";
233 }
234 vals += getFloatString(mtx[N*N-1], lang);
235
236 return vals;
237}
238
239GpuShaderText::GpuShaderLine::GpuShaderLine(GpuShaderText * text)
240 : m_text(text)

Callers

nothing calls this directly

Calls 1

getFloatStringFunction · 0.85

Tested by

no test coverage detected