MCPcopy Create free account
hub / github.com/ImageEngine/cortex / pixelToUVMatrix

Method pixelToUVMatrix

src/IECoreImage/ImagePrimitive.cpp:301–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301M33f ImagePrimitive::pixelToUVMatrix() const
302{
303 M33f result;
304 const Box2i &displayWindow = getDisplayWindow();
305 V2i size = displayWindow.size() + V2i( 1 );
306 result.scale( V2f( 1.0f ) / V2f( size.x, size.y ) );
307 result.translate( V2f( 0.5f ) - V2f( displayWindow.min.x, displayWindow.min.y ) );
308 return result;
309}
310
311M33f ImagePrimitive::uvToPixelMatrix() const
312{

Callers 1

testSpacesMethod · 0.95

Calls 1

sizeMethod · 0.45

Tested by 1

testSpacesMethod · 0.76