VTK
dox/Rendering/LOD/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 "vtkRenderingLODModule.h" // For export macro
00065 #include "vtkActor.h"
00066 
00067 class vtkMapper;
00068 class vtkMapperCollection;
00069 class vtkPolyDataAlgorithm;
00070 class vtkPolyDataMapper;
00071 class vtkRenderer;
00072 class vtkViewport;
00073 class vtkWindow;
00074 
00075 class VTKRENDERINGLOD_EXPORT vtkLODActor : public vtkActor
00076 {
00077 public:
00078   vtkTypeMacro(vtkLODActor, vtkActor);
00079   void PrintSelf(ostream& os, vtkIndent indent);
00080 
00084   static vtkLODActor* New();
00085 
00088   virtual void Render(vtkRenderer *, vtkMapper *);
00089 
00092   int RenderOpaqueGeometry(vtkViewport* viewport);
00093 
00097   void ReleaseGraphicsResources(vtkWindow*);
00098 
00101   void AddLODMapper(vtkMapper* mapper);
00102 
00104 
00107   virtual void SetLowResFilter(vtkPolyDataAlgorithm*);
00108   virtual void SetMediumResFilter(vtkPolyDataAlgorithm*);
00109   vtkGetObjectMacro(LowResFilter, vtkPolyDataAlgorithm);
00110   vtkGetObjectMacro(MediumResFilter, vtkPolyDataAlgorithm);
00112 
00114 
00115   vtkGetMacro(NumberOfCloudPoints, int);
00116   vtkSetMacro(NumberOfCloudPoints, int);
00118 
00120 
00122   vtkGetObjectMacro(LODMappers, vtkMapperCollection);
00124 
00127   void Modified();
00128 
00130   void ShallowCopy(vtkProp *prop);
00131 
00132 protected:
00133   vtkLODActor();
00134   ~vtkLODActor();
00135 
00136   vtkActor* Device;
00137   vtkMapperCollection* LODMappers;
00138 
00139   // We can create our own LOD filters. The default is to use a
00140   //
00141   vtkPolyDataAlgorithm* LowResFilter;
00142   vtkPolyDataAlgorithm* MediumResFilter;
00143   vtkPolyDataMapper* LowMapper;
00144   vtkPolyDataMapper* MediumMapper;
00145 
00146   vtkTimeStamp BuildTime;
00147   int NumberOfCloudPoints;
00148 
00149   virtual void CreateOwnLODs();
00150   virtual void UpdateOwnLODs();
00151   virtual void DeleteOwnLODs();
00152 
00153 private:
00154   vtkLODActor(const vtkLODActor&);  // Not implemented.
00155   void operator=(const vtkLODActor&);  // Not implemented.
00156 };
00157 
00158 #endif