VTK
dox/Rendering/vtkAssembly.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAssembly.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 =========================================================================*/
00062 #ifndef __vtkAssembly_h
00063 #define __vtkAssembly_h
00064 
00065 #include "vtkProp3D.h"
00066 
00067 class vtkAssemblyPaths;
00068 class vtkProp3DCollection;
00069 class vtkMapper;
00070 class vtkProperty;
00071 class vtkActor;
00072 
00073 class VTK_RENDERING_EXPORT vtkAssembly : public vtkProp3D
00074 {
00075 public:
00076   static vtkAssembly *New();
00077 
00078   vtkTypeMacro(vtkAssembly,vtkProp3D);
00079   void PrintSelf(ostream& os, vtkIndent indent);
00080 
00082   void AddPart(vtkProp3D *);
00083 
00085   void RemovePart(vtkProp3D *);
00086 
00088   vtkProp3DCollection *GetParts();
00089 
00091 
00094   void GetActors(vtkPropCollection *);
00095   void GetVolumes(vtkPropCollection *);
00097 
00099 
00104   int RenderOpaqueGeometry(vtkViewport *ren);
00105   virtual int RenderTranslucentPolygonalGeometry( vtkViewport *ren);
00106   virtual int RenderVolumetricGeometry( vtkViewport *ren);
00108   
00110   virtual int HasTranslucentPolygonalGeometry();
00111   
00115   void ReleaseGraphicsResources(vtkWindow *);
00116 
00118 
00128   void InitPathTraversal();
00129   vtkAssemblyPath *GetNextPath();
00130   int GetNumberOfPaths();
00132 
00134 
00135   void GetBounds(double bounds[6]) {this->vtkProp3D::GetBounds( bounds );};
00136   double *GetBounds();
00138 
00141   unsigned long int GetMTime();
00142 
00144   void ShallowCopy(vtkProp *prop);
00145 
00146 //BTX
00148 
00152   void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00153 //ETX  
00155 
00156 protected:
00157   vtkAssembly();
00158   ~vtkAssembly();
00159 
00160   // Keep a list of direct descendants of the assembly hierarchy
00161   vtkProp3DCollection *Parts;
00162 
00163   // Support the BuildPaths() method. Caches last paths built for
00164   // performance.
00165   vtkTimeStamp PathTime;
00166   virtual void UpdatePaths(); //apply transformations and properties recursively
00167   
00168 private:
00169   vtkAssembly(const vtkAssembly&);  // Not implemented.
00170   void operator=(const vtkAssembly&);  // Not implemented.
00171 };
00172 
00174 inline vtkProp3DCollection *vtkAssembly::GetParts() {return this->Parts;}
00175 
00176 #endif
00177 
00178 
00179 
00180