Rendering/vtkActorCollection.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Rendering/vtkActorCollection.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkActorCollection.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 =========================================================================*/
    00045 #ifndef __vtkActorC_h
    00046 #define __vtkActorC_h
    00047
    00048 #include "vtkPropCollection.h"
    00049 #include "vtkActor.h" // For inline methods
    00050
    00051 class vtkProperty;
    00052
    00053 class VTK_RENDERING_EXPORT vtkActorCollection : public vtkPropCollection
    00054 {
    00055 public:
    00056   static vtkActorCollection *New();
    00057   vtkTypeRevisionMacro(vtkActorCollection,vtkPropCollection);
    00058   virtual void PrintSelf(ostream& os, vtkIndent indent);
    00059
    00061   void AddItem(vtkActor *a);
    00062
    00064   vtkActor *GetNextActor();
    00065
    00067   vtkActor *GetLastActor();
    00068
    00070
    00073   vtkActor *GetNextItem();
    00074   vtkActor *GetLastItem();
    00076
    00078   void ApplyProperties(vtkProperty *p);
    00079
    00080 protected:
    00081   vtkActorCollection() {};
    00082   ~vtkActorCollection() {};
    00083
    00084
    00085 private:
    00086   // hide the standard AddItem from the user and the compiler.
    00087   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
    00088   void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
    00089
    00090 private:
    00091   vtkActorCollection(const vtkActorCollection&);  // Not implemented.
    00092   void operator=(const vtkActorCollection&);  // Not implemented.
    00093 };
    00094
    00095 inline void vtkActorCollection::AddItem(vtkActor *a)
    00096 {
    00097   this->vtkCollection::AddItem((vtkObject *)a);
    00098 }
    00099
    00100 inline vtkActor *vtkActorCollection::GetNextActor()
    00101 {
    00102   return static_cast<vtkActor *>(this->GetNextItemAsObject());
    00103 }
    00104
    00105 inline vtkActor *vtkActorCollection::GetLastActor()
    00106 {
    00107   if ( this->Bottom == NULL )
    00108     {
    00109     return NULL;
    00110     }
    00111   else
    00112     {
    00113     return static_cast<vtkActor *>(this->Bottom->Item);
    00114     }
    00115 }
    00116
    00117 inline vtkActor *vtkActorCollection::GetNextItem()
    00118 {
    00119   return this->GetNextActor();
    00120 }
    00121
    00122 inline vtkActor *vtkActorCollection::GetLastItem()
    00123 {
    00124   return this->GetLastActor();
    00125 }
    00126
    00127 #endif
    00128
    00129
    00130
    00131
    00132