VTK
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkSynchronizedRenderers Class Reference

synchronizes renderers across processes. More...

#include <vtkSynchronizedRenderers.h>

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

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
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkSynchronizedRenderersNewInstance () const
 
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
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool 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)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(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 &)
 
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 (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 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 ()
 
virtual 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 &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkMultiProcessControllerParallelController
 
vtkOpenGLRendererRenderer
 
vtkSynchronizedRenderersCaptureDelegate
 
vtkRawImage ReducedImage
 
vtkRawImage FullImage
 
bool ParallelRendering
 
int ImageReductionFactor
 
bool WriteBackImages
 
int RootProcessId
 
bool AutomaticEventHandling
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 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 45 of file vtkSynchronizedRenderers.h.

Member Typedef Documentation

Definition at line 49 of file vtkSynchronizedRenderers.h.

Member Enumeration Documentation

anonymous enum
Enumerator
SYNC_RENDERER_TAG 
RESET_CAMERA_TAG 
COMPUTE_BOUNDS_TAG 

Definition at line 127 of file vtkSynchronizedRenderers.h.

Constructor & Destructor Documentation

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

Member Function Documentation

static vtkSynchronizedRenderers* vtkSynchronizedRenderers::New ( )
static
static int vtkSynchronizedRenderers::IsTypeOf ( const char *  type)
static
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 ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkSynchronizedRenderers::NewInstanceInternal ( ) const
protectedvirtual
vtkSynchronizedRenderers* vtkSynchronizedRenderers::NewInstance ( ) const
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.

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 220 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).

virtual void vtkSynchronizedRenderers::PushImageToScreen ( )
protectedvirtual

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 259 of file vtkSynchronizedRenderers.h.

Member Data Documentation

vtkMultiProcessController* vtkSynchronizedRenderers::ParallelController
protected

Definition at line 228 of file vtkSynchronizedRenderers.h.

vtkOpenGLRenderer* vtkSynchronizedRenderers::Renderer
protected

Definition at line 229 of file vtkSynchronizedRenderers.h.

vtkSynchronizedRenderers* vtkSynchronizedRenderers::CaptureDelegate
protected

Definition at line 243 of file vtkSynchronizedRenderers.h.

vtkRawImage vtkSynchronizedRenderers::ReducedImage
protected

Definition at line 244 of file vtkSynchronizedRenderers.h.

vtkRawImage vtkSynchronizedRenderers::FullImage
protected

Definition at line 245 of file vtkSynchronizedRenderers.h.

bool vtkSynchronizedRenderers::ParallelRendering
protected

Definition at line 247 of file vtkSynchronizedRenderers.h.

int vtkSynchronizedRenderers::ImageReductionFactor
protected

Definition at line 248 of file vtkSynchronizedRenderers.h.

bool vtkSynchronizedRenderers::WriteBackImages
protected

Definition at line 249 of file vtkSynchronizedRenderers.h.

int vtkSynchronizedRenderers::RootProcessId
protected

Definition at line 250 of file vtkSynchronizedRenderers.h.

bool vtkSynchronizedRenderers::AutomaticEventHandling
protected

Definition at line 251 of file vtkSynchronizedRenderers.h.


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