vtkImplicitFunctionCollection.h 3.38 KB
Newer Older
Will Schroeder's avatar
Will Schroeder committed
1 2
/*=========================================================================

Ken Martin's avatar
Ken Martin committed
3
  Program:   Visualization Toolkit
Ken Martin's avatar
Ken Martin committed
4
  Module:    vtkImplicitFunctionCollection.h
Will Schroeder's avatar
Will Schroeder committed
5 6 7 8
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

Ken Martin's avatar
Ken Martin committed
9

Will Schroeder's avatar
Will Schroeder committed
10
Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
Will Schroeder's avatar
Will Schroeder committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

 * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
   of any contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

 * Modified source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Will Schroeder's avatar
Will Schroeder committed
33
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
Will Schroeder's avatar
Will Schroeder committed
34 35 36 37 38 39
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Will Schroeder's avatar
Will Schroeder committed
40 41

=========================================================================*/
Ken Martin's avatar
Ken Martin committed
42
// .NAME vtkImplicitFunctionCollection - maintain a list of implicit functions
Will Schroeder's avatar
Will Schroeder committed
43
// .SECTION Description
Ken Martin's avatar
Ken Martin committed
44
// vtkImplicitFunctionCollection is an object that creates and manipulates
45 46
// lists of objects of type vtkImplicitFunction. 
// .SECTION See Also
David Gobbi's avatar
David Gobbi committed
47
// vtkCollection vtkPlaneCollection
Will Schroeder's avatar
Will Schroeder committed
48

Ken Martin's avatar
Ken Martin committed
49 50
#ifndef __vtkImplicitFunctionCollection_h
#define __vtkImplicitFunctionCollection_h
Will Schroeder's avatar
Will Schroeder committed
51

Ken Martin's avatar
Ken Martin committed
52 53
#include "vtkCollection.h"
#include "vtkImplicitFunction.h"
Will Schroeder's avatar
Will Schroeder committed
54

Ken Martin's avatar
Ken Martin committed
55
class VTK_EXPORT vtkImplicitFunctionCollection : public vtkCollection
Will Schroeder's avatar
Will Schroeder committed
56 57
{
public:
58
  vtkTypeMacro(vtkImplicitFunctionCollection,vtkCollection);
59
  static vtkImplicitFunctionCollection *New();
Will Schroeder's avatar
Will Schroeder committed
60

Ken Martin's avatar
Ken Martin committed
61 62
  // Description:
  // Add an implicit function to the list.
Ken Martin's avatar
Ken Martin committed
63
  void AddItem(vtkImplicitFunction *);
Ken Martin's avatar
Ken Martin committed
64 65 66

  // Description:
  // Get the next implicit function in the list.
Ken Martin's avatar
Ken Martin committed
67
  vtkImplicitFunction *GetNextItem();
68 69 70 71
  
protected:
  vtkImplicitFunctionCollection() {};
  ~vtkImplicitFunctionCollection() {};
72 73
  vtkImplicitFunctionCollection(const vtkImplicitFunctionCollection&) {};
  void operator=(const vtkImplicitFunctionCollection&) {};
74
  
75 76 77 78 79

private:
  // hide the standard AddItem from the user and the compiler.
  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };

Will Schroeder's avatar
Will Schroeder committed
80 81
};

Ken Martin's avatar
Ken Martin committed
82
inline void vtkImplicitFunctionCollection::AddItem(vtkImplicitFunction *f) 
Will Schroeder's avatar
Will Schroeder committed
83
{
Ken Martin's avatar
Ken Martin committed
84
  this->vtkCollection::AddItem((vtkObject *)f);
Will Schroeder's avatar
Will Schroeder committed
85 86
}

Ken Martin's avatar
Ken Martin committed
87
inline vtkImplicitFunction *vtkImplicitFunctionCollection::GetNextItem() 
Will Schroeder's avatar
Will Schroeder committed
88
{ 
89
  return vtkImplicitFunction::SafeDownCast(this->GetNextItemAsObject());
Will Schroeder's avatar
Will Schroeder committed
90 91 92
}

#endif