-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMallaRevol.hpp
94 lines (82 loc) · 2.69 KB
/
MallaRevol.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// *********************************************************************
// **
// ** Informática Gráfica, curso 2016-17
// ** Declaraciones de la clase MallaRevol
// **
// *********************************************************************
#ifndef IG_MALLAREVOL_HPP
#define IG_MALLAREVOL_HPP
#include <vector> // usar std::vector
#include <string>
#include "MallaInd.hpp" // declaración de 'Objeto3D'
// ---------------------------------------------------------------------
// clase para objetos gráficos genéricos
class MallaRevol : public MallaInd{
protected:
void crearMallaRevol(
const std::vector<Tupla3f> & perfil_original,
const bool crear_tapas,
const bool cerrar_malla,
const bool crear_texturas);
unsigned
nper , // numero de perfiles
nvp ; // numero de vertices por perfil
public:
// crea una malla de revolucion
MallaRevol( const std::string & nombre);
// crea una malla de revolucion tomando el perfil de un archivo
MallaRevol( const std::string & nombre_arch,
const unsigned nperfiles,
const bool crear_tapas,
const bool cerrar_malla,
const bool crear_texturas);
} ;
class Cilindro : public MallaRevol
{
public:
Cilindro( const unsigned num_verts_per,
const unsigned nperfiles,
const bool crear_tapas,
const bool cerrar_malla,
const bool crear_texturas);
};
class Cilindroide : public MallaRevol
{
public:
Cilindroide( const float rad_base_sup,
const unsigned num_verts_per,
const unsigned nperfiles,
const bool crear_tapas,
const bool cerrar_malla,
const bool crear_texturas);
};
class Esfera : public MallaRevol
{
public:
Esfera( const unsigned num_verts_per,
const unsigned nperfiles,
const bool crear_tapas,
const bool cerrar_malla,
const bool crear_texturas);
};
class Cono : public MallaRevol
{
public:
Cono( const unsigned num_verts_per,
const unsigned nperfiles,
const bool crear_tapas,
const bool cerrar_malla,
const bool crear_texturas);
};
// *****************************************************************************
// Parcial 1 Prácticas
class MallaRevolRegular : public MallaRevol
{
public:
MallaRevolRegular(
const unsigned nperfiles,
const float r1,
const float r2,
const float nlados);
};
#endif