image_zbuffer.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 
20 
21 #ifndef IMAGE_ZBUFFER_HPP
22 #define IMAGE_ZBUFFER_HPP
23 
24 #include <iostream>
25 #include <vector>
26 #include <exception_cpe.hpp>
27 
28 
29 #include <image.hpp>
30 #include <z_buffer.hpp>
31 
32 namespace cpe
33 {
34 
35 class pos2;
36 
38 class image_zbuffer: public image
39 {
40  public:
41 
42  // ********************************************* //
43  // ********************************************* //
44  // CONSTRUCTORS
45  // ********************************************* //
46  // ********************************************* //
47 
49  image_zbuffer();
53  image_zbuffer(int N);
58  image_zbuffer(int Nx,int Ny);
59 
60 
61  // ********************************************* //
62  // ********************************************* //
63  // Zbuffer access
64  // ********************************************* //
65  // ********************************************* //
66 
68  double z(const pos2& index) const;
70  double& z(const pos2& index);
71 
72 
73  // ********************************************* //
74  // ********************************************* //
75  // I/O
76  // ********************************************* //
77  // ********************************************* //
78 
80  void export_z_buffer(const std::string& filename) const;
81 
82 
83  private:
84 
85 
86  // ********************************************* //
87  // ********************************************* //
88  // Internal data
89  // ********************************************* //
90  // ********************************************* //
91 
97 
98 
99 };
100 
101 
102 }
103 
104 #endif