MCPcopy Create free account
hub / github.com/cinder/Cinder / matrix

Method matrix

test/WindowToWorldTest/src/WindowToWorldTestApp.cpp:23–31  ·  view source on GitHub ↗

Returns the rectangle's model matrix.

Source from the content-addressed store, hash-verified

21
22 //! Returns the rectangle's model matrix.
23 mat4 matrix()
24 {
25 mat4 m = glm::translate( vec3( position, 0 ) );
26 m *= glm::toMat4( rotation );
27 m *= glm::scale( vec3( scale, 1 ) );
28 m *= glm::translate( vec3( -area.getSize() * 0.5f, 0 ) );
29
30 return m;
31 }
32};
33
34class WindowToWorldTestApp : public App {

Callers 4

updateMethod · 0.80
drawMethod · 0.80
mouseDownMethod · 0.80
ImGuiLunasvgPortRenderFunction · 0.80

Calls 3

translateFunction · 0.50
scaleFunction · 0.50
getSizeMethod · 0.45

Tested by

no test coverage detected