📄 wmlbeziercurve3.h
字号:
// Magic Software, Inc.
// http://www.magic-software.com
// http://www.wild-magic.com
// Copyright (c) 2003. All Rights Reserved
//
// The Wild Magic Library (WML) source code is supplied under the terms of
// the license agreement http://www.magic-software.com/License/WildMagic.pdf
// and may not be copied or disclosed except in accordance with the terms of
// that agreement.
#ifndef WMLBEZIERCURVE3_H
#define WMLBEZIERCURVE3_H
#include "WmlSingleCurve3.h"
namespace Wml
{
template <class Real>
class WML_ITEM BezierCurve3 : public SingleCurve3<Real>
{
public:
// Construction and destruction. BezierCurve3 accepts responsibility for
// deleting the input arrays.
BezierCurve3 (int iDegree, Vector3<Real>* akCtrlPoint);
virtual ~BezierCurve3 ();
int GetDegree () const;
const Vector3<Real>* GetControlPoints () const;
virtual Vector3<Real> GetPosition (Real fTime) const;
virtual Vector3<Real> GetFirstDerivative (Real fTime) const;
virtual Vector3<Real> GetSecondDerivative (Real fTime) const;
virtual Vector3<Real> GetThirdDerivative (Real fTime) const;
virtual Real GetVariation (Real fT0, Real fT1,
const Vector3<Real>* pkP0 = NULL,
const Vector3<Real>* pkP1 = NULL) const;
protected:
int m_iDegree;
int m_iNumCtrlPoints;
Vector3<Real>* m_akCtrlPoint;
Vector3<Real>* m_akDer1CtrlPoint;
Vector3<Real>* m_akDer2CtrlPoint;
Vector3<Real>* m_akDer3CtrlPoint;
Real** m_aafChoose;
// variation support
int m_iTwoDegree;
int m_iTwoDegreePlusOne;
Real* m_afSigma;
Real* m_afRecip;
Real* m_afPowT0;
Real* m_afPowOmT0;
Real* m_afPowT1;
Real* m_afPowOmT1;
};
typedef BezierCurve3<float> BezierCurve3f;
typedef BezierCurve3<double> BezierCurve3d;
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -