EBGeometry 1.0
Loading...
Searching...
No Matches
EBGeometry_PLY.hpp
1/* EBGeometry
2 * Copyright © 2026 Robert Marskar
3 * Please refer to Copyright.txt and LICENSE in the EBGeometry root directory.
4 */
5
6#ifndef EBGeometry_PLY
7#define EBGeometry_PLY
8
9// Std includes
10#include <array>
11#include <vector>
12
13// Our includes
14#include "EBGeometry_Vec.hpp"
16
21template <typename T>
22class PLY
23{
24public:
29
34 PLY(const std::string a_id) noexcept;
35
40
44 std::string&
46
50 const std::string&
52
57 std::vector<Vec3T<T>>&
59
64 const std::vector<Vec3T<T>>&
66
71 std::vector<std::vector<size_t>>&
73
78 const std::vector<std::vector<size_t>>&
80
87 std::vector<T>&
89
96 const std::vector<T>&
98
105 std::vector<T>&
107
114 const std::vector<T>&
116
122 void
124
130 void
132
139 std::shared_ptr<EBGeometry::DCEL::MeshT<T, Meta>>
141
146 std::string m_id;
147
152
156 std::vector<std::vector<size_t>> m_facets;
157
161 std::map<std::string, std::vector<T>> m_vertexProperties;
162
166 std::map<std::string, std::vector<T>> m_faceProperties;
167};
168
169#include "EBGeometry_NamespaceFooter.hpp"
170
171#include "EBGeometry_PLYImplem.hpp"
172
173#endif
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Class for storing Stanford PLY meshes.
Definition EBGeometry_PLY.hpp:23
void setVertexProperties(const std::string a_property, const std::vector< T > &a_data) noexcept
Set vertex properties.
std::map< std::string, std::vector< T > > m_vertexProperties
Vertex properties.
Definition EBGeometry_PLY.hpp:161
std::vector< std::vector< size_t > > m_facets
Faces – each entry in the outer vector contains the indices defining one face.
Definition EBGeometry_PLY.hpp:156
void setFaceProperties(const std::string a_property, const std::vector< T > &a_data) noexcept
Set face properties.
std::vector< Vec3T< T > > m_vertexCoordinates
Vertex coordinates.
Definition EBGeometry_PLY.hpp:151
std::shared_ptr< EBGeometry::DCEL::MeshT< T, Meta > > convertToDCEL() const noexcept
Turn the PLY mesh into a DCEL mesh.
std::vector< T > & getFaceProperties(const std::string a_property) noexcept
Get the face properties.
std::vector< T > & getVertexProperties(const std::string a_property) noexcept
Get the vertex properties.
std::string & getID() noexcept
Get the identifier for this object.
std::vector< std::vector< size_t > > & getFacets() noexcept
Get the face indices.
std::string m_id
PLY object ID.
Definition EBGeometry_PLY.hpp:146
std::vector< Vec3T< T > > & getVertexCoordinates() noexcept
Get the vertex coordinates.
PLY() noexcept
Default constructor. Initializes empty member data holder.
std::map< std::string, std::vector< T > > m_faceProperties
Face properties.
Definition EBGeometry_PLY.hpp:166
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:218
Namespace containing various double-connected edge list (DCEL) functionality.
Name space for all of EBGeometry.
Definition EBGeometry.hpp:23