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.
32 lines
1.2 KiB
32 lines
1.2 KiB
//
|
|
// Created by 14727 on 2022/11/19.
|
|
//
|
|
|
|
#ifndef NURBSEVALUATOR_NURBS_COMMON_CUH
|
|
#define NURBSEVALUATOR_NURBS_COMMON_CUH
|
|
|
|
/**
|
|
* 当u值已知时,根据基函数N的递推表达式,采用动态规划的方式求解N值
|
|
* @param N_Texture 结果返回在N_Texture中
|
|
*/
|
|
__device__ void d_basisFunction(float *nTexture, const float *knots, float u, int degree, int d_knotsCnt);
|
|
|
|
/**
|
|
* 计算并保存基函数值
|
|
* @param nTexture 记录度数为p的基函数值,规模为【sampleCnt,pointsCnt】
|
|
* @param nTexture1 记录度数为p-1的基函数值,规模为【sampleCnt+1,pointsCnt】
|
|
*/
|
|
__global__ void
|
|
g_basisTexture(float *nTexture, float *nTexture1, const float *d_knots, int d_pointsCnt, int d_knotsCnt,
|
|
int d_sampleCnt);
|
|
|
|
/**
|
|
* 计算并保存基函数对采样点切向量的分量值
|
|
* @param derTexture 记录度数为p的Nurbs基函数对采样点切向量的分量值,大小为【sampleCnt,pointsCnt】
|
|
* @param nTexture1 度数为p-1的基函数值,规模为【sampleCnt+1,pointsCnt】
|
|
*/
|
|
__global__ void
|
|
g_derTexture(float *derTexture, const float *nTexture1, const float *d_knots, int d_pointsCnt, int d_knotsCnt,
|
|
int d_sampleCnt);
|
|
|
|
#endif //NURBSEVALUATOR_NURBS_COMMON_CUH
|
|
|