12#ifndef EBGEOMETRY_PARSER_HPP
13#define EBGEOMETRY_PARSER_HPP
67getFileType(
const std::string& a_filename);
75getFileEncoding(
const std::string& a_filename);
98[[nodiscard]] std::vector<PolygonSoup<T>>
99readPLY(
const std::vector<std::string>& a_filenames);
122[[nodiscard]] std::vector<PolygonSoup<T>>
123readSTL(
const std::vector<std::string>& a_filenames);
146[[nodiscard]] std::vector<PolygonSoup<T>>
147readOBJ(
const std::vector<std::string>& a_filenames);
171[[nodiscard]] std::vector<PolygonSoup<T>>
172readVTK(
const std::vector<std::string>& a_filenames);
183readIntoPolygonSoup(
const std::string& a_filename);
193[[nodiscard]]
inline static std::vector<PolygonSoup<T>>
194readIntoPolygonSoup(
const std::vector<std::string>& a_files);
225[[nodiscard]]
inline static std::vector<EBGeometry::DCEL::MeshT<T>>
252[[nodiscard]]
inline static std::vector<FlatMeshSDF<T>>
268template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
270readIntoMeshSDF(
const std::string& a_filename,
288template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
290readIntoMeshSDF(
const std::string& a_filename,
307template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
308[[nodiscard]]
inline static std::vector<MeshSDF<T, K>>
309readIntoMeshSDF(
const std::vector<std::string>& a_files,
326template <typename T, size_t K = BVH::DefaultBranchingRatio<T>()>
327[[nodiscard]]
inline static std::vector<MeshSDF<T, K>>
328readIntoMeshSDF(
const std::vector<std::string>& a_files,
351template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
353readIntoTriMeshSDF(
const std::string& a_filename,
372template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
374readIntoTriMeshSDF(
const std::string& a_filename,
392template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
393[[nodiscard]]
inline static std::vector<TriMeshSDF<T, K, W>>
394readIntoTriMeshSDF(
const std::vector<std::string>& a_files,
412template <typename T, size_t K = BVH::DefaultBranchingRatio<T>(),
size_t W = TriangleSoA::DefaultWidth<T>()>
413[[nodiscard]]
inline static std::vector<TriMeshSDF<T, K, W>>
414readIntoTriMeshSDF(
const std::vector<std::string>& a_files,
433[[nodiscard]]
inline static std::vector<Triangle<T>>
445[[nodiscard]]
inline static std::vector<std::vector<Triangle<T>>>
451#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:100
Signed distance function for a DCEL mesh. Does not use BVHs.
Definition EBGeometry_MeshDistanceFunctions.hpp:79
A FlatMeshSDF must be trivially copyable: that is what lets a rebasedView() be byte-copied into a dev...
Definition EBGeometry_MeshDistanceFunctions.hpp:249
Polygons as a file stores them: vertex coordinates, faces as lists of vertex indices,...
Definition EBGeometry_PolygonSoup.hpp:47
Growable bump arena over a MemoryResource.
Definition EBGeometry_Pool.hpp:183
Signed distance function for a pure triangle mesh using SoA-grouped primitives in a compact (lineariz...
Definition EBGeometry_MeshDistanceFunctions.hpp:514
Construction
The preset BVH construction methods that the library's own BVH users accept.
Definition EBGeometry_PackedBVH.hpp:65
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.
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)
PolygonSoup< T > readPLY(const std::string &a_filename)
Read a Stanford PLY file, ASCII or binary.
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.
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