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 -------------------------------------------------------------------------*/ 00035 #ifndef __vtkSplineGraphEdges_h 00036 #define __vtkSplineGraphEdges_h 00037 00038 #include "vtkGraphAlgorithm.h" 00039 #include "vtkSmartPointer.h" // For ivars 00040 00041 class vtkSpline; 00042 00043 class VTK_INFOVIS_EXPORT vtkSplineGraphEdges : public vtkGraphAlgorithm 00044 { 00045 public: 00046 static vtkSplineGraphEdges *New(); 00047 vtkTypeMacro(vtkSplineGraphEdges,vtkGraphAlgorithm); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 00052 virtual void SetSpline(vtkSpline* s); 00053 vtkGetObjectMacro(Spline, vtkSpline); 00055 00056 //BTX 00057 enum 00058 { 00059 BSPLINE = 0, 00060 CUSTOM 00061 }; 00062 //ETX 00063 00065 00067 vtkSetMacro(SplineType, int); 00068 vtkGetMacro(SplineType, int); 00070 00072 00073 vtkSetMacro(NumberOfSubdivisions, vtkIdType); 00074 vtkGetMacro(NumberOfSubdivisions, vtkIdType); 00076 00077 protected: 00078 vtkSplineGraphEdges(); 00079 ~vtkSplineGraphEdges(); 00080 00081 virtual int RequestData( 00082 vtkInformation *, 00083 vtkInformationVector **, 00084 vtkInformationVector *); 00085 00086 virtual unsigned long GetMTime(); 00087 00088 void GeneratePoints(vtkGraph* g, vtkIdType e); 00089 void GenerateBSpline(vtkGraph* g, vtkIdType e); 00090 00091 vtkSpline* Spline; 00092 00093 int SplineType; 00094 00095 //BTX 00096 vtkSmartPointer<vtkSpline> XSpline; 00097 vtkSmartPointer<vtkSpline> YSpline; 00098 vtkSmartPointer<vtkSpline> ZSpline; 00099 //ETX 00100 00101 vtkIdType NumberOfSubdivisions; 00102 00103 private: 00104 vtkSplineGraphEdges(const vtkSplineGraphEdges&); // Not implemented. 00105 void operator=(const vtkSplineGraphEdges&); // Not implemented. 00106 }; 00107 00108 #endif