Cortex  10.0.0-a4
Public Member Functions | List of all members
IECore::TransformBlock Class Reference

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

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.


The documentation for this class was generated from the following files: