PolyFEM
Loading...
Searching...
No Matches
OBJWriter.hpp
Go to the documentation of this file.
1
// Modified version of read_obj from libigl to include reading polyline elements
2
// as edges.
3
//
4
// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
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
10
#pragma once
11
12
#include <string>
13
14
#include <Eigen/Core>
15
16
namespace
polyfem::io
17
{
18
class
OBJWriter
19
{
20
public
:
21
OBJWriter
() =
delete
;
22
23
static
bool
write
(
24
const
std::string &path,
25
const
Eigen::MatrixXd &v,
26
const
Eigen::MatrixXi &e,
27
const
Eigen::MatrixXi &f);
28
29
static
bool
write
(
30
const
std::string &path,
31
const
Eigen::MatrixXd &v,
32
const
Eigen::MatrixXi &e_or_f)
33
{
34
if
(e_or_f.cols() == 2)
35
return
write
(path, v, e_or_f, Eigen::MatrixXi());
36
else
37
return
write
(path, v, Eigen::MatrixXi(), e_or_f);
38
}
39
};
40
}
// namespace polyfem::io
polyfem::io::OBJWriter
Definition
OBJWriter.hpp:19
polyfem::io::OBJWriter::write
static bool write(const std::string &path, const Eigen::MatrixXd &v, const Eigen::MatrixXi &e, const Eigen::MatrixXi &f)
Definition
OBJWriter.cpp:18
polyfem::io::OBJWriter::OBJWriter
OBJWriter()=delete
polyfem::io::OBJWriter::write
static bool write(const std::string &path, const Eigen::MatrixXd &v, const Eigen::MatrixXi &e_or_f)
Definition
OBJWriter.hpp:29
polyfem::io
Definition
Evaluator.cpp:22
src
polyfem
io
OBJWriter.hpp
Generated by
1.9.8