Code_TYMPAN  4.4.0
Industrial site acoustic simulation
altimetry_file_reader.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
25 #ifndef TYMPAN__ALTIMETRYREADER_H__INCLUDED
26 #define TYMPAN__ALTIMETRYREADER_H__INCLUDED
27 
28 #include <memory>
29 #include <vector>
30 #include <string>
31 #include <limits>
32 
33 #include "Tympan/core/exceptions.h"
36 
37 namespace tympan
38 {
39 
40 struct mesh_io_error : /*virtual*/ std::runtime_error, virtual tympan::exception
41 {
42  mesh_io_error(const std::string& desc) : std::runtime_error(desc){};
43 };
44 
46 {
47 public:
49  typedef std::deque<OPoint3D> points_array_t;
51  typedef std::deque<OTriangle> faces_array_t;
53  typedef std::deque<std::string> materials_array_t;
54 
58  virtual const points_array_t& points() const = 0;
59 
63  virtual const faces_array_t& faces() const = 0;
64 
68  virtual const materials_array_t& materials() const = 0;
69 
73  virtual void read() = 0;
74 };
75 
77 std::unique_ptr<IMeshReader> make_altimetry_ply_reader(const std::string filename);
78 
79 }; // namespace tympan
80 
81 #endif // TYMPAN__ALTIMETRYREADER_H__INCLUDED
All base classes related to 3D manipulation.
virtual const materials_array_t & materials() const =0
Getter for the faces read.
virtual const faces_array_t & faces() const =0
Getter for the faces read.
virtual void read()=0
read the file whose name was given at reader's construction time
std::deque< std::string > materials_array_t
Type of the material array returned.
std::deque< OPoint3D > points_array_t
Type of the points array returned.
std::deque< OTriangle > faces_array_t
Type of the faces array returned.
virtual const points_array_t & points() const =0
Getter for the points read.
Utilities to handle exceptions and to pretty-print value.
std::unique_ptr< IMeshReader > make_altimetry_ply_reader(const std::string filename)
@ Makes a reader for the file name given as argument
The base exception class for all exceptions specific to Code_TYMPAN.
Definition: exceptions.h:63
mesh_io_error(const std::string &desc)