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

vtkAssembly.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAssembly.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 =========================================================================*/
00074 #ifndef __vtkAssembly_h
00075 #define __vtkAssembly_h
00076 
00077 #include "vtkProp3D.h"
00078 
00079 class vtkAssemblyPaths;
00080 class vtkProp3DCollection;
00081 class vtkMapper;
00082 class vtkProperty;
00083 class vtkActor;
00084 
00085 class VTK_RENDERING_EXPORT vtkAssembly : public vtkProp3D
00086 {
00087 public:
00088   static vtkAssembly *New();
00089 
00090   vtkTypeRevisionMacro(vtkAssembly,vtkProp3D);
00091   void PrintSelf(ostream& os, vtkIndent indent);
00092 
00094   void AddPart(vtkProp3D *);
00095 
00097   void RemovePart(vtkProp3D *);
00098 
00100   vtkProp3DCollection *GetParts();
00101 
00103 
00106   void GetActors(vtkPropCollection *);
00107   void GetVolumes(vtkPropCollection *);
00109 
00111 
00116   int RenderOpaqueGeometry(vtkViewport *ren);
00117   int RenderTranslucentGeometry(vtkViewport *ren);
00119 
00123   void ReleaseGraphicsResources(vtkWindow *);
00124 
00126 
00136   void InitPathTraversal();
00137   vtkAssemblyPath *GetNextPath();
00138   int GetNumberOfPaths();
00140 
00142 
00143   void GetBounds(double bounds[6]) {this->vtkProp3D::GetBounds( bounds );};
00144   double *GetBounds();
00146 
00149   unsigned long int GetMTime();
00150 
00152   void ShallowCopy(vtkProp *prop);
00153 
00154 //BTX
00159   void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00160 //ETX  
00161 
00162 protected:
00163   vtkAssembly();
00164   ~vtkAssembly();
00165 
00166   // Keep a list of direct descendants of the assembly hierarchy
00167   vtkProp3DCollection *Parts;
00168 
00169   // Support the BuildPaths() method. Caches last paths built for
00170   // performance.
00171   vtkTimeStamp PathTime;
00172   virtual void UpdatePaths(); //apply transformations and properties recursively
00173   
00174 private:
00175   vtkAssembly(const vtkAssembly&);  // Not implemented.
00176   void operator=(const vtkAssembly&);  // Not implemented.
00177 };
00178 
00180 inline vtkProp3DCollection *vtkAssembly::GetParts() {return this->Parts;}
00181 
00182 #endif
00183 
00184 
00185 
00186