libigl v2.5.0
Loading...
Searching...
No Matches
readOFF.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//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_READOFF_H
9#define IGL_READOFF_H
10#include "igl_inline.h"
11// History:
12// return type changed from void to bool Alec 18 Sept 2011
13
14#ifndef IGL_NO_EIGEN
15# include <Eigen/Core>
16#endif
17#include <string>
18#include <vector>
19#include <cstdio>
20
21namespace igl
22{
35 template <typename Scalar, typename Index>
37 const std::string off_file_name,
38 std::vector<std::vector<Scalar > > & V,
39 std::vector<std::vector<Index > > & F,
40 std::vector<std::vector<Scalar > > & N,
41 std::vector<std::vector<Scalar > > & C);
43 template <typename DerivedV, typename DerivedF>
45 const std::string str,
46 Eigen::PlainObjectBase<DerivedV>& V,
47 Eigen::PlainObjectBase<DerivedF>& F);
49 template <typename DerivedV, typename DerivedF>
51 const std::string str,
52 Eigen::PlainObjectBase<DerivedV>& V,
53 Eigen::PlainObjectBase<DerivedF>& F,
54 Eigen::PlainObjectBase<DerivedV>& N);
57 template <typename Scalar, typename Index>
59 FILE * off_file,
60 std::vector<std::vector<Scalar > > & V,
61 std::vector<std::vector<Index > > & F,
62 std::vector<std::vector<Scalar > > & N,
63 std::vector<std::vector<Scalar > > & C);
64
65}
66
67#ifndef IGL_STATIC_LIBRARY
68# include "readOFF.cpp"
69#endif
70
71#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
bool readOFF(const std::string off_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &F, std::vector< std::vector< Scalar > > &N, std::vector< std::vector< Scalar > > &C)
Read a mesh from an ascii OFF file, filling in vertex positions, normals and texture coordinates.