-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMesh.h
48 lines (41 loc) · 1.33 KB
/
Mesh.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**************************************************************************************************
*Program: Delta
*Programmer: Toben "Littlefoot" "Narcolapser" Archer
*Date: 12 03 09
*Purpose: A wrapper class for mesh objects. With the capacities to load from .obj files and
* handle the process of animating and given the values of rotation, transformation, and scale
*Notes: HA! I'm making this class again. I must have made this class 4 or 5 times before
* when I had no idea what I was doing. >.< see mesh class for comments.
**********************/
#ifndef MESH_H
#define MESH_H
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "Attrib.cpp"
#include "Buffer.cpp"
#include "GeoObject.h"
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
using namespace std;
class Mesh: public Object
{
public:
Mesh(const char* filename);
~Mesh();
void render();
void setTrans(glm::mat4 val);
void bindToProgram(Program *prog);
void assignID(UID val);
virtual bool onEvent(const Event& event);
private:
//data members:
Attrib *coords; //attribute containing all the vertex information.
Attrib *normals; //attribute containing all the vertex normals.
Buffer *elements; //attribute containing all the face information
};
#endif
/*.S.D.G.*/