ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkPVView Class Referenceabstract

baseclass for all ParaView views. More...

#include <vtkPVView.h>

Inheritance diagram for vtkPVView:
Inheritance graph
[legend]
Collaboration diagram for vtkPVView:
Collaboration graph
[legend]

Public Types

enum  { ViewTimeChangedEvent = 9000 }
 
typedef vtkView Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void Initialize (unsigned int id)
 Initialize the view with an identifier. More...
 
virtual void StillRender ()=0
 Triggers a high-resolution render. More...
 
virtual void InteractiveRender ()=0
 Triggers a interactive render. More...
 
virtual void Update ()
 Overridden to not call Update() directly on the input representations, instead use ProcessViewRequest() for all vtkPVDataRepresentations. More...
 
bool InTileDisplayMode ()
 Returns true if the application is currently in tile display mode. More...
 
bool InCaveDisplayMode ()
 Returns true if the application is currently in cave/immersive display mode. More...
 
bool GetLocalProcessSupportsInteraction ()
 Returns true if the local process can support interaction. More...
 
virtual unsigned int GetIdentifier ()
 
virtual void SetPosition (int, int)
 Set the position on this view in the multiview configuration. More...
 
virtual int * GetPosition ()
 Set the position on this view in the multiview configuration. More...
 
virtual void GetPosition (int &, int &)
 Set the position on this view in the multiview configuration. More...
 
virtual void GetPosition (int [2])
 Set the position on this view in the multiview configuration. More...
 
virtual void SetSize (int, int)
 Set the size of this view in the multiview configuration. More...
 
virtual int * GetSize ()
 Set the size of this view in the multiview configuration. More...
 
virtual void GetSize (int &, int &)
 Set the size of this view in the multiview configuration. More...
 
virtual void GetSize (int [2])
 Set the size of this view in the multiview configuration. More...
 
bool SynchronizeBounds (double bounds[6])
 This encapsulates a whole lot of logic for communication between processes. More...
 
bool SynchronizeSize (double &size)
 This encapsulates a whole lot of logic for communication between processes. More...
 
bool SynchronizeSize (unsigned int &size)
 This encapsulates a whole lot of logic for communication between processes. More...
 
virtual void SetViewTime (double value)
 Get/Set the time this view is showing. More...
 
virtual double GetViewTime ()
 Get/Set the time this view is showing. More...
 
virtual void SetCacheKey (double)
 Get/Set the cache key. More...
 
virtual double GetCacheKey ()
 Get/Set the cache key. More...
 
virtual void SetUseCache (bool)
 Get/Set whether caching is enabled. More...
 
virtual bool GetUseCache ()
 Get/Set whether caching is enabled. More...
 
virtual void PrepareForScreenshot ()
 These methods are used to setup the view for capturing screen shots. More...
 
virtual void CleanupAfterScreenshot ()
 These methods are used to setup the view for capturing screen shots. More...
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPVViewSafeDownCast (vtkObject *o)
 
static void SetEnableStreaming (bool)
 
static bool GetEnableStreaming ()
 
static vtkInformationObjectBaseKey * VIEW ()
 Key used to pass the vtkPVView pointer to the representation during any of the view passes such as REQUEST_UPDATE(), REQUEST_UPDATE_LOD(), REQUEST_RENDER(), etc. More...
 
static vtkInformationRequestKey * REQUEST_UPDATE ()
 This is a Update-Data pass. More...
 
static vtkInformationRequestKey * REQUEST_UPDATE_LOD ()
 This is a Update-LOD-Data pass. More...
 
static vtkInformationRequestKey * REQUEST_RENDER ()
 This is a render pass. More...
 

Protected Member Functions

 vtkPVView ()
 
 ~vtkPVView ()
 
virtual void AddRepresentationInternal (vtkDataRepresentation *rep)
 Overridden to check that the representation has View setup properly. More...
 

Protected Attributes

vtkPVSynchronizedRenderWindowsSynchronizedWindows
 
unsigned int Identifier
 Every view gets a unique identifier that it uses to register itself with the SynchronizedWindows. More...
 
double CacheKey
 
bool UseCache
 
int Size [2]
 
int Position [2]
 
vtkInformation * RequestInformation
 These are passed as arguments to vtkDataRepresentation::ProcessViewRequest(). More...
 
vtkInformationVector * ReplyInformationVector
 These are passed as arguments to vtkDataRepresentation::ProcessViewRequest(). More...
 
double ViewTime
 Subclasses can use this method to trigger a pass on all representations. More...
 
void CallProcessViewRequest (vtkInformationRequestKey *passType, vtkInformation *request, vtkInformationVector *reply)
 Subclasses can use this method to trigger a pass on all representations. More...
 

Detailed Description

baseclass for all ParaView views.

vtkPVView adds API to vtkView for ParaView specific views. Typically, one writes a simple vtkView subclass for their custom view. Then one subclasses vtkPVView to use their own vtkView subclass with added support for parallel rendering, tile-displays and client-server. Even if the view is client-only view, it needs to address these other configuration gracefully.

Definition at line 38 of file vtkPVView.h.

Member Typedef Documentation

◆ Superclass

typedef vtkView vtkPVView::Superclass

Definition at line 41 of file vtkPVView.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ViewTimeChangedEvent 

Definition at line 47 of file vtkPVView.h.

Constructor & Destructor Documentation

◆ vtkPVView()

vtkPVView::vtkPVView ( )
protected

◆ ~vtkPVView()

vtkPVView::~vtkPVView ( )
protected

Member Function Documentation

◆ GetClassName()

virtual const char* vtkPVView::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkPVView::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkPVView::IsA ( const char *  type)
virtual

◆ SafeDownCast()

static vtkPVView* vtkPVView::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

void vtkPVView::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ SetEnableStreaming()

static void vtkPVView::SetEnableStreaming ( bool  )
static

◆ GetEnableStreaming()

static bool vtkPVView::GetEnableStreaming ( )
static

◆ Initialize()

virtual void vtkPVView::Initialize ( unsigned int  id)
virtual

Initialize the view with an identifier.

Unless noted otherwise, this method must be called before calling any other methods on this class.

Reimplemented in vtkPVRenderView, vtkPVContextView, and vtkPVOrthographicSliceView.

◆ SetPosition()

virtual void vtkPVView::SetPosition ( int  ,
int   
)
virtual

Set the position on this view in the multiview configuration.

This can be called only after Initialize().

Reimplemented in vtkPVRenderView.

◆ GetPosition() [1/3]

virtual int* vtkPVView::GetPosition ( )
virtual

Set the position on this view in the multiview configuration.

This can be called only after Initialize().

◆ GetPosition() [2/3]

virtual void vtkPVView::GetPosition ( int &  ,
int &   
)
virtual

Set the position on this view in the multiview configuration.

This can be called only after Initialize().

◆ GetPosition() [3/3]

virtual void vtkPVView::GetPosition ( int  [2])
virtual

Set the position on this view in the multiview configuration.

This can be called only after Initialize().

◆ SetSize()

virtual void vtkPVView::SetSize ( int  ,
int   
)
virtual

Set the size of this view in the multiview configuration.

This can be called only after Initialize().

Reimplemented in vtkPVRenderView.

◆ GetSize() [1/3]

virtual int* vtkPVView::GetSize ( )
virtual

Set the size of this view in the multiview configuration.

This can be called only after Initialize().

◆ GetSize() [2/3]

virtual void vtkPVView::GetSize ( int &  ,
int &   
)
virtual

Set the size of this view in the multiview configuration.

This can be called only after Initialize().

◆ GetSize() [3/3]

virtual void vtkPVView::GetSize ( int  [2])
virtual

Set the size of this view in the multiview configuration.

This can be called only after Initialize().

◆ StillRender()

virtual void vtkPVView::StillRender ( )
pure virtual

Triggers a high-resolution render.

Implemented in vtkPVRenderView, vtkPythonView, vtkSpreadSheetView, and vtkPVContextView.

◆ InteractiveRender()

virtual void vtkPVView::InteractiveRender ( )
pure virtual

Triggers a interactive render.

Based on the settings on the view, this may result in a low-resolution rendering or a simplified geometry rendering.

Implemented in vtkPVRenderView, vtkPythonView, vtkSpreadSheetView, and vtkPVContextView.

◆ SynchronizeBounds()

bool vtkPVView::SynchronizeBounds ( double  bounds[6])

This encapsulates a whole lot of logic for communication between processes.

Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

◆ SynchronizeSize() [1/2]

bool vtkPVView::SynchronizeSize ( double &  size)

This encapsulates a whole lot of logic for communication between processes.

Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

◆ SynchronizeSize() [2/2]

bool vtkPVView::SynchronizeSize ( unsigned int &  size)

This encapsulates a whole lot of logic for communication between processes.

Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

◆ SetViewTime()

virtual void vtkPVView::SetViewTime ( double  value)
virtual

Get/Set the time this view is showing.

Whenever time is changed, this fires a ViewTimeChangedEvent event.

◆ GetViewTime()

virtual double vtkPVView::GetViewTime ( )
virtual

Get/Set the time this view is showing.

Whenever time is changed, this fires a ViewTimeChangedEvent event.

◆ SetCacheKey()

virtual void vtkPVView::SetCacheKey ( double  )
virtual

Get/Set the cache key.

When caching is enabled, this key is used to identify what geometry cache to use for the current render. It is passed on to the representations in vtkPVView::Update(). The CacheKey is respected only when UseCache is true.

◆ GetCacheKey()

virtual double vtkPVView::GetCacheKey ( )
virtual

Get/Set the cache key.

When caching is enabled, this key is used to identify what geometry cache to use for the current render. It is passed on to the representations in vtkPVView::Update(). The CacheKey is respected only when UseCache is true.

◆ SetUseCache()

virtual void vtkPVView::SetUseCache ( bool  )
virtual

Get/Set whether caching is enabled.

◆ GetUseCache()

virtual bool vtkPVView::GetUseCache ( )
virtual

Get/Set whether caching is enabled.

◆ PrepareForScreenshot()

virtual void vtkPVView::PrepareForScreenshot ( )
virtual

These methods are used to setup the view for capturing screen shots.

◆ CleanupAfterScreenshot()

virtual void vtkPVView::CleanupAfterScreenshot ( )
virtual

These methods are used to setup the view for capturing screen shots.

◆ VIEW()

static vtkInformationObjectBaseKey* vtkPVView::VIEW ( )
static

Key used to pass the vtkPVView pointer to the representation during any of the view passes such as REQUEST_UPDATE(), REQUEST_UPDATE_LOD(), REQUEST_RENDER(), etc.

◆ REQUEST_UPDATE()

static vtkInformationRequestKey* vtkPVView::REQUEST_UPDATE ( )
static

This is a Update-Data pass.

All representations are expected to update their inputs and prepare geometries for rendering. All heavy work that has to happen only when input-data changes can be done in this pass. This is the first pass.

◆ REQUEST_UPDATE_LOD()

static vtkInformationRequestKey* vtkPVView::REQUEST_UPDATE_LOD ( )
static

This is a Update-LOD-Data pass.

All representations are expected to update their lod-data, if any. This is assured to be called only after REQUEST_UPDATE() pass.

◆ REQUEST_RENDER()

static vtkInformationRequestKey* vtkPVView::REQUEST_RENDER ( )
static

This is a render pass.

This is called for every render, hence representations should not do any work that doesn't depend on things that could change every render.

◆ Update()

virtual void vtkPVView::Update ( )
virtual

Overridden to not call Update() directly on the input representations, instead use ProcessViewRequest() for all vtkPVDataRepresentations.

Reimplemented in vtkPVRenderView, vtkPVXYChartView, vtkPVContextView, vtkSpreadSheetView, vtkPVOrthographicSliceView, vtkPythonView, and vtkPVMultiSliceView.

◆ InTileDisplayMode()

bool vtkPVView::InTileDisplayMode ( )

Returns true if the application is currently in tile display mode.

◆ InCaveDisplayMode()

bool vtkPVView::InCaveDisplayMode ( )

Returns true if the application is currently in cave/immersive display mode.

◆ GetLocalProcessSupportsInteraction()

bool vtkPVView::GetLocalProcessSupportsInteraction ( )

Returns true if the local process can support interaction.

This will return true only on the client node e.g. Qt client (or pvpython) when connected to builtin or remote server. On server nodes this will return false. CAVEAT: Currently this returns true on root node on batch and false on all other nodes. In reality batch processes should not support interaction. Due to a bug in vtkPVAxesWidget, if there's no interactor, the batch mode ends up missing the orientation widget and hence rendering differently than pvpython. To avoid that, this method curretly returns true on the root node in batch mode. This will however change in the future once vtkPVAxesWidget has been cleaned up.

◆ GetIdentifier()

virtual unsigned int vtkPVView::GetIdentifier ( )
virtual

◆ AddRepresentationInternal()

virtual void vtkPVView::AddRepresentationInternal ( vtkDataRepresentation *  rep)
protectedvirtual

Overridden to check that the representation has View setup properly.

Older implementations of vtkPVDataRepresentations::AddToView() subclasses didn't call the superclass implementations. We check that that's not the case and warn.

Reimplemented in vtkPVRenderView.

◆ CallProcessViewRequest()

void vtkPVView::CallProcessViewRequest ( vtkInformationRequestKey *  passType,
vtkInformation *  request,
vtkInformationVector *  reply 
)
protected

Subclasses can use this method to trigger a pass on all representations.

Member Data Documentation

◆ SynchronizedWindows

vtkPVSynchronizedRenderWindows* vtkPVView::SynchronizedWindows
protected

Definition at line 231 of file vtkPVView.h.

◆ Identifier

unsigned int vtkPVView::Identifier
protected

Every view gets a unique identifier that it uses to register itself with the SynchronizedWindows.

This is set in Initialize().

Definition at line 237 of file vtkPVView.h.

◆ RequestInformation

vtkInformation* vtkPVView::RequestInformation
protected

These are passed as arguments to vtkDataRepresentation::ProcessViewRequest().

This avoid repeated creation and deletion of vtkInformation objects.

Definition at line 245 of file vtkPVView.h.

◆ ReplyInformationVector

vtkInformationVector* vtkPVView::ReplyInformationVector
protected

These are passed as arguments to vtkDataRepresentation::ProcessViewRequest().

This avoid repeated creation and deletion of vtkInformation objects.

Definition at line 246 of file vtkPVView.h.

◆ ViewTime

double vtkPVView::ViewTime
protected

Subclasses can use this method to trigger a pass on all representations.

Definition at line 255 of file vtkPVView.h.

◆ CacheKey

double vtkPVView::CacheKey
protected

Definition at line 258 of file vtkPVView.h.

◆ UseCache

bool vtkPVView::UseCache
protected

Definition at line 259 of file vtkPVView.h.

◆ Size

int vtkPVView::Size[2]
protected

Definition at line 261 of file vtkPVView.h.

◆ Position

int vtkPVView::Position[2]
protected

Definition at line 262 of file vtkPVView.h.


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