SuperimposeMesh
Main Page
Related Pages
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
+
Functions
d
f
g
h
i
l
m
p
r
s
t
u
~
+
Variables
b
c
d
e
f
i
l
m
n
o
p
r
s
t
v
w
Typedefs
Enumerations
+
Files
File List
+
File Members
All
Functions
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
src
SuperimposeMesh
include
SuperimposeMesh
Mesh.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT)
3
*
4
* This software may be modified and distributed under the terms of the
5
* BSD 3-Clause license. See the accompanying LICENSE file for details.
6
*/
7
8
#ifndef MESH_H
9
#define MESH_H
10
11
#include <
SuperimposeMesh/Shader.h
>
12
13
#include <vector>
14
15
#include <assimp/scene.h>
16
17
#include <GL/glew.h>
18
19
#include <glm/vec2.hpp>
20
#include <glm/vec3.hpp>
21
22
23
class
Mesh
{
24
public
:
25
struct
Vertex
26
{
27
glm::vec3
Position
;
28
glm::vec3
Normal
;
29
glm::vec2
TexCoords
;
30
};
31
32
struct
Texture
33
{
34
GLuint
id
;
35
std::string
type
;
36
aiString
path
;
37
};
38
39
Mesh
(std::vector<Vertex> vertices, std::vector<GLuint> indices, std::vector<Texture> textures);
40
41
void
Draw
(
Shader
shader);
42
43
private
:
44
GLuint
VAO_
;
45
46
GLuint
VBO_
;
47
48
GLuint
EBO_
;
49
50
std::vector<Vertex>
vertices_
;
51
52
std::vector<GLuint>
indices_
;
53
54
std::vector<Texture>
textures_
;
55
};
56
57
#endif
/* MESH_H */
Mesh::Texture::id
GLuint id
Definition:
Mesh.h:34
Mesh::VBO_
GLuint VBO_
Definition:
Mesh.h:46
Mesh::Mesh
Mesh(std::vector< Vertex > vertices, std::vector< GLuint > indices, std::vector< Texture > textures)
Definition:
Mesh.cpp:18
Shader
Definition:
Shader.h:17
Mesh::Draw
void Draw(Shader shader)
Definition:
Mesh.cpp:55
Mesh
Definition:
Mesh.h:23
Mesh::VAO_
GLuint VAO_
Definition:
Mesh.h:44
Mesh::Texture
Definition:
Mesh.h:32
Shader.h
Mesh::Vertex::Position
glm::vec3 Position
Definition:
Mesh.h:27
Mesh::Vertex::Normal
glm::vec3 Normal
Definition:
Mesh.h:28
Mesh::indices_
std::vector< GLuint > indices_
Definition:
Mesh.h:52
Mesh::EBO_
GLuint EBO_
Definition:
Mesh.h:48
Mesh::Texture::type
std::string type
Definition:
Mesh.h:35
Mesh::Texture::path
aiString path
Definition:
Mesh.h:36
Mesh::Vertex
Definition:
Mesh.h:25
Mesh::Vertex::TexCoords
glm::vec2 TexCoords
Definition:
Mesh.h:29
Mesh::vertices_
std::vector< Vertex > vertices_
Definition:
Mesh.h:50
Mesh::textures_
std::vector< Texture > textures_
Definition:
Mesh.h:54
Generated by
1.8.14