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.
 
 
OpenGLTemplate/LoadingModels/ImportedModel.h

35 lines
806 B

#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();
};