Medusa  1.1
Coordinate Free Mehless Method implementation
STL_fwd.hpp
Go to the documentation of this file.
1 #ifndef MEDUSA_BITS_IO_STL_FWD_HPP_
2 #define MEDUSA_BITS_IO_STL_FWD_HPP_
3 
11 #include <cstdint>
12 #include <iosfwd>
13 #include <vector>
14 #include <cstring>
15 
16 namespace mm {
17 
26 class STL {
27  public:
29  struct Point { float x , y , z ; };
31  struct Triangle {
32  Point normal , p1 , p2 ,
33  p3 ;
34  uint16_t attribute;
35  };
36 
42  static std::vector<Triangle> read(const std::string& filename);
43 };
44 
46 std::ostream& operator<<(std::ostream& os, const STL::Point& p);
48 std::ostream& operator<<(std::ostream& os, const STL::Triangle& v);
49 
50 
51 } // namespace mm
52 
53 #endif // MEDUSA_BITS_IO_STL_FWD_HPP_
mm
Root namespace for the whole library.
Definition: Gaussian.hpp:14
mm::STL::Triangle::normal
Point normal
triangle normal
Definition: STL_fwd.hpp:32
mm::STL::read
static std::vector< Triangle > read(const std::string &filename)
Read a binary STL file.
Definition: STL.cpp:14
mm::operator<<
std::ostream & operator<<(std::ostream &os, const Gaussian< S > &b)
Output basic information about given Gaussian RBF.
Definition: Gaussian.hpp:37
mm::STL::Triangle::p1
Point p1
first point
Definition: STL_fwd.hpp:32
mm::STL::Triangle::attribute
uint16_t attribute
attribute of this triangle
Definition: STL_fwd.hpp:34
mm::STL::Triangle::p3
Point p3
third point
Definition: STL_fwd.hpp:33
mm::STL::Triangle::p2
Point p2
second point
Definition: STL_fwd.hpp:32
mm::STL::Point::z
float z
z coordinate
Definition: STL_fwd.hpp:29
mm::STL::Point
Holds one 3d Point in a STL file.
Definition: STL_fwd.hpp:29
mm::STL::Point::y
float y
y coordinate
Definition: STL_fwd.hpp:29
mm::STL::Point::x
float x
x coordinate
Definition: STL_fwd.hpp:29
mm::STL::Triangle
Holds one STL triangle, which consists of three points, a normal and an attribute.
Definition: STL_fwd.hpp:31
mm::STL
Support for reading stereolithography files: https://en.wikipedia.org/wiki/STL_(file_format)
Definition: STL_fwd.hpp:26