VTK
dox/Rendering/HybridOpenGL/vtkSurfaceLICPainter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSurfaceLICPainter.h
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 =========================================================================*/
00027 #ifndef __vtkSurfaceLICPainter_h
00028 #define __vtkSurfaceLICPainter_h
00029 
00030 #include "vtkRenderingHybridOpenGLModule.h" // For export macro
00031 #include "vtkPainter.h"
00032 
00033 class vtkRenderWindow;
00034 
00035 class VTKRENDERINGHYBRIDOPENGL_EXPORT vtkSurfaceLICPainter : public vtkPainter
00036 {
00037 public:
00038   static vtkSurfaceLICPainter* New();
00039   vtkTypeMacro(vtkSurfaceLICPainter, vtkPainter);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00045   virtual void ReleaseGraphicsResources(vtkWindow *);
00046 
00051   virtual vtkDataObject* GetOutput();
00052 
00054 
00055   vtkSetMacro(Enable, int);
00056   vtkGetMacro(Enable, int);
00057   vtkBooleanMacro(Enable, int);
00059 
00061 
00065   void SetInputArrayToProcess(int fieldAssociation, const char *name);
00066   void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
00068 
00070 
00076   vtkSetMacro( EnhancedLIC, int );
00077   vtkGetMacro( EnhancedLIC, int );
00078   vtkBooleanMacro( EnhancedLIC, int );
00080 
00082 
00083   vtkSetMacro(NumberOfSteps, int);
00084   vtkGetMacro(NumberOfSteps, int);
00086 
00088 
00089   vtkSetMacro(StepSize, double);
00090   vtkGetMacro(StepSize, double);
00092 
00094 
00097   vtkSetClampMacro(LICIntensity, double, 0.0, 1.0);
00098   vtkGetMacro(LICIntensity, double);
00100 
00102 
00103   int GetRenderingPreparationSuccess()
00104       { return this->RenderingPreparationSuccess; }
00106 
00108   int GetLICSuccess() { return this->LICSuccess; }
00109 
00111 
00113   static bool IsSupported(vtkRenderWindow*);
00114 //BTX
00115 protected:
00116   vtkSurfaceLICPainter();
00117   ~vtkSurfaceLICPainter();
00119 
00121   void GetBounds(vtkDataObject* data, double bounds[6]);
00122 
00124   virtual void ReportReferences(vtkGarbageCollector *collector);
00125 
00130   virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
00131 
00133 
00138   virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
00139                               unsigned long typeflags, bool forceCompileOnly);
00141 
00143 
00144   bool PrepareOutput();
00145   bool FixTCoords(vtkDataSet* ds);
00147 
00149   bool CanRenderLIC(vtkRenderer*, vtkActor*);
00150 
00151   // Unit is a pixel length.
00152   int    NumberOfSteps;
00153   double StepSize;
00154 
00155   int    Enable;
00156   int    EnhancedLIC;
00157   int    RenderingPreparationSuccess;
00158   int    LICSuccess;
00159   double LICIntensity;
00160 
00161 private:
00162   vtkSurfaceLICPainter(const vtkSurfaceLICPainter&); // Not implemented.
00163   void operator=(const vtkSurfaceLICPainter&); // Not implemented.
00164 
00165   vtkDataObject* Output;
00166   class vtkInternals;
00167   vtkInternals* Internals;
00168 //ETX
00169 };
00170 
00171 #endif