SurgSim::Math::SegmentMeshShapePlyReaderDelegate Class Reference

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

`#include <SurgSim/Math/SegmentMeshShapePlyReaderDelegate.h>`

Inheritance diagram for SurgSim::Math::SegmentMeshShapePlyReaderDelegate:

## Public Member Functions

| SegmentMeshShapePlyReaderDelegate ()
| Constructor. More...
| SegmentMeshShapePlyReaderDelegate (const std::shared_ptr< Math::SegmentMeshShape > &shape)
| ~SegmentMeshShapePlyReaderDelegate ()
| Destructor. More...
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. More...
Public Member Functions inherited from SurgSim::DataStructures::TriangleMeshPlyReaderDelegate< SegmentMeshShape >
| TriangleMeshPlyReaderDelegate ()
| Default constructor. More...
| 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. More...
Public Member Functions inherited from SurgSim::DataStructures::PlyReaderDelegate
virtual | ~PlyReaderDelegate ()
| Virtual destructor. More...

## Private Attributes

bool | m_hasRadius
double | m_radius
std::shared_ptr< Math::SegmentMeshShape > | m_shape

## 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. More...
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.

## Constructor & Destructor Documentation

## SegmentMeshShapePlyReaderDelegate() [1/2]

SurgSim::Math::SegmentMeshShapePlyReaderDelegate::SegmentMeshShapePlyReaderDelegate | ( |  | ) |

Constructor.

## SegmentMeshShapePlyReaderDelegate() [2/2]

SurgSim::Math::SegmentMeshShapePlyReaderDelegate::SegmentMeshShapePlyReaderDelegate | ( | const std::shared_ptr< Math::SegmentMeshShape > & | shape | ) |

explicit

## ~SegmentMeshShapePlyReaderDelegate()

SurgSim::Math::SegmentMeshShapePlyReaderDelegate::~SegmentMeshShapePlyReaderDelegate | ( |  | ) |

Destructor.

## Member Function Documentation

## beginRadius()

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

Delegate function to begin radius processing.

Parameters

  element | the name of the element being processed 'radius' in this case, it is ignored
  value | the number of radius entries should be == 1

Returns
  the address for ply to deposit the radius data

## fileIsAcceptable()

bool SurgSim::Math::SegmentMeshShapePlyReaderDelegate::fileIsAcceptable | ( | const DataStructures::PlyReader & | reader | ) |

override virtual

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.

Implements SurgSim::DataStructures::PlyReaderDelegate.

## processRadius()

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

Callback function to process the radius.

Parameters

  element | the name of element being processed 'radius' in this case, it is ignored

## registerDelegate()

bool SurgSim::Math::SegmentMeshShapePlyReaderDelegate::registerDelegate | ( | DataStructures::PlyReader * | reader | ) |

override virtual

Registers the delegate with the reader.

Parameters

  [out] | reader | The reader that should be used by the delegate.

Returns
  true usually if the reader is valid and fileIsAcceptable() is true.

Implements SurgSim::DataStructures::PlyReaderDelegate.

## Member Data Documentation

## m_hasRadius

bool SurgSim::Math::SegmentMeshShapePlyReaderDelegate::m_hasRadius

private

## m_radius

double SurgSim::Math::SegmentMeshShapePlyReaderDelegate::m_radius

private

## m_shape

std::shared_ptr<Math::SegmentMeshShape> SurgSim::Math::SegmentMeshShapePlyReaderDelegate::m_shape

private

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

- SurgSim/Math/SegmentMeshShapePlyReaderDelegate.h
- SurgSim/Math/SegmentMeshShapePlyReaderDelegate.cpp