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