CardinalSplines.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013-2016, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_MATH_CARDINALSPLINES_H
17 #define SURGSIM_MATH_CARDINALSPLINES_H
18 
19 #include <vector>
20 
22 #include "SurgSim/Math/Vector.h"
23 
25 namespace SurgSim
26 {
27 namespace Math
28 {
29 namespace CardinalSplines
30 {
31 
38  std::vector<SurgSim::Math::Vector3d>* result);
39 
49 void interpolate(size_t subdivisions,
50  const std::vector<Math::Vector3d>& controlPoints,
51  std::vector<Math::Vector3d>* points,
52  double tau = 0.4);
53 
54 }; // namespace CardinalSplines
55 }; // namespace Math
56 }; // namespace SurgSim
57 
58 #endif // SURGSIM_MATH_CARDINALSPLINES_H
Vector.h
Definitions of small fixed-size vector types.
SurgSim::Math::CardinalSplines::interpolate
void interpolate(size_t subdivisions, const std::vector< SurgSim::Math::Vector3d > &controlPoints, std::vector< SurgSim::Math::Vector3d > *points, double tau)
Run Cardinal Splines interpolation on 'controlPoints'.
Definition: CardinalSplines.cpp:45
SurgSim::Math::CardinalSplines::extendControlPoints
void extendControlPoints(const SurgSim::DataStructures::VerticesPlain &points, std::vector< SurgSim::Math::Vector3d > *result)
Function to add two 'ghost' points to 'points' at the beginning and the end, prepare 'points' for Car...
Definition: CardinalSplines.cpp:26
SurgSim::DataStructures::Vertices
Base class for mesh structures, handling basic vertex functionality.
Definition: Vertices.h:52
Vertices.h
SurgSim
Definition: CompoundShapeToGraphics.cpp:30