-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModelS.hpp
68 lines (55 loc) · 1.61 KB
/
ModelS.hpp
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// ModelS.hpp
// SkinningRecorder
//
// Created by IDE KENTARO on 2019/04/17.
// Copyright © 2019 IdeKentaro. All rights reserved.
//
#ifndef ModelS_hpp
#define ModelS_hpp
#include <vector>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
class AnimS;
class ModelS
{
private:
GLFWwindow *window;
AnimS *anims;
GLuint modelVAO;
GLuint modelProgramID;
GLuint modelMatrixID;
GLuint ViewMatrixID;
GLuint ModelMatrixID;
glm::mat4 animMatrix;
GLuint Texture;
GLuint TextureID;
glm::mat4 modelMVP;
GLuint modelVBO[4];
GLuint LightID;
std::vector<glm::vec3> vertices;
std::vector<glm::vec2> uvs;
std::vector<glm::vec3> normals;
std::vector<unsigned short> indices;
std::vector<glm::vec3> indexed_vertices;
std::vector<glm::vec2> indexed_uvs;
std::vector<glm::vec3> indexed_normals;
std::vector<std::vector<float>> indexed_weights;
public:
void initOBJ(GLFWwindow* window, const char* obj, const char* kfm, const char* vert, const char* frag);
void playOBJ(const glm::mat4 &M, const glm::mat4 &BoneM);
void playstop();
void stop();
void changefps(int &fps);
void changeframe(int &frame);
void selectBone(int &sbone);
void updateRotate(int &axis, float &rot, const int &rotate_mm);
void updateTrans(int &axis, float &trans, const int &trans_mm);
int getfps();
int getframe();
std::vector<glm::vec3> copy();
void paste(std::vector<glm::vec3> &rot);
void recorde(std::string &name);
};
#endif /* ModelS_hpp */