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

Method objectToUVMatrix

src/IECoreImage/ImagePrimitive.cpp:261–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259///////////////////////////////////////////////////////////////////////////////////////////
260
261M33f ImagePrimitive::objectToUVMatrix() const
262{
263 M33f result;
264 const Box2i &displayWindow = getDisplayWindow();
265 V2i size = displayWindow.size() + V2i( 1 );
266 result.translate( V2f( 0.5f ) );
267 result.scale( V2f( 1.0f ) / V2f( size.x, -size.y ) );
268 return result;
269}
270
271M33f ImagePrimitive::uvToObjectMatrix() const
272{

Callers 1

testSpacesMethod · 0.95

Calls 1

sizeMethod · 0.45

Tested by 1

testSpacesMethod · 0.76