opensurgsim
Public Member Functions | List of all members
SurgSim::Math::SegmentMeshShapePlyReaderDelegate Class Reference

Implementation of ply reader for segment meshes, enable to read the radius from the ply file. More...

#include <SegmentMeshShapePlyReaderDelegate.h>

Inheritance diagram for SurgSim::Math::SegmentMeshShapePlyReaderDelegate:
SurgSim::DataStructures::TriangleMeshPlyReaderDelegate< SegmentMeshShape > SurgSim::DataStructures::PlyReaderDelegate

Public Member Functions

 SegmentMeshShapePlyReaderDelegate ()
 Constructor.
 
 SegmentMeshShapePlyReaderDelegate (const std::shared_ptr< Math::SegmentMeshShape > &shape)
 
 ~SegmentMeshShapePlyReaderDelegate ()
 Destructor.
 
void * beginRadius (const std::string &element, size_t value)
 Delegate function to begin radius processing. More...
 
void processRadius (const std::string &element)
 Callback function to process the radius. More...
 
bool registerDelegate (DataStructures::PlyReader *reader) override
 Registers the delegate with the reader. More...
 
bool fileIsAcceptable (const DataStructures::PlyReader &reader) override
 Check whether the file in the reader can be used with this delegate, this gives the delegate a chance to make sure that all the elements and properties that are required are available in the file encapsulated by the reader.
 
- Public Member Functions inherited from SurgSim::DataStructures::TriangleMeshPlyReaderDelegate< SegmentMeshShape >
 TriangleMeshPlyReaderDelegate ()
 Default constructor.
 
 TriangleMeshPlyReaderDelegate (std::shared_ptr< MeshType > mesh)
 Constructor. More...
 
std::shared_ptr< MeshType > getMesh ()
 Gets the mesh. More...
 
bool registerDelegate (PlyReader *reader) override
 Registers the delegate with the reader, overridden from. More...
 
bool fileIsAcceptable (const PlyReader &reader) override
 Check whether this file is acceptable to the delegate, overridden from. More...
 
void * beginVertices (const std::string &elementName, size_t vertexCount)
 Callback function, begin the processing of vertices. More...
 
virtual void processVertex (const std::string &elementName)
 Callback function to process one vertex. More...
 
void endVertices (const std::string &elementName)
 Callback function to finalize processing of vertices. More...
 
void * beginFaces (const std::string &elementName, size_t faceCount)
 Callback function, begin the processing of faces. More...
 
void processFace (const std::string &elementName)
 Callback function to process one face. More...
 
void endFaces (const std::string &elementName)
 Callback function to finalize processing of faces. More...
 
void * beginEdges (const std::string &elementName, size_t edgeCount)
 
void processEdge (const std::string &elementName)
 
void endEdges (const std::string &elementName)
 
void endFile ()
 Callback function to finalize processing of the mesh.
 
- Public Member Functions inherited from SurgSim::DataStructures::PlyReaderDelegate
virtual ~PlyReaderDelegate ()
 Virtual destructor.
 

Additional Inherited Members

- Public Types inherited from SurgSim::DataStructures::TriangleMeshPlyReaderDelegate< SegmentMeshShape >
typedef SegmentMeshShape MeshType
 
- Protected Member Functions inherited from SurgSim::DataStructures::TriangleMeshPlyReaderDelegate< SegmentMeshShape >
bool hasTextureCoordinates ()
 
- Protected Attributes inherited from SurgSim::DataStructures::TriangleMeshPlyReaderDelegate< SegmentMeshShape >
struct SurgSim::DataStructures::TriangleMeshPlyReaderDelegate::VertexData m_vertexData
 
struct SurgSim::DataStructures::TriangleMeshPlyReaderDelegate::ListData m_listData
 
std::shared_ptr< MeshType > m_mesh
 The mesh that will be created.
 
std::array< size_t, 3 > m_face
 
std::array< size_t, 2 > m_edge
 

Detailed Description

Implementation of ply reader for segment meshes, enable to read the radius from the ply file.

Member Function Documentation

§ beginRadius()

void * SurgSim::Math::SegmentMeshShapePlyReaderDelegate::beginRadius ( const std::string &  element,
size_t  value 
)

Delegate function to begin radius processing.

Parameters
elementthe name of the element being processed 'radius' in this case, it is ignored
valuethe number of radius entries should be == 1
Returns
the address for ply to deposit the radius data

§ processRadius()

void SurgSim::Math::SegmentMeshShapePlyReaderDelegate::processRadius ( const std::string &  element)

Callback function to process the radius.

Parameters
elementthe name of element being processed 'radius' in this case, it is ignored

§ registerDelegate()

bool SurgSim::Math::SegmentMeshShapePlyReaderDelegate::registerDelegate ( DataStructures::PlyReader reader)
overridevirtual

Registers the delegate with the reader.

Parameters
[out]readerThe reader that should be used by the delegate.
Returns
true usually if the reader is valid and fileIsAcceptable() is true.

Implements SurgSim::DataStructures::PlyReaderDelegate.


The documentation for this class was generated from the following files: