Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
933 B

/*============================================================================
*
* Copyright (C) 1999-2000 Microsoft Corporation. All Rights Reserved.
*
* File: bezier.hpp
* Content: Declarations for Beziers
*
****************************************************************************/
#ifndef _BEZIER_HPP
#define _BEZIER_HPP
#include "bspline.hpp"
class RDBezier : public RDBSpline
{
public:
RDBezier(DWORD dwOrderU, DWORD dwOrderV);
virtual double TexCoordU(double u) const;
virtual double TexCoordV(double v) const;
private:
double m_lut[13][13];
virtual double Basis(unsigned i, unsigned n, double t) const;
virtual double BasisPrime(unsigned i, unsigned n, double t) const;
unsigned factorial(unsigned k) const
{
_ASSERT(k < 13, "Factorial out of range");
for(unsigned i = 1, t = 1; i <= k; t *= i++);
return t;
}
};
#endif // _BEZIER_HPP