Cortex
10.0.0-a4
|
A context object intended for use with python's "with" syntax. More...
#include <TransformBlock.h>
Inherits noncopyable.
Public Member Functions | |
TransformBlock (RendererPtr renderer, bool active=true) | |
~TransformBlock () | |
def | __init__ (self, renderer) |
def | __enter__ (self) |
def | __exit__ (self, type, value, traceBack) |
A context object intended for use with python's "with" syntax.
The TransformBlock class provides a simple means of ensuring that renderer->transformBegin() calls are matched by renderer->transformEnd() calls, even in the face of exceptions and multiple return statements from a function.
It calls renderer.transformBegin() in enter and renderer.transformEnd() in exit.
IECore::TransformBlock::TransformBlock | ( | RendererPtr | renderer, |
bool | active = true |
||
) |
Starts a new transform block, calling renderer->transformBegin(). If active is false then nothing is done.
IECore::TransformBlock::~TransformBlock | ( | ) |
Closes the transform block by calling renderer->transformEnd(). If active was false in the constructor then nothing is done.