16 #ifndef SURGSIM_DATASTRUCTURES_TRIANGLEMESHPLYREADERDELEGATE_H 17 #define SURGSIM_DATASTRUCTURES_TRIANGLEMESHPLYREADERDELEGATE_H 22 #include "SurgSim/DataStructures/EmptyData.h" 23 #include "SurgSim/DataStructures/PlyReader.h" 24 #include "SurgSim/DataStructures/PlyReaderDelegate.h" 28 namespace DataStructures
48 std::shared_ptr<MeshType>
getMesh();
64 void*
beginVertices(
const std::string& elementName,
size_t vertexCount);
78 void*
beginFaces(
const std::string& elementName,
size_t faceCount);
86 void endFaces(
const std::string& elementName);
88 void* beginEdges(
const std::string& elementName,
size_t edgeCount);
90 void processEdge(
const std::string& elementName);
92 void endEdges(
const std::string& elementName);
106 double x = std::numeric_limits<double>::signaling_NaN();
107 double y = std::numeric_limits<double>::signaling_NaN();
108 double z = std::numeric_limits<double>::signaling_NaN();
110 double s = std::numeric_limits<double>::signaling_NaN();
111 double t = std::numeric_limits<double>::signaling_NaN();
118 unsigned int count = 0;
119 unsigned int* indices =
nullptr;
120 int64_t overrun = -1;
127 std::array<size_t, 3> m_face;
128 std::array<size_t, 2> m_edge = {};
132 bool m_hasTextureCoordinates;
145 #include "SurgSim/DataStructures/TriangleMeshPlyReaderDelegate-inl.h" Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
std::shared_ptr< MeshType > getMesh()
Gets the mesh.
Definition: TriangleMeshPlyReaderDelegate-inl.h:46
bool hasTextureCoordinates()
Definition: TriangleMeshPlyReaderDelegate-inl.h:189
virtual void processVertex(const std::string &elementName)
Callback function to process one vertex.
Definition: TriangleMeshPlyReaderDelegate-inl.h:141
void endFaces(const std::string &elementName)
Callback function to finalize processing of faces.
Definition: TriangleMeshPlyReaderDelegate-inl.h:175
Internal structure, the receiver for data from the "vertex" element Provide space for standard ply ve...
Definition: TriangleMeshPlyReaderDelegate.h:104
bool registerDelegate(PlyReader *reader) override
Registers the delegate with the reader, overridden from.
Definition: TriangleMeshPlyReaderDelegate-inl.h:52
Internal structure, the received for data from the "face" element.
Definition: TriangleMeshPlyReaderDelegate.h:116
void endVertices(const std::string &elementName)
Callback function to finalize processing of vertices.
Definition: TriangleMeshPlyReaderDelegate-inl.h:148
Wrapper for the C .ply file parser This class wraps the main functionality for the original C ...
Definition: PlyReader.h:85
TriangleMeshPlyReaderDelegate()
Default constructor.
Definition: TriangleMeshPlyReaderDelegate-inl.h:24
void endFile()
Callback function to finalize processing of the mesh.
Definition: TriangleMeshPlyReaderDelegate-inl.h:183
Implementation of PlyReaderDelegate for simple triangle meshes.
Definition: TriangleMeshPlyReaderDelegate.h:33
int64_t overrun2
Used to check for buffer overruns.
Definition: TriangleMeshPlyReaderDelegate.h:112
void processFace(const std::string &elementName)
Callback function to process one face.
Definition: TriangleMeshPlyReaderDelegate-inl.h:165
std::shared_ptr< MeshType > m_mesh
The mesh that will be created.
Definition: TriangleMeshPlyReaderDelegate.h:124
void * beginVertices(const std::string &elementName, size_t vertexCount)
Callback function, begin the processing of vertices.
Definition: TriangleMeshPlyReaderDelegate-inl.h:131
bool fileIsAcceptable(const PlyReader &reader) override
Check whether this file is acceptable to the delegate, overridden from.
Definition: TriangleMeshPlyReaderDelegate-inl.h:111
int64_t overrun1
Used to check for buffer overruns.
Definition: TriangleMeshPlyReaderDelegate.h:109
PlyReaderDelegate abstract class.
Definition: PlyReaderDelegate.h:31
void * beginFaces(const std::string &elementName, size_t faceCount)
Callback function, begin the processing of faces.
Definition: TriangleMeshPlyReaderDelegate-inl.h:156