00001 //============================================================================= 00002 // This file is part of VTKEdge. See vtkedge.org for more information. 00003 // 00004 // Copyright (c) 2010 Kitware, Inc. 00005 // 00006 // VTKEdge may be used under the terms of the BSD License 00007 // Please see the file Copyright.txt in the root directory of 00008 // VTKEdge for further information. 00009 // 00010 // Alternatively, you may see: 00011 // 00012 // http://www.vtkedge.org/vtkedge/project/license.html 00013 // 00014 // 00015 // For custom extensions, consulting services, or training for 00016 // this or any other Kitware supported open source project, please 00017 // contact Kitware at sales@kitware.com. 00018 // 00019 // 00020 //============================================================================= 00033 #ifndef __vtkKWEIlluminatedLinesPainter_h 00034 #define __vtkKWEIlluminatedLinesPainter_h 00035 00036 #include "vtkLinesPainter.h" 00037 #include "VTKEdgeConfigure.h" // include configuration header 00038 #include "vtkWeakPointer.h" // needed for vtkWeakPointer. 00039 00040 class vtkInformationIntegerKey; 00041 class vtkShaderProgram2; 00042 class vtkShader2; 00043 class vtkPainterPolyDataMapper; 00044 class vtkRenderWindow; 00045 class vtkWindow; 00046 00047 class VTKEdge_RENDERING_EXPORT vtkKWEIlluminatedLinesPainter : public vtkLinesPainter 00048 { 00049 public: 00050 static vtkKWEIlluminatedLinesPainter* New(); 00051 vtkTypeRevisionMacro(vtkKWEIlluminatedLinesPainter, vtkLinesPainter); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00058 virtual void ReleaseGraphicsResources(vtkWindow *); 00059 00061 static vtkInformationIntegerKey* ENABLE(); 00062 00065 static void UpdateMapper(vtkPainterPolyDataMapper* mapper); 00066 00068 00069 static bool IsSupported(vtkRenderWindow* renWin); 00070 //BTX 00071 protected: 00072 vtkKWEIlluminatedLinesPainter(); 00073 ~vtkKWEIlluminatedLinesPainter(); 00075 00078 virtual void ProcessInformation(vtkInformation*); 00079 00084 virtual void PrepareForRendering(vtkRenderer*, vtkActor*); 00085 00087 00089 virtual int RenderPrimitive(unsigned long flags, vtkDataArray* n, 00090 vtkUnsignedCharArray* c, vtkDataArray* t, vtkRenderer* ren); 00092 00093 vtkSetMacro(Enable, int); 00094 int Enable; 00095 vtkWeakPointer<vtkWindow> LastRenderWindow; 00096 vtkShaderProgram2* Program; 00097 vtkShader2* FragmentShader; 00098 00099 private: 00100 vtkKWEIlluminatedLinesPainter(const vtkKWEIlluminatedLinesPainter&); // Not implemented. 00101 void operator=(const vtkKWEIlluminatedLinesPainter&); // Not implemented. 00102 //ETX 00103 }; 00104 00105 00106 00107 #endif 00108
1.7.1