-
Notifications
You must be signed in to change notification settings - Fork 1
/
util.h
31 lines (28 loc) · 1.07 KB
/
util.h
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
#ifndef UTIL_H
#define UTIL_H
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <GLFW/glfw3.h>
#include <vector>
#include "GameObject.h"
#include "Player.h"
void FPS_init(float delay);
void FPS_count();
bool loadModelFromFile(const char * path,
std::vector<unsigned short> & indices,
std::vector<glm::vec3> & vertices,
std::vector<glm::vec2> & uvs,
std::vector<glm::vec3> & normals,
std::vector<glm::vec3> & tangents,
std::vector<glm::vec3> & bitangents);
glm::vec3 getNavigationEntry(glm::vec3 position);
glm::vec3 circleCollision(glm::vec3 center, float radius, float samples, bool collideWithGreen, bool collideWithPlayers, Player* self = NULL);
glm::vec3 slideAlong(glm::vec3 a, glm::vec3 n);
glm::vec3 moveTowards(glm::vec3 pos, glm::vec3 target, float minspeed);
bool isColliding(GameObject o1, GameObject o2);
void calculateNormals(std::vector<glm::vec3> & vertices,
std::vector<glm::vec3> & normals,
std::vector<unsigned short> & indices,
unsigned int faceCount);
#endif