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_SPLINE_HH_
20
#define _IGNITION_SPLINE_HH_
21
22
#include <
ignition/math/Helpers.hh
>
23
#include <
ignition/math/IndexException.hh
>
24
#include <
ignition/math/Vector3.hh
>
25
26
namespace
ignition
27
{
28
namespace
math
29
{
30
// Forward declare private data class
31
class
SplinePrivate;
32
35
class
IGNITION_VISIBLE
Spline
36
{
38
public
:
Spline
();
39
41
public
: ~
Spline
();
42
46
public
:
void
Tension(
double
_t);
47
50
public
:
double
Tension()
const
;
51
54
public
:
void
AddPoint(
const
Vector3d
&_pt);
55
61
public
:
Vector3d
Point(
unsigned
int
_index)
const
;
62
65
public
:
size_t
PointCount()
const
;
66
70
public
:
Vector3d
Tangent(
unsigned
int
_index)
const
;
71
73
public
:
void
Clear();
74
81
public
:
void
UpdatePoint(
unsigned
int
_index,
const
Vector3d
&_value);
82
86
public
:
Vector3d
Interpolate(
double
_t)
const
;
87
94
public
:
Vector3d
Interpolate(
unsigned
int
_fromIndex,
double
_t)
const
;
95
110
public
:
void
AutoCalculate(
bool
_autoCalc);
111
116
public
:
void
RecalcTangents();
117
120
private
:
SplinePrivate
*dataPtr;
121
};
122
}
123
}
124
#endif
IGNITION_VISIBLE
#define IGNITION_VISIBLE
Use to represent "symbol visible" if supported.
Definition:
Helpers.hh:454
Vector3.hh
IndexException.hh
ignition::math::SplinePrivate
Definition:
SplinePrivate.hh:28
ignition::math::Spline
Splines.
Definition:
Spline.hh:35
ignition::math::Vector3< double >
Helpers.hh
ignition
Definition:
AffineException.hh:30