API
Class List
Class Hierarchy
Globals
Namespace Members
Files
Links
Ignition Website
Report Documentation Issues
include
ignition
math
Spline.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012-2014 Open Source Robotics Foundation
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
*/
17
// Note: Originally cribbed from Ogre3d. Modified to implement Cardinal
18
// spline and catmull-rom spline
19
#ifndef IGNITION_MATH_SPLINE_HH_
20
#define IGNITION_MATH_SPLINE_HH_
21
22
#include <
ignition/math/Helpers.hh
>
23
#include <
ignition/math/Vector3.hh
>
24
25
namespace
ignition
26
{
27
namespace
math
28
{
29
// Forward declare private data class
30
class
SplinePrivate;
31
34
class
IGNITION_VISIBLE
Spline
35
{
37
public
:
Spline
();
38
40
public
: ~
Spline
();
41
45
public
:
void
Tension(
double
_t);
46
49
public
:
double
Tension()
const
;
50
53
public
:
void
AddPoint(
const
Vector3d
&_pt);
54
59
public
:
Vector3d
Point(
const
unsigned
int
_index)
const
;
60
63
public
:
size_t
PointCount()
const
;
64
69
public
:
Vector3d
Tangent(
const
unsigned
int
_index)
const
;
70
72
public
:
void
Clear();
73
80
public
:
bool
UpdatePoint(
const
unsigned
int
_index,
81
const
Vector3d
&_value);
82
89
public
:
Vector3d
Interpolate(
double
_t)
const
;
90
99
public
:
Vector3d
Interpolate(
const
unsigned
int
_fromIndex,
100
const
double
_t)
const
;
101
116
public
:
void
AutoCalculate(
bool
_autoCalc);
117
122
public
:
void
RecalcTangents();
123
126
private
:
SplinePrivate
*dataPtr;
127
};
128
}
129
}
130
#endif
Vector3.hh
ignition::math::SplinePrivate
Definition:
SplinePrivate.hh:28
ignition::math::Spline
Splines.
Definition:
Spline.hh:34
IGNITION_VISIBLE
#define IGNITION_VISIBLE
Use to represent "symbol visible" if supported.
Definition:
System.hh:59
ignition::math::Vector3< double >
Helpers.hh
ignition
Definition:
Angle.hh:38