//
//  FileLoad.hpp
//  Face3D
//
//  Created by JasWorkSpace on 2018/8/2.
//  Copyright © 2018年 JasWorkSpace. All rights reserved.
//

#ifndef FileLoad_hpp
#define FileLoad_hpp
/////////////////////////

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <vector>
#include <sstream>


struct OBJ_V{
    float v[3];
};
struct OBJ_VT{
    float v[2];
};
struct OBJ_VN{
    float v[3];
};
struct OBJ_F{
    int v[3];
    int v2[3];
    int v3[3];
};
struct OBJData{
    std::vector<OBJ_V> V;
    std::vector<OBJ_VT> VT;
    std::vector<OBJ_VN> VN;
    std::vector<OBJ_F> F;
};

//unsigned char* loadFileContent(const char*path, int &filesize,bool needBundle);
OBJData* getOBJDataFromFile(const char*file);
OBJData* getOBJDataFromFileContent(unsigned char* fileContent);
void releaseOBJData(OBJData* objdata);

#endif /* FileLoad_hpp */
