Code_TYMPAN  4.4.0
Industrial site acoustic simulation
altimetry_file_reader.h
Go to the documentation of this file.
1 
10 #ifndef TYMPAN__ALTIMETRYREADER_H__INCLUDED
11 #define TYMPAN__ALTIMETRYREADER_H__INCLUDED
12 
13 #include <memory>
14 #include <vector>
15 #include <string>
16 
17 #include "Tympan/core/exceptions.h"
20 
21 namespace tympan
22 {
23 
24 struct mesh_io_error : /*virtual*/ std::runtime_error, virtual tympan::exception
25 {
26  mesh_io_error(const std::string& desc) : std::runtime_error(desc){};
27 };
28 
30 {
31 public:
33  typedef std::deque<OPoint3D> points_array_t;
35  typedef std::deque<OTriangle> faces_array_t;
37  typedef std::deque<std::string> materials_array_t;
38 
42  virtual const points_array_t& points() const = 0;
43 
47  virtual const faces_array_t& faces() const = 0;
48 
52  virtual const materials_array_t& materials() const = 0;
53 
57  virtual void read() = 0;
58 };
59 
61 std::unique_ptr<IMeshReader> make_altimetry_ply_reader(const std::string filename);
62 
63 }; // namespace tympan
64 
65 #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:48
mesh_io_error(const std::string &desc)