1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkRenderView.h,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*----------------------------------------------------------------------------
Copyright (c) Sandia Corporation
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
----------------------------------------------------------------------------*/
// .NAME vtkRenderView - A view containing a renderer.
//
// .SECTION Description
// vtkRenderView is a view which contains a vtkRenderer. You may add vtkActors
// directly to the renderer, or add certain vtkDataRepresentation subclasses
// to the renderer. The render view supports drag selection with the mouse to
// select cells.
//
// This class is also the parent class for any more specialized view which uses
// a renderer.
#ifndef __vtkRenderView_h
#define __vtkRenderView_h
#include "vtkView.h"
class vtkInteractorStyle;
class vtkRenderer;
class vtkRenderWindow;
class vtkViewTheme;
class VTK_VIEWS_EXPORT vtkRenderView : public vtkView
{
public:
static vtkRenderView *New();
vtkTypeRevisionMacro(vtkRenderView, vtkView);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Gets the renderer for this view.
vtkGetObjectMacro(Renderer, vtkRenderer);
// Description:
// Set up a render window to use this view.
// The superclass adds the renderer to the render window.
// Subclasses should override this to set interactor, etc.
virtual void SetupRenderWindow(vtkRenderWindow* win);
// Description:
// Get a handle to the render window.
vtkRenderWindow* GetRenderWindow();
// Description:
// Apply a theme to the view.
virtual void ApplyViewTheme(vtkViewTheme* theme);
// Description:
// Update the view.
virtual void Update();
protected:
vtkRenderView();
~vtkRenderView();
// Description:
// Called to process events.
// Captures StartEvent events from the renderer and calls Update().
// This may be overridden by subclasses to process additional events.
virtual void ProcessEvents(vtkObject* caller, unsigned long eventId,
void* callData);
// Description:
// Called by the view when the renderer is about to render.
virtual void PrepareForRendering() { }
// Description:
// Called when a representation's selection changed.
virtual void RepresentationSelectionChanged(
vtkDataRepresentation* rep,
vtkSelection* selection);
// Description:
// Allow subclasses to change the interactor style.
vtkGetObjectMacro(InteractorStyle, vtkInteractorStyle);
void SetInteractorStyle(vtkInteractorStyle* style);
vtkRenderer* Renderer;
vtkInteractorStyle* InteractorStyle;
private:
vtkRenderView(const vtkRenderView&); // Not implemented.
void operator=(const vtkRenderView&); // Not implemented.
};
#endif
|