projects
/
opengl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First pass at blendshapes
[opengl.git]
/
model.hpp
diff --git
a/model.hpp
b/model.hpp
index ecc8842b7e3807d901d642dc721f572a8cd91b78..aaf647af3c83c2b89b6e39e0a53bbe28a0c6ed40 100644
(file)
--- a/
model.hpp
+++ b/
model.hpp
@@
-32,18
+32,21
@@
class Model {
float weights[4] = {1, 0, 0, 0};
};
float weights[4] = {1, 0, 0, 0};
};
+ public:
+ Model(std::vector<std::string> blendshapes, std::string neutral, Program p);
+ Model(const aiScene *scene, Program p);
+ void draw(Skybox skybox, const float tick) const;
+
struct Mesh {
Mesh(const aiMesh *aiMesh, GLuint progId);
GLuint progId, vao, numIndices;
struct Mesh {
Mesh(const aiMesh *aiMesh, GLuint progId);
GLuint progId, vao, numIndices;
+ GLuint vbos[6];
unsigned int materialIndex;
BoneMap boneMap;
const aiMesh &ai;
unsigned int materialIndex;
BoneMap boneMap;
const aiMesh &ai;
+ void updatePosBuffer() const;
};
};
- public:
- Model(const aiScene *scene, Program p);
- void draw(Skybox skybox, const float tick) const;
-
class Node {
public:
Node(aiNode &aiNode, GLuint progId, AnimMap *animMap, std::set<std::string> allBones, Node *parent);
class Node {
public:
Node(aiNode &aiNode, GLuint progId, AnimMap *animMap, std::set<std::string> allBones, Node *parent);
@@
-78,10
+81,10
@@
class Model {
std::pair<glm::vec3, float> closestVertex(Model::Node &node, glm::vec3 a, glm::vec3 b, glm::mat4 parentTrans = glm::mat4(1)) const;
std::pair<glm::vec3, float> closestVertex(Model::Node &node, glm::vec3 a, glm::vec3 b, glm::mat4 parentTrans = glm::mat4(1)) const;
+ std::vector<Mesh> meshes;
+
private:
const Program program;
private:
const Program program;
-
- std::vector<Mesh> meshes;
Node *root;
std::vector<Material> materials;
Node *root;
std::vector<Material> materials;