VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSplineGraphEdges.h 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 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00032 #ifndef __vtkSplineGraphEdges_h 00033 #define __vtkSplineGraphEdges_h 00034 00035 #include "vtkGraphAlgorithm.h" 00036 #include "vtkSmartPointer.h" // For ivars 00037 00038 class vtkSpline; 00039 00040 class VTK_INFOVIS_EXPORT vtkSplineGraphEdges : public vtkGraphAlgorithm 00041 { 00042 public: 00043 static vtkSplineGraphEdges *New(); 00044 vtkTypeMacro(vtkSplineGraphEdges,vtkGraphAlgorithm); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00049 virtual void SetSpline(vtkSpline* s); 00050 vtkGetObjectMacro(Spline, vtkSpline); 00052 00053 //BTX 00054 enum 00055 { 00056 BSPLINE = 0, 00057 CUSTOM 00058 }; 00059 //ETX 00060 00062 00064 vtkSetMacro(SplineType, int); 00065 vtkGetMacro(SplineType, int); 00067 00069 00070 vtkSetMacro(NumberOfSubdivisions, vtkIdType); 00071 vtkGetMacro(NumberOfSubdivisions, vtkIdType); 00073 00074 protected: 00075 vtkSplineGraphEdges(); 00076 ~vtkSplineGraphEdges(); 00077 00078 virtual int RequestData( 00079 vtkInformation *, 00080 vtkInformationVector **, 00081 vtkInformationVector *); 00082 00083 virtual unsigned long GetMTime(); 00084 00085 void GeneratePoints(vtkGraph* g, vtkIdType e); 00086 void GenerateBSpline(vtkGraph* g, vtkIdType e); 00087 00088 vtkSpline* Spline; 00089 00090 int SplineType; 00091 00092 //BTX 00093 vtkSmartPointer<vtkSpline> XSpline; 00094 vtkSmartPointer<vtkSpline> YSpline; 00095 vtkSmartPointer<vtkSpline> ZSpline; 00096 //ETX 00097 00098 vtkIdType NumberOfSubdivisions; 00099 00100 private: 00101 vtkSplineGraphEdges(const vtkSplineGraphEdges&); // Not implemented. 00102 void operator=(const vtkSplineGraphEdges&); // Not implemented. 00103 }; 00104 00105 #endif