VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkRenderView.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00036 #ifndef __vtkRenderView_h 00037 #define __vtkRenderView_h 00038 00039 #include "vtkView.h" 00040 00041 class vtkInteractorStyle; 00042 class vtkRenderer; 00043 class vtkRenderWindow; 00044 class vtkViewTheme; 00045 00046 class VTK_VIEWS_EXPORT vtkRenderView : public vtkView 00047 { 00048 public: 00049 static vtkRenderView *New(); 00050 vtkTypeRevisionMacro(vtkRenderView, vtkView); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00055 vtkGetObjectMacro(Renderer, vtkRenderer); 00057 00061 virtual void SetupRenderWindow(vtkRenderWindow* win); 00062 00064 vtkRenderWindow* GetRenderWindow(); 00065 00067 virtual void ApplyViewTheme(vtkViewTheme* theme); 00068 00070 virtual void Update(); 00071 00072 //BTX 00073 enum { 00074 SURFACE = 0, 00075 FRUSTUM = 1 00076 }; 00077 //ETX 00078 vtkSetClampMacro(SelectionMode, int, 0, 1); 00079 vtkGetMacro(SelectionMode, int); 00080 void SetSelectionModeToSurface() { this->SetSelectionMode(SURFACE); } 00081 void SetSelectionModeToFrustum() { this->SetSelectionMode(FRUSTUM); } 00082 00083 protected: 00084 vtkRenderView(); 00085 ~vtkRenderView(); 00086 00088 00091 virtual void ProcessEvents(vtkObject* caller, unsigned long eventId, 00092 void* callData); 00094 00096 virtual void PrepareForRendering() { } 00097 00099 00100 virtual void RepresentationSelectionChanged( 00101 vtkDataRepresentation* rep, 00102 vtkSelection* selection); 00104 00106 00107 vtkGetObjectMacro(InteractorStyle, vtkInteractorStyle); 00108 virtual void SetInteractorStyle(vtkInteractorStyle* style); 00110 00111 vtkRenderer* Renderer; 00112 vtkInteractorStyle* InteractorStyle; 00113 int SelectionMode; 00114 00115 private: 00116 vtkRenderView(const vtkRenderView&); // Not implemented. 00117 void operator=(const vtkRenderView&); // Not implemented. 00118 }; 00119 00120 #endif