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.
24 lines
745 B
24 lines
745 B
#ifndef SINGULARITYJUDGER_SRF_MESH_H
|
|
#define SINGULARITYJUDGER_SRF_MESH_H
|
|
|
|
#include "glm/glm.hpp"
|
|
#include "real.h"
|
|
#include "tinynurbs/tinynurbs.h"
|
|
#include "vector"
|
|
|
|
|
|
using namespace std;
|
|
// 用采样网格表示的一个曲面
|
|
class SrfMesh {
|
|
public:
|
|
SrfMesh(const tinynurbs::RationalSurface<real> &s, int sampleLevel_);
|
|
SrfMesh() = default;
|
|
int sampleLevel; // 采样层级;每多一层,uv方向的网格数都分别x2,整个mesh的网格数x4;sampleLevel为1时,采样整个面,仅有一个网格
|
|
int sampleCntOnSingleDir;
|
|
vector<vector<glm::vec3>> evaluation;
|
|
vector<vector<glm::vec3>> tangent_u;
|
|
vector<vector<glm::vec3>> tangent_v;
|
|
vector<vector<glm::vec3>> normal;
|
|
};
|
|
|
|
#endif // SINGULARITYJUDGER_SRF_MESH_H
|
|
|