GraceFt v2.3
开源图形引擎 EGE(Easy Graphics Engine) 的高层封装库
 
载入中...
搜索中...
未找到
GFt::FitCurve< T > 模板类 参考

拟合曲线类 更多...

#include <FitCurve.hpp>

Public 成员函数

 FitCurve ()=default
 默认构造函数
 
 FitCurve (const std::vector< Point< T > > &points)
 构造函数
 
void addPoint (const Point< T > &point)
 添加点
 
int count () const
 控制点的数量
 
float getTension () const
 拟合曲线的张力
 
bool isClosed () const
 拟合曲线是否闭合
 
template<typename U >
requires std::is_arithmetic_v<U>
 operator FitCurve< U > () const
 类型转换函数
 
void setClosed (bool closed)
 设置拟合曲线是否闭合
 
void setTension (float tension)
 设置拟合曲线的张力
 

友元

class Graphics
 
std::ostream & operator<< (std::ostream &os, const FitCurve< T > &curve)
 流操作符重载
 
class Path
 

详细描述

template<typename T>
requires std::is_arithmetic_v<T>
class GFt::FitCurve< T >

拟合曲线类

模板参数
T点的坐标类型

构造及析构函数说明

◆ FitCurve() [1/2]

template<typename T >
GFt::FitCurve< T >::FitCurve ( )
default

默认构造函数

◆ FitCurve() [2/2]

template<typename T >
GFt::FitCurve< T >::FitCurve ( const std::vector< Point< T > > & points)
inline

构造函数

参数
points点集

成员函数说明

◆ addPoint()

template<typename T >
void GFt::FitCurve< T >::addPoint ( const Point< T > & point)
inline

添加点

参数
point

◆ count()

template<typename T >
int GFt::FitCurve< T >::count ( ) const
inline

控制点的数量

返回
控制点的数量

◆ getTension()

template<typename T >
float GFt::FitCurve< T >::getTension ( ) const
inline

拟合曲线的张力

返回
张力

◆ isClosed()

template<typename T >
bool GFt::FitCurve< T >::isClosed ( ) const
inline

拟合曲线是否闭合

返回
是否闭合

◆ operator FitCurve< U >()

template<typename T >
template<typename U >
requires std::is_arithmetic_v<U>
GFt::FitCurve< T >::operator FitCurve< U > ( ) const
inline

类型转换函数

模板参数
U目标类型
返回
拟合曲线

◆ setClosed()

template<typename T >
void GFt::FitCurve< T >::setClosed ( bool closed)
inline

设置拟合曲线是否闭合

参数
closed是否闭合

◆ setTension()

template<typename T >
void GFt::FitCurve< T >::setTension ( float tension)
inline

设置拟合曲线的张力

参数
tension张力

友元及相关符号说明

◆ Graphics

template<typename T >
friend class Graphics
friend

◆ operator<<

template<typename T >
std::ostream & operator<< ( std::ostream & os,
const FitCurve< T > & curve )
friend

流操作符重载

参数
os输出流
curve拟合曲线
返回
输出流 os

◆ Path

template<typename T >
friend class Path
friend