VTK
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
vtkSynchronizedRenderers Class Reference

synchronizes renderers across processes. More...

#include <vtkSynchronizedRenderers.h>

Inheritance diagram for vtkSynchronizedRenderers:
[legend]
Collaboration diagram for vtkSynchronizedRenderers:
[legend]

List of all members.

Classes

struct  RendererInfo
struct  vtkRawImage
 vtkRawImage can be used to make it easier to deal with images for compositing/communicating over client-server etc. More...

Public Types

enum  { SYNC_RENDERER_TAG = 15101, RESET_CAMERA_TAG = 15102, COMPUTE_BOUNDS_TAG = 15103 }
typedef vtkObject Superclass
- Public Types inherited from vtkObject

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void CollectiveExpandForVisiblePropBounds (double bounds[6])
virtual void SetRenderer (vtkRenderer *)
virtual vtkRendererGetRenderer ()
virtual void SetParallelController (vtkMultiProcessController *)
virtual vtkMultiProcessControllerGetParallelController ()
virtual void SetParallelRendering (bool)
virtual bool GetParallelRendering ()
virtual void ParallelRenderingOn ()
virtual void ParallelRenderingOff ()
virtual void SetImageReductionFactor (int)
virtual int GetImageReductionFactor ()
virtual void SetWriteBackImages (bool)
virtual bool GetWriteBackImages ()
virtual void WriteBackImagesOn ()
virtual void WriteBackImagesOff ()
virtual void SetRootProcessId (int)
virtual int GetRootProcessId ()
virtual void SetCaptureDelegate (vtkSynchronizedRenderers *)
virtual vtkSynchronizedRenderersGetCaptureDelegate ()
virtual void SetAutomaticEventHandling (bool)
virtual bool GetAutomaticEventHandling ()
virtual void AutomaticEventHandlingOn ()
virtual void AutomaticEventHandlingOff ()
- Public Member Functions inherited from vtkObject
virtual void DebugOn ()
virtual void DebugOff ()
unsigned char GetDebug ()
void SetDebug (unsigned char debugFlag)
virtual void Modified ()
virtual unsigned long GetMTime ()
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
vtkCommandGetCommand (unsigned long tag)
void RemoveObserver (vtkCommand *)
void RemoveObservers (unsigned long event, vtkCommand *)
void RemoveObservers (const char *event, vtkCommand *)
int HasObserver (unsigned long event, vtkCommand *)
int HasObserver (const char *event, vtkCommand *)
void RemoveObserver (unsigned long tag)
void RemoveObservers (unsigned long event)
void RemoveObservers (const char *event)
void RemoveAllObservers ()
int HasObserver (unsigned long event)
int HasObserver (const char *event)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
int InvokeEvent (unsigned long event, void *callData)
int InvokeEvent (const char *event, void *callData)
int InvokeEvent (unsigned long event)
int InvokeEvent (const char *event)
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
virtual void Delete ()
virtual void FastDelete ()
void Print (ostream &os)
virtual void Register (vtkObjectBase *o)
virtual void UnRegister (vtkObjectBase *o)
void SetReferenceCount (int)
void PrintRevisions (ostream &os)
virtual void PrintHeader (ostream &os, vtkIndent indent)
virtual void PrintTrailer (ostream &os, vtkIndent indent)
int GetReferenceCount ()

Static Public Member Functions

static vtkSynchronizedRenderersNew ()
static int IsTypeOf (const char *type)
static vtkSynchronizedRenderersSafeDownCast (vtkObject *o)
- Static Public Member Functions inherited from vtkObject
static void BreakOnError ()
static void SetGlobalWarningDisplay (int val)
static void GlobalWarningDisplayOn ()
static void GlobalWarningDisplayOff ()
static int GetGlobalWarningDisplay ()

Protected Member Functions

 vtkSynchronizedRenderers ()
 ~vtkSynchronizedRenderers ()
virtual void HandleStartRender ()
virtual void HandleEndRender ()
virtual void HandleAbortRender ()
virtual void MasterStartRender ()
virtual void SlaveStartRender ()
virtual void MasterEndRender ()
virtual void SlaveEndRender ()
virtual vtkRawImageCaptureRenderedImage ()
void PushImageToScreen ()
- Protected Member Functions inherited from vtkObject
 vtkObject ()
virtual ~vtkObject ()
virtual void RegisterInternal (vtkObjectBase *, int check)
virtual void UnRegisterInternal (vtkObjectBase *, int check)
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void InternalReleaseFocus ()
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
virtual ~vtkObjectBase ()
virtual void CollectRevisions (ostream &os)
virtual void ReportReferences (vtkGarbageCollector *)
 vtkObjectBase (const vtkObjectBase &)
void operator= (const vtkObjectBase &)

Protected Attributes

vtkMultiProcessControllerParallelController
vtkRendererRenderer
vtkSynchronizedRenderersCaptureDelegate
vtkRawImage ReducedImage
vtkRawImage FullImage
bool ParallelRendering
int ImageReductionFactor
bool WriteBackImages
int RootProcessId
bool AutomaticEventHandling
- Protected Attributes inherited from vtkObject
unsigned char Debug
vtkTimeStamp MTime
vtkSubjectHelper * SubjectHelper
- Protected Attributes inherited from vtkObjectBase
int ReferenceCount
vtkWeakPointerBase ** WeakPointers

Friends

class vtkObserver

Detailed Description

synchronizes renderers across processes.

vtkSynchronizedRenderers is used to synchronize renderers (vtkRenderer and subclasses) across processes for parallel rendering. It's designed to be used in conjunction with vtkSynchronizedRenderWindows to synchronize the render windows among those processes. This class handles synchronization of certain render parameters among the renderers such as viewport, camera parameters. It doesn't support compositing of rendered images across processes on its own. You typically either subclass to implement a compositing algorithm or use a renderer capable of compositing eg. IceT based renderer.

Tests:
vtkSynchronizedRenderers (Tests)

Definition at line 43 of file vtkSynchronizedRenderers.h.


Member Typedef Documentation

Reimplemented from vtkObject.

Reimplemented in vtkCompositedSynchronizedRenderers, and vtkClientServerSynchronizedRenderers.

Definition at line 47 of file vtkSynchronizedRenderers.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
SYNC_RENDERER_TAG 
RESET_CAMERA_TAG 
COMPUTE_BOUNDS_TAG 

Definition at line 125 of file vtkSynchronizedRenderers.h.


Constructor & Destructor Documentation

vtkSynchronizedRenderers::vtkSynchronizedRenderers ( )
protected
vtkSynchronizedRenderers::~vtkSynchronizedRenderers ( )
protected

Member Function Documentation

static vtkSynchronizedRenderers* vtkSynchronizedRenderers::New ( )
static

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

Reimplemented in vtkCompositedSynchronizedRenderers, and vtkClientServerSynchronizedRenderers.

virtual const char* vtkSynchronizedRenderers::GetClassName ( )
virtual
static int vtkSynchronizedRenderers::IsTypeOf ( const char *  name)
static

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkCompositedSynchronizedRenderers, and vtkClientServerSynchronizedRenderers.

virtual int vtkSynchronizedRenderers::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkCompositedSynchronizedRenderers, and vtkClientServerSynchronizedRenderers.

static vtkSynchronizedRenderers* vtkSynchronizedRenderers::SafeDownCast ( vtkObject o)
static
void vtkSynchronizedRenderers::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Reimplemented in vtkCompositedSynchronizedRenderers, and vtkClientServerSynchronizedRenderers.

virtual void vtkSynchronizedRenderers::SetRenderer ( vtkRenderer )
virtual

Set the renderer to be synchronized by this instance. A vtkSynchronizedRenderers instance can be used to synchronize exactly 1 renderer on each processes. You can create multiple instances on vtkSynchronizedRenderers to synchronize multiple renderers.

virtual vtkRenderer* vtkSynchronizedRenderers::GetRenderer ( )
virtual

Set the renderer to be synchronized by this instance. A vtkSynchronizedRenderers instance can be used to synchronize exactly 1 renderer on each processes. You can create multiple instances on vtkSynchronizedRenderers to synchronize multiple renderers.

virtual void vtkSynchronizedRenderers::SetParallelController ( vtkMultiProcessController )
virtual

Set the parallel message communicator. This is used to communicate among processes.

virtual vtkMultiProcessController* vtkSynchronizedRenderers::GetParallelController ( )
virtual

Set the parallel message communicator. This is used to communicate among processes.

virtual void vtkSynchronizedRenderers::SetParallelRendering ( bool  )
virtual

Enable/Disable parallel rendering. Unless Parallel rendering is on, the cameras won't be synchronized across processes.

virtual bool vtkSynchronizedRenderers::GetParallelRendering ( )
virtual

Enable/Disable parallel rendering. Unless Parallel rendering is on, the cameras won't be synchronized across processes.

virtual void vtkSynchronizedRenderers::ParallelRenderingOn ( )
virtual

Enable/Disable parallel rendering. Unless Parallel rendering is on, the cameras won't be synchronized across processes.

virtual void vtkSynchronizedRenderers::ParallelRenderingOff ( )
virtual

Enable/Disable parallel rendering. Unless Parallel rendering is on, the cameras won't be synchronized across processes.

virtual void vtkSynchronizedRenderers::SetImageReductionFactor ( int  )
virtual

Get/Set the image reduction factor.

virtual int vtkSynchronizedRenderers::GetImageReductionFactor ( )
virtual

Get/Set the image reduction factor.

virtual void vtkSynchronizedRenderers::SetWriteBackImages ( bool  )
virtual

If on (default), the rendered images are pasted back on to the screen. You should turn this flag off on processes that are not meant to be visible to the user.

virtual bool vtkSynchronizedRenderers::GetWriteBackImages ( )
virtual

If on (default), the rendered images are pasted back on to the screen. You should turn this flag off on processes that are not meant to be visible to the user.

virtual void vtkSynchronizedRenderers::WriteBackImagesOn ( )
virtual

If on (default), the rendered images are pasted back on to the screen. You should turn this flag off on processes that are not meant to be visible to the user.

virtual void vtkSynchronizedRenderers::WriteBackImagesOff ( )
virtual

If on (default), the rendered images are pasted back on to the screen. You should turn this flag off on processes that are not meant to be visible to the user.

virtual void vtkSynchronizedRenderers::SetRootProcessId ( int  )
virtual

Get/Set the root-process id. This is required when the ParallelController is a vtkSocketController. Set to 0 by default (which will not work when using a vtkSocketController but will work for vtkMPIController).

virtual int vtkSynchronizedRenderers::GetRootProcessId ( )
virtual

Get/Set the root-process id. This is required when the ParallelController is a vtkSocketController. Set to 0 by default (which will not work when using a vtkSocketController but will work for vtkMPIController).

void vtkSynchronizedRenderers::CollectiveExpandForVisiblePropBounds ( double  bounds[6])

Computes visible prob bounds. This must be called on all processes at the same time. The collective result is made available on all processes once this method returns. Note that this method requires that bounds is initialized to some value. This expands the bounds to include the prop bounds.

virtual void vtkSynchronizedRenderers::SetCaptureDelegate ( vtkSynchronizedRenderers )
virtual

When set, this->CaptureRenderedImage() does not capture image from the screen instead passes the call to the delegate.

virtual vtkSynchronizedRenderers* vtkSynchronizedRenderers::GetCaptureDelegate ( )
virtual

When set, this->CaptureRenderedImage() does not capture image from the screen instead passes the call to the delegate.

virtual void vtkSynchronizedRenderers::SetAutomaticEventHandling ( bool  )
virtual

When multiple groups of processes are synchronized together using different controllers, one needs to specify the order in which the various synchronizers execute. In such cases one starts with the outer most vtkSynchronizedRenderers, sets the dependent one as a CaptureDelegate on it and the turn off AutomaticEventHandling on the delegate.

virtual bool vtkSynchronizedRenderers::GetAutomaticEventHandling ( )
virtual

When multiple groups of processes are synchronized together using different controllers, one needs to specify the order in which the various synchronizers execute. In such cases one starts with the outer most vtkSynchronizedRenderers, sets the dependent one as a CaptureDelegate on it and the turn off AutomaticEventHandling on the delegate.

virtual void vtkSynchronizedRenderers::AutomaticEventHandlingOn ( )
virtual

When multiple groups of processes are synchronized together using different controllers, one needs to specify the order in which the various synchronizers execute. In such cases one starts with the outer most vtkSynchronizedRenderers, sets the dependent one as a CaptureDelegate on it and the turn off AutomaticEventHandling on the delegate.

virtual void vtkSynchronizedRenderers::AutomaticEventHandlingOff ( )
virtual

When multiple groups of processes are synchronized together using different controllers, one needs to specify the order in which the various synchronizers execute. In such cases one starts with the outer most vtkSynchronizedRenderers, sets the dependent one as a CaptureDelegate on it and the turn off AutomaticEventHandling on the delegate.

virtual void vtkSynchronizedRenderers::HandleStartRender ( )
protectedvirtual
virtual void vtkSynchronizedRenderers::HandleEndRender ( )
protectedvirtual
virtual void vtkSynchronizedRenderers::HandleAbortRender ( )
inlineprotectedvirtual

Definition at line 215 of file vtkSynchronizedRenderers.h.

virtual void vtkSynchronizedRenderers::MasterStartRender ( )
protectedvirtual
virtual void vtkSynchronizedRenderers::SlaveStartRender ( )
protectedvirtual
virtual void vtkSynchronizedRenderers::MasterEndRender ( )
protectedvirtual
virtual void vtkSynchronizedRenderers::SlaveEndRender ( )
protectedvirtual
virtual vtkRawImage& vtkSynchronizedRenderers::CaptureRenderedImage ( )
protectedvirtual

Can be used in HandleEndRender(), MasterEndRender() or SlaveEndRender() calls to capture the rendered image. If this->ImageReductionFactor, then the image will be capture in this->ReducedImage, otherwise it will be captured in this->FullImage (this->ReducedImage will be pointing to the same image).

void vtkSynchronizedRenderers::PushImageToScreen ( )
protected

Can be used in HandleEndRender(), MasterEndRender() or SlaveEndRender() calls to paste back the image from either this->ReducedImage or this->FullImage info the viewport.


Friends And Related Function Documentation

friend class vtkObserver
friend

Definition at line 254 of file vtkSynchronizedRenderers.h.


Member Data Documentation

vtkMultiProcessController* vtkSynchronizedRenderers::ParallelController
protected

Definition at line 223 of file vtkSynchronizedRenderers.h.

vtkRenderer* vtkSynchronizedRenderers::Renderer
protected

Definition at line 224 of file vtkSynchronizedRenderers.h.

vtkSynchronizedRenderers* vtkSynchronizedRenderers::CaptureDelegate
protected

Definition at line 238 of file vtkSynchronizedRenderers.h.

vtkRawImage vtkSynchronizedRenderers::ReducedImage
protected

Definition at line 239 of file vtkSynchronizedRenderers.h.

vtkRawImage vtkSynchronizedRenderers::FullImage
protected

Definition at line 240 of file vtkSynchronizedRenderers.h.

bool vtkSynchronizedRenderers::ParallelRendering
protected

Definition at line 242 of file vtkSynchronizedRenderers.h.

int vtkSynchronizedRenderers::ImageReductionFactor
protected

Definition at line 243 of file vtkSynchronizedRenderers.h.

bool vtkSynchronizedRenderers::WriteBackImages
protected

Definition at line 244 of file vtkSynchronizedRenderers.h.

int vtkSynchronizedRenderers::RootProcessId
protected

Definition at line 245 of file vtkSynchronizedRenderers.h.

bool vtkSynchronizedRenderers::AutomaticEventHandling
protected

Definition at line 246 of file vtkSynchronizedRenderers.h.


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