概述
使用方法可以参考gsKnotVector_test.cpp;tutorialKnotVector.cpp;
构造函数
- gsKnotVector (int p)
Constructor with degree only.
- gsKnotVector (int p, unsigned sz)
Constructor with degree and size (=number of knots)
- gsKnotVector (T u0, T u1, unsigned interior, unsigned mult_ends=1, unsigned mult_interior=1, int degree=-1)
构造函数为‘下限,上限,内部不同点个数,末端重节点个数,内部重节点个数,阶次;‘阶次’的缺省值为末端重节点个数-1.
- gsKnotVector (std::vector< T > const &knots, int degree, int regularity)
Construct an open knot vector from the given unique knots. More...
- gsKnotVector (int degree, std::vector< T > const &knots)
Construct a knot vector with the given degree and knots.
- gsKnotVector (int deg, const_iterator start, const_iterator end)
- gsKnotVector (gsCompactKnotVector< T > ckv)
构造函数为‘下限,上限,内部不同点个数,末端重节点个数,内部重节点个数,阶次;‘阶次’的缺省值为末端重节点个数-1.
或者利用
“ gsKnotVector<double> kv2;
kv2.push_back(1,3);
kv2.push_back(2);
kv2.push_back(3,3);
kv2.set_degree(2);”
template <classT>void
gsKnotVector<T>::initUniform(Tu0,T u1, unsignedinterior,unsignedmult_ends,unsignedmult_interior,intdegree)
{
my->knots.clear();
my->knots.reserve( 2 *mult_ends +interior*mult_interior);
const T h = (u1-u0) / (interior+1);
my->knots.insert(my->knots.begin(),mult_ends,u0);
for ( unsigned i=1; i<=interior;i++ )
my->knots.insert(my->knots.end(),mult_interior,
u0 + i*h );
my->knots.insert(my->knots.end(),mult_ends,u1);
if (degree == -1)
my->p =mult_ends-1;
else
my->p =degree;
}
gsKnotVector.set_degree() 的使用
gsKnotVector<double> kv2;
kv2.set_degree(2); // this willcause a break.
gsKnotVector<double> kv2;
kv2.push_back(1,3);
kv2.push_back(2);
kv2.push_back(3,3);
kv2.set_degree(2); // this works
最后
以上就是独特花瓣为你收集整理的[G+smo]gsKnotVector使用方法可以参考gsKnotVector_test.cpp;tutorialKnotVector.cpp; 构造函数 gsKnotVector (int p) Constructor with degree only. gsKnotVector (int p, unsigned sz) Constructor with degree and size (=number of knots) gsKnot的全部内容,希望文章能够帮你解决[G+smo]gsKnotVector使用方法可以参考gsKnotVector_test.cpp;tutorialKnotVector.cpp; 构造函数 gsKnotVector (int p) Constructor with degree only. gsKnotVector (int p, unsigned sz) Constructor with degree and size (=number of knots) gsKnot所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复