OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / HP / util / HP / include / vtk / vtkLightCollection.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkLightCollection.h,v $
5   Language:  C++
6   Date:      $Date: 2002/02/01 06:33:18 $
7   Version:   $Revision: 1.1.1.1 $
8
9
10 Copyright (c) 1993-1998 Ken Martin, Will Schroeder, Bill Lorensen.
11
12 This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
13 The following terms apply to all files associated with the software unless
14 explicitly disclaimed in individual files. This copyright specifically does
15 not apply to the related textbook "The Visualization Toolkit" ISBN
16 013199837-4 published by Prentice Hall which is covered by its own copyright.
17
18 The authors hereby grant permission to use, copy, and distribute this
19 software and its documentation for any purpose, provided that existing
20 copyright notices are retained in all copies and that this notice is included
21 verbatim in any distributions. Additionally, the authors grant permission to
22 modify this software and its documentation for any purpose, provided that
23 such modifications are not distributed without the explicit consent of the
24 authors and that existing copyright notices are retained in all copies. Some
25 of the algorithms implemented by this software are patented, observe all
26 applicable patent law.
27
28 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
29 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
30 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
31 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
34 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
35 PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN
36 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
37 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
38
39
40 =========================================================================*/
41 // .NAME vtkLightCollection - a list of lights
42 // .SECTION Description
43 // vtkLightCollection represents and provides methods to manipulate a list of
44 // lights (i.e., vtkLight and subclasses). The list is unsorted and duplicate
45 // entries are not prevented.
46
47 // .SECTION see also
48 // vtkCollection vtkLight
49
50 #ifndef __vtkLightC_h
51 #define __vtkLightC_h
52
53 #include "vtkCollection.h"
54 #include "vtkLight.h"
55
56 class VTK_EXPORT vtkLightCollection : public vtkCollection
57 {
58  public:
59   static vtkLightCollection *New() {return new vtkLightCollection;};
60   const char *GetClassName() {return "vtkLightCollection";};
61
62   void AddItem(vtkLight *a);
63   void RemoveItem(vtkLight *a);
64   int IsItemPresent(vtkLight *a);
65   vtkLight *GetNextItem();
66 };
67
68 // Description:
69 // Add a light to the list.
70 inline void vtkLightCollection::AddItem(vtkLight *a) 
71 {
72   this->vtkCollection::AddItem((vtkObject *)a);
73 }
74
75 // Description:
76 // Remove a light from the list.
77 inline void vtkLightCollection::RemoveItem(vtkLight *a) 
78 {
79   this->vtkCollection::RemoveItem((vtkObject *)a);
80 }
81
82 // Description:
83 // Determine whether a particular light is present. Returns its position
84 // in the list.
85 inline int vtkLightCollection::IsItemPresent(vtkLight *a) 
86 {
87   return this->vtkCollection::IsItemPresent((vtkObject *)a);
88 }
89
90 // Description:
91 // Get the next light in the list. NULL is returned when the collection is 
92 // exhausted.
93 inline vtkLight *vtkLightCollection::GetNextItem() 
94
95   return (vtkLight *)(this->GetNextItemAsObject());
96 }
97
98 #endif
99