00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDataRepresentation.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 -------------------------------------------------------------------------*/ 00055 #ifndef __vtkDataRepresentation_h 00056 #define __vtkDataRepresentation_h 00057 00058 #include "vtkObject.h" 00059 00060 class vtkAlgorithmOutput; 00061 class vtkDataObject; 00062 class vtkSelection; 00063 class vtkSelectionLink; 00064 class vtkView; 00065 00066 class VTK_VIEWS_EXPORT vtkDataRepresentation : public vtkObject 00067 { 00068 public: 00069 static vtkDataRepresentation *New(); 00070 vtkTypeRevisionMacro(vtkDataRepresentation, vtkObject); 00071 void PrintSelf(ostream& os, vtkIndent indent); 00072 00075 void SetInput(vtkDataObject* input); 00076 00078 00081 virtual void SetInputConnection(vtkAlgorithmOutput* conn); 00082 vtkGetObjectMacro(InputConnection, vtkAlgorithmOutput); 00084 00090 void Select(vtkView* view, vtkSelection* selection); 00091 00094 void UpdateSelection(vtkSelection* selection); 00095 00097 00101 vtkGetObjectMacro(SelectionLink, vtkSelectionLink); 00102 virtual void SetSelectionLink(vtkSelectionLink* link); 00104 00105 protected: 00106 vtkDataRepresentation(); 00107 ~vtkDataRepresentation(); 00108 00112 virtual bool AddToView(vtkView* vtkNotUsed(view)) { return true; } 00113 00117 virtual bool RemoveFromView(vtkView* vtkNotUsed(view)) { return true; } 00118 00125 virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection); 00126 00127 // The input connection. 00128 vtkAlgorithmOutput* InputConnection; 00129 00130 // The linked selection. 00131 vtkSelectionLink* SelectionLink; 00132 00133 //BTX 00134 friend class vtkView; 00135 //ETX 00136 00137 private: 00138 vtkDataRepresentation(const vtkDataRepresentation&); // Not implemented. 00139 void operator=(const vtkDataRepresentation&); // Not implemented. 00140 }; 00141 00142 #endif