Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00066 #ifndef __vtkAssembly_h
00067 #define __vtkAssembly_h
00068 
00069 #include "vtkProp3D.h"
00070 
00071 class vtkAssemblyPaths;
00072 class vtkProp3DCollection;
00073 class vtkMapper;
00074 class vtkProperty;
00075 class vtkActor;
00076 
00077 class VTK_RENDERING_EXPORT vtkAssembly : public vtkProp3D
00078 {
00079 public:
00080   static vtkAssembly *New();
00081 
00082   vtkTypeRevisionMacro(vtkAssembly,vtkProp3D);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00084 
00086   void AddPart(vtkProp3D *);
00087 
00089   void RemovePart(vtkProp3D *);
00090 
00092   vtkProp3DCollection *GetParts();
00093 
00095 
00098   void GetActors(vtkPropCollection *);
00099   void GetVolumes(vtkPropCollection *);
00101 
00103 
00108   int RenderOpaqueGeometry(vtkViewport *ren);
00109   int RenderTranslucentGeometry(vtkViewport *ren);
00111 
00115   void ReleaseGraphicsResources(vtkWindow *);
00116 
00118 
00128   void InitPathTraversal();
00129   vtkAssemblyPath *GetNextPath();
00130   int GetNumberOfPaths();
00132 
00134 
00135   void GetBounds(float bounds[6]) {this->vtkProp3D::GetBounds( bounds );};
00136   float *GetBounds();
00138 
00141   unsigned long int GetMTime();
00142 
00144   void ShallowCopy(vtkProp *prop);
00145 
00146 //BTX
00151   void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00152 //ETX  
00153 
00154 protected:
00155   vtkAssembly();
00156   ~vtkAssembly();
00157 
00158   // Keep a list of direct descendants of the assembly hierarchy
00159   vtkProp3DCollection *Parts;
00160 
00161   // Support the BuildPaths() method. Caches last paths built for
00162   // performance.
00163   vtkTimeStamp PathTime;
00164   virtual void UpdatePaths(); //apply transformations and properties recursively
00165   
00166 private:
00167   vtkAssembly(const vtkAssembly&);  // Not implemented.
00168   void operator=(const vtkAssembly&);  // Not implemented.
00169 };
00170 
00172 inline vtkProp3DCollection *vtkAssembly::GetParts() {return this->Parts;}
00173 
00174 #endif
00175 
00176 
00177 
00178