Skip to content
Snippets Groups Projects
Select Git revision
  • 517b11f3f6f1377c93cfd26895f41e446179443c
  • master default
2 results

animation.cpp

Blame
  • ObjGeometry.h 661 B
    #ifndef BRAVE2_OBJGEOMETRY_H
    #define BRAVE2_OBJGEOMETRY_H
    
    
    #include "../utils/math.h"
    #include "../objects/Object.h"
    #include "../utils/OBJReader.h"
    
    
    // This class assumes that the mesh is made up entirely of triangles
    // this is important for the GetVertexDataByUV function
    class ObjGeometry : public Geometry {
        std::string objPath;
        OBJReader objReader;
    
    public:
        //TODO read every data from OBJ file
        ObjGeometry(const std::string &objPath);
    
        void Initialize();
    
        void Draw() override;
    
        // Assumes that the mesh is made up of triangles
        VertexData GetVertexDataByUV(float u, float v) override;
    };
    
    
    #endif //BRAVE2_OBJGEOMETRY_H