libigl v2.5.0
Loading...
Searching...
No Matches
readSTL.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
4// Copyright (C) 2020 Jérémie Dumas <jeremie.dumas@ens-lyon.org>
5//
6// This Source Code Form is subject to the terms of the Mozilla Public License
7// v. 2.0. If a copy of the MPL was not distributed with this file, You can
8// obtain one at http://mozilla.org/MPL/2.0/.
9#ifndef IGL_READSTL_H
10#define IGL_READSTL_H
11#include "igl_inline.h"
12
13#ifndef IGL_NO_EIGEN
14# include <Eigen/Core>
15#endif
16#include <string>
17#include <istream>
18#include <vector>
19#include <array>
20
21namespace igl
22{
39 template <typename DerivedV, typename DerivedF, typename DerivedN>
41 std::istream &input,
42 Eigen::PlainObjectBase<DerivedV> & V,
43 Eigen::PlainObjectBase<DerivedF> & F,
44 Eigen::PlainObjectBase<DerivedN> & N);
46 template <typename TypeV, typename TypeF, typename TypeN>
48 std::istream &input,
49 std::vector<std::array<TypeV, 3> > & V,
50 std::vector<std::array<TypeF, 3> > & F,
51 std::vector<std::array<TypeN, 3> > & N);
54 template <typename DerivedV, typename DerivedF, typename DerivedN>
56 FILE * fp,
57 Eigen::PlainObjectBase<DerivedV> & V,
58 Eigen::PlainObjectBase<DerivedF> & F,
59 Eigen::PlainObjectBase<DerivedN> & N);
60}
61
62#ifndef IGL_STATIC_LIBRARY
63# include "readSTL.cpp"
64#endif
65
66#endif
67
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
bool readSTL(std::istream &input, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N)
Read a mesh from an ascii/binary stl file.