Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkActor.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 =========================================================================*/
00050 #ifndef __vtkActor_h
00051 #define __vtkActor_h
00052 
00053 #include "vtkProp3D.h"
00054 
00055 class vtkRenderer;
00056 class vtkPropCollection;
00057 class vtkActorCollection;
00058 class vtkTexture;
00059 class vtkMapper;
00060 class vtkProperty;
00061 
00062 class VTK_RENDERING_EXPORT vtkActor : public vtkProp3D
00063 {
00064 public:
00065   vtkTypeRevisionMacro(vtkActor,vtkProp3D);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00071   static vtkActor *New();
00072 
00076   virtual void GetActors(vtkPropCollection *);
00077 
00079 
00080   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
00081   virtual int RenderTranslucentGeometry(vtkViewport *viewport);
00083 
00089   virtual void Render(vtkRenderer *, vtkMapper *) {};
00090 
00092   void ShallowCopy(vtkProp *prop);
00093 
00097   void ReleaseGraphicsResources(vtkWindow *);
00098 
00100 
00105   void SetProperty(vtkProperty *lut);
00106   vtkProperty *GetProperty();
00108   
00112   virtual vtkProperty* MakeProperty();
00113 
00115 
00119   void SetBackfaceProperty(vtkProperty *lut);
00120   vtkProperty *GetBackfaceProperty();
00122 
00124 
00127   virtual void SetTexture(vtkTexture*);
00128   vtkGetObjectMacro(Texture,vtkTexture);
00130 
00135   virtual void SetMapper(vtkMapper *);
00136 
00138 
00139   vtkGetObjectMacro(Mapper,vtkMapper);
00141 
00143 
00146   void GetBounds(double bounds[6]) {this->vtkProp3D::GetBounds( bounds );};
00147   double *GetBounds();
00149 
00156   virtual void ApplyProperties() {return;};
00157 
00159   unsigned long int GetMTime();
00160   
00165   virtual unsigned long GetRedrawMTime();
00166 
00168 
00172   virtual void InitPartTraversal();
00173   virtual vtkActor *GetNextPart();
00174   virtual int GetNumberOfParts();
00176   
00177 protected:
00178   vtkActor();
00179   ~vtkActor();
00180 
00181   vtkProperty *Property; 
00182   vtkProperty *BackfaceProperty; 
00183   vtkTexture *Texture; 
00184   vtkMapper *Mapper;
00185 
00186   // is this actor opaque
00187   int GetIsOpaque();
00188   
00189   // Bounds are cached in an actor - the MapperBounds are also cache to
00190   // help know when the Bounds need to be recomputed.
00191   double       MapperBounds[6];
00192   vtkTimeStamp BoundsMTime;
00193 
00194 private:
00195   vtkActor(const vtkActor&);  // Not implemented.
00196   void operator=(const vtkActor&);  // Not implemented.
00197 };
00198 
00199 #endif
00200