VTK
dox/Rendering/vtkLODActor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkLODActor.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 =========================================================================*/
00061 #ifndef __vtkLODActor_h
00062 #define __vtkLODActor_h
00063 
00064 #include "vtkActor.h"
00065 
00066 class vtkMapper;
00067 class vtkMapperCollection;
00068 class vtkPolyDataAlgorithm;
00069 class vtkPolyDataMapper;
00070 class vtkRenderer;
00071 class vtkViewport;
00072 class vtkWindow;
00073 
00074 class VTK_RENDERING_EXPORT vtkLODActor : public vtkActor
00075 {
00076 public:
00077   vtkTypeMacro(vtkLODActor,vtkActor);
00078   void PrintSelf(ostream& os, vtkIndent indent);
00079 
00083   static vtkLODActor *New();
00084 
00087   virtual void Render(vtkRenderer *, vtkMapper *);
00088 
00091   int RenderOpaqueGeometry(vtkViewport *viewport);
00092 
00096   void ReleaseGraphicsResources(vtkWindow *);
00097 
00100   void AddLODMapper(vtkMapper *mapper);
00101   
00103 
00106   virtual void SetLowResFilter( vtkPolyDataAlgorithm * );
00107   virtual void SetMediumResFilter( vtkPolyDataAlgorithm * );
00108   vtkGetObjectMacro( LowResFilter,    vtkPolyDataAlgorithm );
00109   vtkGetObjectMacro( MediumResFilter, vtkPolyDataAlgorithm );
00111 
00113 
00114   vtkGetMacro(NumberOfCloudPoints,int);
00115   vtkSetMacro(NumberOfCloudPoints,int);
00117 
00119 
00121   vtkGetObjectMacro(LODMappers, vtkMapperCollection);
00123 
00126   void Modified();
00127   
00129   void ShallowCopy(vtkProp *prop);
00130 
00131 protected:
00132   vtkLODActor();
00133   ~vtkLODActor();
00134 
00135   vtkActor            *Device;
00136   vtkMapperCollection *LODMappers;
00137 
00138   // We can create our own LOD filters. The default is to use a 
00139   //
00140   vtkPolyDataAlgorithm  * LowResFilter;
00141   vtkPolyDataAlgorithm  * MediumResFilter;
00142   vtkPolyDataMapper     * LowMapper;
00143   vtkPolyDataMapper     * MediumMapper;
00144   
00145   vtkTimeStamp            BuildTime;
00146   int                     NumberOfCloudPoints;
00147 
00148   virtual void CreateOwnLODs();
00149   virtual void UpdateOwnLODs();
00150   virtual void DeleteOwnLODs();
00151 
00152 private:
00153   vtkLODActor(const vtkLODActor&);  // Not implemented.
00154   void operator=(const vtkLODActor&);  // Not implemented.
00155 };
00156 
00157 #endif
00158 
00159