Main Page
Namespaces
Classes
Files
File List
File Members
surface_param_drawable.hpp
Go to the documentation of this file.
1
/*
2
** TP CPE Lyon
3
** Copyright (C) 2013 Damien Rohmer
4
**
5
** This program is free software: you can redistribute it and/or modify
6
** it under the terms of the GNU General Public License as published by
7
** the Free Software Foundation, either version 3 of the License, or
8
** (at your option) any later version.
9
**
10
** This program is distributed in the hope that it will be useful,
11
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
** GNU General Public License for more details.
14
**
15
** You should have received a copy of the GNU General Public License
16
** along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef _SURFACE_PARAM_DRAWABLE_HPP_
20
#define _SURFACE_PARAM_DRAWABLE_HPP_
21
22
#include <
surface_param.hpp
>
23
#include <
vec3.hpp
>
24
#include <
quad_index.hpp
>
25
26
namespace
cpe
27
{
28
29
30
32
class
surface_param_drawable
:
public
surface_param
33
{
34
public
:
35
36
// ********************************************* //
37
// ********************************************* //
38
// CONSTRUCTORS
39
// ********************************************* //
40
// ********************************************* //
41
43
surface_param_drawable
();
45
surface_param_drawable
(
const
unsigned
int
& Nu,
const
unsigned
int
& Nv);
46
47
// ********************************************* //
48
// ********************************************* //
49
// Update drawing parameters
50
// ********************************************* //
51
// ********************************************* //
52
54
void
update_connectivity
();
55
57
void
set_normal
(
const
unsigned
int
ku,
const
unsigned
int
kv,
const
cpe::vec3
n);
58
59
60
// ********************************************* //
61
// ********************************************* //
62
// Get drawing pointers
63
// ********************************************* //
64
// ********************************************* //
65
67
const
unsigned
int
*
pointer_draw_connectivity
()
const
;
69
const
float
*
pointer_draw_normal
()
const
;
71
const
float
*
pointer_draw_vertices
()
const
;
72
73
74
75
76
77
private
:
78
80
void
build_connectivity
();
81
83
std::vector<quad_index>
internal_connectivity
;
85
std::vector<vec3>
internal_normal
;
86
88
unsigned
int
internal_old_size_u
;
90
unsigned
int
internal_old_size_v
;
91
};
92
}
93
94
#endif
libspline
surface_param_drawable.hpp
Generated on Sun Apr 28 2013 11:11:29 by
1.8.3.1