Skip to content
Snippets Groups Projects
Select Git revision
  • 43f6c4a3f8448adeb24f59367f0e810350ec63b9
  • develop default
  • feat/dev-test
  • feat/router
  • feat/diet-merged
  • feat/Workout
  • feat/scrap
  • feat/루틴
  • feat/HabitTracker
  • feat;식단관리
  • feat/User-merged
  • feat/User
  • feat/diet
  • feat/back
  • feat/SignIn
  • feat/dbconf
  • master
  • revert-b2deab70
  • feat/certbot
  • hotfix/nginx
  • feature/ssl
21 results

routineAPI.js

Blame
  • ResourceLoader.h 1.17 KiB
    #pragma once
    
    #include <string>
    #include <iostream>
    #include <fstream>
    #include <sstream>
    #include <vector>
    
    #include <GL/glew.h>
    
    #include <glm/glm.hpp>
    #include <glm/gtc/matrix_transform.hpp>
    #include <glm/gtc/type_ptr.hpp>
    
    #include "Logger.h"
    
    class Image
    {
    private:
    	int width;
    	int height;
    	int channel;
    
    	unsigned char *data;
    
    public:
    	Image(int _width, int _height, int _cahnnel, unsigned char *_data);
    
    	int getWidth();
    	int getHeight();
    	unsigned char *getData();
    };
    
    std::string get_extension(const std::string &filePath);
    std::vector<int> tokenize_index(std::string &input, const char delim);
    glm::vec2 string_to_vec2(std::vector<std::string> &input);
    glm::vec3 string_to_vec3(std::vector<std::string> &input);
    int parse_lines(std::ifstream &ifs, std::vector<glm::vec3> &vertices, std::vector<glm::vec2> &vertexTexCoord, std::vector<glm::vec3> &vertexNormals);
    std::vector<std::string> parse_line(std::string &line);
    bool openObj(const std::string fileName, std::vector<glm::vec3> &vertices, std::vector<glm::vec2> &vertexTexCoord, std::vector<glm::vec3> &vertexNormals);
    Image *make_Image(std::string fileName, int *width, int *height, int *nrChannels);
    void free_image(Image *img);