-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransform.h
More file actions
62 lines (46 loc) · 1.11 KB
/
Copy pathTransform.h
File metadata and controls
62 lines (46 loc) · 1.11 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// Created by 田淙宇 on 2019/2/20.
//
#ifndef STARANIM_TRANSFORM_H
#define STARANIM_TRANSFORM_H
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <string>
#include <vector>
#include <map>
#include <iostream>
typedef glm::vec2 Vec2;
typedef glm::vec3 Vec3;
typedef glm::vec4 Vec4;
typedef glm::mat3 Mat3;
typedef glm::mat4 Mat4;
typedef glm::quat Quat;
typedef std::string String;
template <class T>
using Vector=std::vector<T>;
template <class T>
using Map=std::map<String,T>;
template <class T>
using Pair=std::pair<String,T>;
typedef unsigned int ID;
typedef unsigned int Index;
enum IMAGE_FORMAT{tga,jpg,jpeg,png};
static String getFormatStr(IMAGE_FORMAT f){
switch(f)
{
case tga:return ".tga";
case jpg:return ".jpg";
case jpeg:return ".jpeg";
case png:return ".png";
}
}
class File{
public:
static String getRootPath();
static String getShaderPath(const String& shader){
return "d:/learn/computer-graphic/StarAnim/Shader/"+shader;
}
};
#endif //STARANIM_TRANSFORM_H