12#ifndef EBGEOMETRY_PARSER_HPP
13#define EBGEOMETRY_PARSER_HPP
98[[nodiscard]] std::vector<PolygonSoup<T>>
99readPLY(
const std::vector<std::string>& a_filenames);
123[[nodiscard]] std::vector<PolygonSoup<T>>
124readSTL(
const std::vector<std::string>& a_filenames);
148[[nodiscard]] std::vector<PolygonSoup<T>>
149readOBJ(
const std::vector<std::string>& a_filenames);
173[[nodiscard]] std::vector<PolygonSoup<T>>
174readVTK(
const std::vector<std::string>& a_filenames);
195[[nodiscard]]
inline static std::vector<PolygonSoup<T>>
227[[nodiscard]]
inline static std::vector<EBGeometry::DCEL::MeshT<T>>
254[[nodiscard]]
inline static std::vector<FlatMeshSDF<T>>
270template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
290template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
309template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
310[[nodiscard]]
inline static std::vector<MeshSDF<T, K>>
328template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
329[[nodiscard]]
inline static std::vector<MeshSDF<T, K>>
353template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
374template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
394template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
395[[nodiscard]]
inline static std::vector<TriMeshSDF<T, K, W>>
414template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
415[[nodiscard]]
inline static std::vector<TriMeshSDF<T, K, W>>
435[[nodiscard]]
inline static std::vector<Triangle<T>>
447[[nodiscard]]
inline static std::vector<std::vector<Triangle<T>>>
453#include "EBGeometry_ParserImplem.hpp"
Declarations of bounding volume types used in bounding volume hierarchies.
Declaration of a mesh class which stores a DCEL mesh (with signed distance functions)
Declaration of signed distance functions for DCEL meshes.
Declaration of the exception the file readers throw.
Declaration of the polygon soup the file readers return.
Growable bump arena for the GPU memory foundation.
Declaration of a face-id-carrying wrapper around TriangleSoAT.
Declaration of SoA triangle group for SIMD signed-distance evaluation.
Declaration of a triangle class with signed distance functionality.
DCEL mesh class - stores a doubly-connected edge mesh.
Definition EBGeometry_DCEL_Mesh.hpp:102
Signed distance function for a DCEL mesh. Does not use BVHs.
Definition EBGeometry_MeshDistanceFunctions.hpp:99
A FlatMeshSDF must be trivially copyable: that is what lets a rebasedView() be byte-copied into a dev...
Definition EBGeometry_MeshDistanceFunctions.hpp:314
Polygons as a file stores them: vertex coordinates, faces as lists of vertex indices,...
Definition EBGeometry_PolygonSoup.hpp:48
Growable bump arena over a MemoryResource.
Definition EBGeometry_Pool.hpp:210
Signed distance function for a pure triangle mesh using SoA-grouped primitives in a compact (lineariz...
Definition EBGeometry_MeshDistanceFunctions.hpp:626
Construction
The preset BVH construction methods that the library's own BVH users accept.
Definition EBGeometry_PackedBVH.hpp:65
static FlatMeshSDF< T > readIntoFlatMeshSDF(const std::string &a_filename, Pool &a_pool, const OnDefect a_onDefect=OnDefect::Throw)
Read a file into a FlatMeshSDF: the signed distance to its DCEL mesh by a scan over every face,...
PolygonSoup< T > readOBJ(const std::string &a_filename)
Read a Wavefront OBJ file.
Encoding
Simple enum for separating ASCII and binary files.
Definition EBGeometry_Parser.hpp:43
@ Binary
File is binary-encoded.
@ Unknown
Encoding could not be determined.
@ ASCII
File is plain text.
static std::vector< Triangle< T > > readIntoTriangles(const std::string &a_filename, const OnDefect a_onDefect=OnDefect::Throw)
Read a file and return its faces as flat triangles.
FileType
Various supported file types.
Definition EBGeometry_Parser.hpp:53
@ STL
Stereolithography format (.stl)
@ PLY
Polygon File Format (.ply)
@ VTK
Legacy VTK polydata format (.vtk)
@ Unsupported
File type is not recognized.
@ OBJ
Wavefront OBJ format (.obj)
static Parser::Encoding getFileEncoding(const std::string &a_filename)
Determine file encoding (ASCII or binary) by inspecting the file header.
PolygonSoup< T > readPLY(const std::string &a_filename)
Read a Stanford PLY file, ASCII or binary.
static EBGeometry::DCEL::MeshT< T > readIntoDCEL(const std::string &a_filename, Pool &a_pool, const OnDefect a_onDefect=OnDefect::Throw)
Read a file containing a single watertight object and return it as a DCEL mesh.
static Parser::FileType getFileType(const std::string &a_filename)
Determine file type from the file extension.
static MeshSDF< T, K > readIntoMeshSDF(const std::string &a_filename, Pool &a_pool, const BVH::Construction a_construction=BVH::Construction::SAH, const OnDefect a_onDefect=OnDefect::Throw)
Read a file into a MeshSDF: its DCEL mesh with a packed K-ary BVH over the faces.
static PolygonSoup< T > readIntoPolygonSoup(const std::string &a_filename)
Read a file of any supported format, chosen by its extension.
OnDefect
What a file reader does with a mesh whose faces do not form a clean, closed surface.
Definition EBGeometry_ParseError.hpp:89
@ Throw
Throw a ParseError naming the defect. The default.
static TriMeshSDF< T, K, W > readIntoTriMeshSDF(const std::string &a_filename, Pool &a_pool, const BVH::Construction a_construction=BVH::Construction::SAH, const OnDefect a_onDefect=OnDefect::Throw)
Read a file into a TriMeshSDF: its faces as triangles, in SIMD groups of W, under a packed K-ary BVH.
PolygonSoup< T > readVTK(const std::string &a_filename)
Read a legacy VTK POLYDATA file, ASCII or binary.
PolygonSoup< T > readSTL(const std::string &a_filename)
Read an STL file, ASCII or binary.
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
Leaf-size settings for the preset construction methods, one per family of methods.
Definition EBGeometry_PackedBVH.hpp:115