-
Notifications
You must be signed in to change notification settings - Fork 1
/
myRealMesh.h
36 lines (27 loc) · 1.1 KB
/
myRealMesh.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef MYMESH_H
#define MYMESH_H
#include <napi.h>
// -------------------- OpenMesh
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
typedef OpenMesh::TriMesh_ArrayKernelT<> TriMesh;
class MyMesh : public Napi::ObjectWrap<MyMesh> {
public:
static Napi::Object Init(Napi::Env env, Napi::Object exports);
MyMesh(const Napi::CallbackInfo& info);
private:
static Napi::FunctionReference constructor;
OpenMesh::TriMesh_ArrayKernelT<> myTriMesh_;
std::vector<TriMesh::VertexHandle> vHStorage_;
std::vector<TriMesh::VertexHandle> * const ptrVHS = &vHStorage_;
Napi::Value GetFaceValue(const Napi::CallbackInfo& info);
Napi::Value AddVertex(const Napi::CallbackInfo& info);
void AddFace(const Napi::CallbackInfo& info);
void AddFaceById(const Napi::CallbackInfo& info);
void SetPointById(const Napi::CallbackInfo& info);
void SetPoint(const Napi::CallbackInfo& info);
Napi::Value GetPoints(const Napi::CallbackInfo& info);
Napi::Value VVIter(const Napi::CallbackInfo& info);
Napi::Value BFSNeighWeights(const Napi::CallbackInfo& info);
};
#endif