00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPolyDataPainter.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 2004 Sandia Corporation. 00017 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00018 * license for use of this work by or on behalf of the 00019 * U.S. Government. Redistribution and use in source and binary forms, with 00020 * or without modification, are permitted provided that this Notice and any 00021 * statement of authorship are reproduced on all copies. 00022 */ 00023 00043 #ifndef __vtkPolyDataPainter_h 00044 #define __vtkPolyDataPainter_h 00045 00046 #include "vtkPainter.h" 00047 00048 class vtkInformationIntegerKey; 00049 class vtkInformationObjectBaseKey; 00050 class vtkPolyData; 00051 00052 class VTK_RENDERING_EXPORT vtkPolyDataPainter : public vtkPainter 00053 { 00054 public: 00055 vtkTypeRevisionMacro(vtkPolyDataPainter, vtkPainter); 00056 virtual void PrintSelf(ostream &os, vtkIndent indent); 00057 00059 vtkPolyData* GetInputAsPolyData(); 00060 00063 vtkPolyData* GetOutputAsPolyData(); 00064 00068 static vtkInformationIntegerKey* BUILD_NORMALS(); 00069 00071 static vtkInformationIntegerKey* DISABLE_SCALAR_COLOR(); 00072 00073 // Set the mapping between vtkPointData (vtkCellData) arrays and 00074 // generic vertex attributes. 00075 static vtkInformationObjectBaseKey* DATA_ARRAY_TO_VERTEX_ATTRIBUTE(); 00076 00078 00080 virtual void Render(vtkRenderer* renderer, vtkActor* actor, 00081 unsigned long typeflags, bool forceCompileOnly); 00083 00084 protected: 00085 vtkPolyDataPainter(); 00086 ~vtkPolyDataPainter(); 00087 00088 int BuildNormals; // ivar synchornized with this->Information before 00089 // RenderInternal() is called. The ivar are purposefully protected, 00090 // the only way to affecting these from outside should be using 00091 // the information object. 00092 vtkSetMacro(BuildNormals, int); 00093 00096 virtual void ProcessInformation(vtkInformation*); 00097 00098 private: 00099 vtkPolyDataPainter(const vtkPolyDataPainter &); // Not implemented. 00100 void operator=(const vtkPolyDataPainter &); // Not implemented. 00101 }; 00102 00103 #endif //_vtkPolyDataPainter_h