Skip to content

Commit

Permalink
Move IOFlags into its own header
Browse files Browse the repository at this point in the history
  • Loading branch information
dsieger committed Oct 8, 2022
1 parent bada53a commit 58e3701
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 18 deletions.
1 change: 1 addition & 0 deletions src/pmp/SurfaceMesh.h
Expand Up @@ -9,6 +9,7 @@
#include "pmp/Types.h"
#include "pmp/Properties.h"
#include "pmp/BoundingBox.h"
#include "pmp/io/IOFlags.h"

namespace pmp {

Expand Down
13 changes: 0 additions & 13 deletions src/pmp/Types.h
Expand Up @@ -71,17 +71,4 @@ using IndexType = std::uint_least32_t;
//! \defgroup io io
//! \brief Readers and writers for common mesh formats.

//! Flags to control reading and writing options
//! \ingroup io
struct IOFlags
{
bool use_binary = false; //!< read / write binary format
bool use_vertex_normals = false; //!< read / write vertex normals
bool use_vertex_colors = false; //!< read / write vertex colors
bool use_vertex_texcoords = false; //!< read / write vertex texcoords
bool use_face_normals = false; //!< read / write face normals
bool use_face_colors = false; //!< read / write face colors
bool use_halfedge_texcoords = false; //!< read / write halfedge texcoords
};

} // namespace pmp
21 changes: 21 additions & 0 deletions src/pmp/io/IOFlags.h
@@ -0,0 +1,21 @@
// Copyright 2022 the Polygon Mesh Processing Library developers.
// Distributed under a MIT-style license, see LICENSE.txt for details.

#pragma once

namespace pmp {

//! Flags to control reading and writing.
//! \ingroup io
struct IOFlags
{
bool use_binary = false; //!< Read / write binary format.
bool use_vertex_normals = false; //!< Read / write vertex normals.
bool use_vertex_colors = false; //!< Read / write vertex colors.
bool use_vertex_texcoords = false; //!< Read / write vertex texcoords.
bool use_face_normals = false; //!< Read / write face normals.
bool use_face_colors = false; //!< Read / write face colors.
bool use_halfedge_texcoords = false; //!< Read / write halfedge texcoords.
};

} // namespace pmp
2 changes: 1 addition & 1 deletion src/pmp/io/io.h
Expand Up @@ -5,7 +5,7 @@

#include <string>

#include "pmp/Types.h"
#include "pmp/io/IOFlags.h"
#include "pmp/SurfaceMesh.h"

namespace pmp {
Expand Down
2 changes: 1 addition & 1 deletion src/pmp/io/write_obj.h
Expand Up @@ -5,7 +5,7 @@

#include <string>

#include "pmp/Types.h"
#include "pmp/io/IOFlags.h"
#include "pmp/SurfaceMesh.h"

namespace pmp {
Expand Down
2 changes: 1 addition & 1 deletion src/pmp/io/write_off.h
Expand Up @@ -5,7 +5,7 @@

#include <string>

#include "pmp/Types.h"
#include "pmp/io/IOFlags.h"
#include "pmp/SurfaceMesh.h"

namespace pmp {
Expand Down
2 changes: 1 addition & 1 deletion src/pmp/io/write_pmp.h
Expand Up @@ -5,8 +5,8 @@

#include <string>

#include "pmp/io/IOFlags.h"
#include "pmp/SurfaceMesh.h"
#include "pmp/Types.h"

namespace pmp {

Expand Down
2 changes: 1 addition & 1 deletion src/pmp/io/write_stl.h
Expand Up @@ -5,7 +5,7 @@

#include <string>

#include "pmp/Types.h"
#include "pmp/io/IOFlags.h"
#include "pmp/SurfaceMesh.h"

namespace pmp {
Expand Down

0 comments on commit 58e3701

Please sign in to comment.