Umasoft
Main Page
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
TerrainSDK
vtdata
CubicSpline.h
1
//
2
// (Natural) Cubic Spline class.
3
//
4
// Originally adapted from some LGPL code found around the net.
5
//
6
// Copyright (c) 2004 Virtual Terrain Project
7
// Free for all uses, see license.txt for details.
8
//
9
10
#ifndef __CUBIC_SPLINE_H__
11
#define __CUBIC_SPLINE_H__
12
13
#include <list>
14
#include "
MathTypes.h
"
15
20
class
CubicSpline
21
{
22
public
:
23
CubicSpline
();
24
virtual
~
CubicSpline
();
25
26
void
Cleanup
();
27
int
AddPoint
(
const
DPoint3
&vec);
28
bool
Generate
();
29
bool
Interpolate
(
double
par,
DPoint3
*vec,
30
DPoint3
*dvec = NULL,
DPoint3
*ddvec = NULL)
const
;
32
int
NumPoints
()
const
{
return
m_iPoints; }
33
34
private
:
35
std::list<DPoint3> m_veclist;
36
37
int
m_iPoints;
38
DPoint3
*m_pCoeff0;
39
DPoint3
*m_pCoeff1;
40
DPoint3
*m_pCoeff2;
41
DPoint3
*m_pCoeff3;
42
};
43
44
#endif // __CUBIC_SPLINE_H__
45
Generated on Fri Jun 7 2013 16:07:51 for Umasoft by
1.8.4