VTK  9.1.0
vtkParametricSpline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParametricSpline.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
127 #ifndef vtkParametricSpline_h
128 #define vtkParametricSpline_h
129 
130 class vtkSpline;
131 class vtkPoints;
132 
133 #include "vtkCommonComputationalGeometryModule.h" // For export macro
134 #include "vtkParametricFunction.h"
135 
136 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
137 {
138 public:
140  void PrintSelf(ostream& os, vtkIndent indent) override;
141 
149 
153  int GetDimension() override { return 1; }
154 
159  void Evaluate(double u[3], double Pt[3], double Du[9]) override;
160 
165  double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
166 
168 
176  vtkGetObjectMacro(XSpline, vtkSpline);
177  vtkGetObjectMacro(YSpline, vtkSpline);
178  vtkGetObjectMacro(ZSpline, vtkSpline);
180 
182 
189  vtkGetObjectMacro(Points, vtkPoints);
191 
193 
198  void SetPoint(vtkIdType index, double x, double y, double z);
200 
202 
207  vtkSetMacro(Closed, vtkTypeBool);
208  vtkGetMacro(Closed, vtkTypeBool);
209  vtkBooleanMacro(Closed, vtkTypeBool);
211 
213 
217  vtkSetMacro(ParameterizeByLength, vtkTypeBool);
218  vtkGetMacro(ParameterizeByLength, vtkTypeBool);
219  vtkBooleanMacro(ParameterizeByLength, vtkTypeBool);
221 
223 
239  vtkSetClampMacro(LeftConstraint, int, 0, 3);
240  vtkGetMacro(LeftConstraint, int);
241  vtkSetClampMacro(RightConstraint, int, 0, 3);
242  vtkGetMacro(RightConstraint, int);
244 
246 
250  vtkSetMacro(LeftValue, double);
251  vtkGetMacro(LeftValue, double);
252  vtkSetMacro(RightValue, double);
253  vtkGetMacro(RightValue, double);
255 
256 protected:
259 
260  // Points definition
262 
263  // The interpolating splines for each of the x-y-z coordinates
267 
268  // Supplemental variables
272  double LeftValue;
273  double RightValue;
275 
276  // Initializing the spline
278  int Initialize();
279 
280  // Internal variable for managing parametric coordinates
281  double Length;
282  double ClosedLength;
283 
284 private:
285  vtkParametricSpline(const vtkParametricSpline&) = delete;
286  void operator=(const vtkParametricSpline&) = delete;
287 };
288 
289 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:143
vtkParametricSpline::LeftConstraint
int LeftConstraint
Definition: vtkParametricSpline.h:270
vtkParametricSpline::EvaluateScalar
double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override
Evaluate a scalar value at parametric coordinate u[0] and Pt[3].
vtkParametricSpline::SetPoints
void SetPoints(vtkPoints *)
Specify the list of points defining the spline.
vtkParametricSpline::YSpline
vtkSpline * YSpline
Definition: vtkParametricSpline.h:265
vtkParametricSpline::Closed
vtkTypeBool Closed
Definition: vtkParametricSpline.h:269
vtkParametricSpline::SetZSpline
void SetZSpline(vtkSpline *)
By default, this class is constructed with three instances of vtkCardinalSpline (for each of the x-y-...
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkParametricSpline::ClosedLength
double ClosedLength
Definition: vtkParametricSpline.h:282
vtkParametricSpline::ZSpline
vtkSpline * ZSpline
Definition: vtkParametricSpline.h:266
vtkParametricSpline::GetDimension
int GetDimension() override
Return the parametric dimension of the class.
Definition: vtkParametricSpline.h:153
vtkParametricSpline::SetPoint
void SetPoint(vtkIdType index, double x, double y, double z)
Another API to set the points.
vtkParametricSpline::RightValue
double RightValue
Definition: vtkParametricSpline.h:273
vtkParametricSpline
parametric function for 1D interpolating splines
Definition: vtkParametricSpline.h:137
vtkParametricFunction
abstract interface for parametric functions
Definition: vtkParametricFunction.h:82
vtkParametricSpline::LeftValue
double LeftValue
Definition: vtkParametricSpline.h:272
vtkParametricSpline::SetYSpline
void SetYSpline(vtkSpline *)
By default, this class is constructed with three instances of vtkCardinalSpline (for each of the x-y-...
vtkParametricSpline::XSpline
vtkSpline * XSpline
Definition: vtkParametricSpline.h:264
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkParametricSpline::RightConstraint
int RightConstraint
Definition: vtkParametricSpline.h:271
vtkSpline
spline abstract class for interpolating splines
Definition: vtkSpline.h:82
vtkParametricFunction.h
vtkParametricSpline::Initialize
int Initialize()
vtkParametricSpline::~vtkParametricSpline
~vtkParametricSpline() override
vtkParametricSpline::New
static vtkParametricSpline * New()
Construct the spline with the following parameters: MinimumU = 0, MaximumU = 1, JoinU = 0 (unless the...
vtkParametricSpline::SetXSpline
void SetXSpline(vtkSpline *)
By default, this class is constructed with three instances of vtkCardinalSpline (for each of the x-y-...
vtkParametricSpline::InitializeTime
vtkMTimeType InitializeTime
Definition: vtkParametricSpline.h:277
vtkParametricSpline::vtkParametricSpline
vtkParametricSpline()
vtkParametricSpline::ParameterizeByLength
vtkTypeBool ParameterizeByLength
Definition: vtkParametricSpline.h:274
vtkParametricSpline::Evaluate
void Evaluate(double u[3], double Pt[3], double Du[9]) override
Evaluate the spline at parametric coordinate u[0] returning the point coordinate Pt[3].
vtkParametricSpline::Length
double Length
Definition: vtkParametricSpline.h:281
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkParametricSpline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkParametricSpline::SetNumberOfPoints
void SetNumberOfPoints(vtkIdType numPts)
Another API to set the points.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkParametricSpline::Points
vtkPoints * Points
Definition: vtkParametricSpline.h:261