VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Core/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 "vtkRenderingCoreModule.h" // For export macro
00066 #include "vtkProp3D.h"
00067 
00068 class vtkAssemblyPaths;
00069 class vtkProp3DCollection;
00070 class vtkMapper;
00071 class vtkProperty;
00072 class vtkActor;
00073 
00074 class VTKRENDERINGCORE_EXPORT vtkAssembly : public vtkProp3D
00075 {
00076 public:
00077   static vtkAssembly *New();
00078 
00079   vtkTypeMacro(vtkAssembly, vtkProp3D);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081 
00083   void AddPart(vtkProp3D *);
00084 
00086   void RemovePart(vtkProp3D *);
00087 
00089 
00090   vtkProp3DCollection *GetParts()
00091     { return this->Parts; }
00093 
00095 
00098   void GetActors(vtkPropCollection *);
00099   void GetVolumes(vtkPropCollection *);
00101 
00103 
00108   int RenderOpaqueGeometry(vtkViewport *ren);
00109   virtual int RenderTranslucentPolygonalGeometry(vtkViewport *ren);
00110   virtual int RenderVolumetricGeometry(vtkViewport *ren);
00112 
00114   virtual int HasTranslucentPolygonalGeometry();
00115 
00119   void ReleaseGraphicsResources(vtkWindow *);
00120 
00122 
00132   void InitPathTraversal();
00133   vtkAssemblyPath *GetNextPath();
00134   int GetNumberOfPaths();
00136 
00138 
00139   void GetBounds(double bounds[6])
00140     { this->vtkProp3D::GetBounds( bounds ); }
00141   double *GetBounds();
00143 
00146   unsigned long int GetMTime();
00147 
00149   void ShallowCopy(vtkProp *prop);
00150 
00151 //BTX
00153 
00157   void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00158 //ETX
00160 
00161 protected:
00162   vtkAssembly();
00163   ~vtkAssembly();
00164 
00165   // Keep a list of direct descendants of the assembly hierarchy
00166   vtkProp3DCollection *Parts;
00167 
00168   // Support the BuildPaths() method. Caches last paths built for
00169   // performance.
00170   vtkTimeStamp PathTime;
00171   virtual void UpdatePaths(); //apply transformations and properties recursively
00172 
00173 private:
00174   vtkAssembly(const vtkAssembly&);  // Not implemented.
00175   void operator=(const vtkAssembly&);  // Not implemented.
00176 };
00177 
00178 #endif