-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutility.hpp
54 lines (39 loc) · 869 Bytes
/
utility.hpp
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
#pragma once
#include <memory>
#include <GL/gl.h>
#include "Vector.hpp"
#include "pmxLoader.hpp"
namespace kazakami
{
#ifdef __linux__
const char directorySeparator = '/';
#elif defined __APPLE__
const char directorySeparator = '/';
#else
assert("Set directory Sparator");
#endif
const static double pi = 3.141592653589793238;
struct Material
{
GLfloat ambient[4];
GLfloat diffuse[4];
GLfloat specular[4];
GLfloat shininess;
};
const Material red =
{
{ 1, 0, 0, 1},
{ 1, 0, 0, 1},
{ 1, 0, 0, 1},
20
};
Material PMXMat_to_Mat(const PMXMaterial & mat);
void setMaterial(const Material & mat);
void setPMXMaterial(const PMXMaterial & mat);
void glVertex3d(const Vector3d & vec);
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
}