OgreSimpleSpline.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __SimpleSpline_H__
#define __SimpleSpline_H__
#include "OgrePrerequisites.h"
#include "OgreVector3.h"
#include "OgreMatrix4.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport SimpleSpline
{
public:
SimpleSpline();
~SimpleSpline();
void addPoint(const Vector3& p);
const Vector3& getPoint(unsigned short index) const;
unsigned short getNumPoints(void) const;
void clear(void);
void updatePoint(unsigned short index, const Vector3& value);
Vector3 interpolate(Real t) const;
Vector3 interpolate(unsigned int fromIndex, Real t) const;
void setAutoCalculate(bool autoCalc);
void recalcTangents(void);
protected:
bool mAutoCalc;
vector<Vector3>::type mPoints;
vector<Vector3>::type mTangents;
Matrix4 mCoeffs;
};
}
#include "OgreHeaderSuffix.h"
#endif
OgreVector3.h
Ogre::SimpleSpline::mCoeffs
Matrix4 mCoeffs
Matrix of coefficients.
Definition: OgreSimpleSpline.h:125
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::SimpleSpline
A very simple spline class which implements the Catmull-Rom class of splines.
Definition: OgreSimpleSpline.h:57
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::SimpleSpline::mTangents
vector< Vector3 >::type mTangents
Definition: OgreSimpleSpline.h:122
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
OgrePrerequisites.h
Ogre::SimpleSpline::mAutoCalc
bool mAutoCalc
Definition: OgreSimpleSpline.h:119
OgreMatrix4.h
Ogre::SimpleSpline::mPoints
vector< Vector3 >::type mPoints
Definition: OgreSimpleSpline.h:121
OgreHeaderSuffix.h
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::vector
Definition: OgrePrerequisites.h:491
OgreHeaderPrefix.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.