-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImportedModel.h
More file actions
36 lines (34 loc) 路 820 Bytes
/
Copy pathImportedModel.h
File metadata and controls
36 lines (34 loc) 路 820 Bytes
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
#pragma once
#include <vector>
class ImportedModel
{
private:
int numVertices;
std::vector<glm::vec3> vertices;
std::vector<glm::vec2> texCoords;
std::vector<glm::vec3> normalVecs;
public:
ImportedModel();
ImportedModel(const char* filePath);
int getNumVertices();
std::vector<glm::vec3> getVertices();
std::vector<glm::vec2> getTextureCoords();
std::vector<glm::vec3> getNormals();
};
class ModelImporter
{
private:
std::vector<float> vertVals;
std::vector<float> triangleVerts;
std::vector<float> textureCoords;
std::vector<float> stVals;
std::vector<float> normals;
std::vector<float> normVals;
public:
ModelImporter();
void parseOBJ(const char* filePath);
int getNumVertices();
std::vector<float> getVertices();
std::vector<float> getTextureCoordinates();
std::vector<float> getNormals();
};