Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SurgSim::Physics::Fem2DPlyReaderDelegate Class Reference

Implementation of PlyReaderDelegate for Fem2DRepresentation. More...

#include <SurgSim/Physics/Fem2DPlyReaderDelegate.h>

Inheritance diagram for SurgSim::Physics::Fem2DPlyReaderDelegate:
SurgSim::Physics::FemPlyReaderDelegate SurgSim::DataStructures::PlyReaderDelegate

Public Member Functions

 Fem2DPlyReaderDelegate (std::shared_ptr< Fem2DRepresentation > fem)
 Constructor. More...
 
- Public Member Functions inherited from SurgSim::Physics::FemPlyReaderDelegate
 FemPlyReaderDelegate (std::shared_ptr< FemRepresentation > fem)
 Constructor. More...
 
- Public Member Functions inherited from SurgSim::DataStructures::PlyReaderDelegate
virtual ~PlyReaderDelegate ()
 Virtual destructor. More...
 

Protected Member Functions

virtual std::string getElementName () const override
 
virtual bool registerDelegate (SurgSim::DataStructures::PlyReader *reader) override
 Registers the delegate with the reader. More...
 
virtual bool fileIsAcceptable (const SurgSim::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...
 
virtual void endParseFile () override
 Callback for end of PlyReader::parseFile. More...
 
virtual void processFemElement (const std::string &elementName) override
 Callback function to process one FemElement. More...
 
void * beginThickness (const std::string &elementName, size_t thicknessCount)
 Callback function, begin the processing of thickness. More...
 
void endThickness (const std::string &elementName)
 Callback function, end the processing of thickness. More...
 
- Protected Member Functions inherited from SurgSim::Physics::FemPlyReaderDelegate
void startParseFile ()
 Callback for beginning of PlyReader::parseFile. More...
 
void * beginVertices (const std::string &elementName, size_t vertexCount)
 Callback function, begin the processing of vertices. More...
 
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 * beginFemElements (const std::string &elementName, size_t elementCount)
 Callback function, begin the processing of FemElements. More...
 
void endFemElements (const std::string &elementName)
 Callback function to finalize processing of FemElements. More...
 
void * beginMaterials (const std::string &elementName, size_t materialCount)
 Callback function, begin the processing of materials. More...
 
void endMaterials (const std::string &elementName)
 Callback function, end the processing of materials. More...
 
void * beginBoundaryConditions (const std::string &elementName, size_t boundaryConditionCount)
 Callback function, begin the processing of boundary conditions. More...
 
void processBoundaryCondition (const std::string &elementName)
 Callback function to process one boundary condition. More...
 

Private Attributes

double m_thickness
 

Additional Inherited Members

- Protected Attributes inherited from SurgSim::Physics::FemPlyReaderDelegate
bool m_hasBoundaryConditions
 Flag indicating if the associated file has boundary conditions. More...
 
unsigned int m_boundaryConditionData
 Internal data to receive the "boundary_condition" element. More...
 
double * m_vertexIterator
 Internal iterator to save the "vertex" element. More...
 
std::array< double, 3 > m_vertexData
 Internal data to receive the "vertex" element. More...
 
std::shared_ptr< FemRepresentationm_fem
 The fem that will be created by loading. More...
 
std::shared_ptr< SurgSim::Math::OdeStatem_state
 The state that will be created by loading. More...
 
struct SurgSim::Physics::FemPlyReaderDelegate::MaterialData m_materialData
 
struct SurgSim::Physics::FemPlyReaderDelegate::ElementData m_femData
 

Detailed Description

Implementation of PlyReaderDelegate for Fem2DRepresentation.

Constructor & Destructor Documentation

SurgSim::Physics::Fem2DPlyReaderDelegate::Fem2DPlyReaderDelegate ( std::shared_ptr< Fem2DRepresentation fem)
explicit

Constructor.

Parameters
femThe object that is updated when PlyReader::parseFile is called.

Member Function Documentation

void * SurgSim::Physics::Fem2DPlyReaderDelegate::beginThickness ( const std::string elementName,
size_t  thicknessCount 
)
protected

Callback function, begin the processing of thickness.

Parameters
elementNameName of the element.
thicknessCountNumber of thicknesses.
Returns
memory for thickness data to the reader.
void SurgSim::Physics::Fem2DPlyReaderDelegate::endParseFile ( )
overrideprotectedvirtual

Callback for end of PlyReader::parseFile.

Reimplemented from SurgSim::Physics::FemPlyReaderDelegate.

void SurgSim::Physics::Fem2DPlyReaderDelegate::endThickness ( const std::string elementName)
protected

Callback function, end the processing of thickness.

Parameters
elementNameName of the element.
bool SurgSim::Physics::Fem2DPlyReaderDelegate::fileIsAcceptable ( const SurgSim::DataStructures::PlyReader reader)
overrideprotectedvirtual

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.

Reimplemented from SurgSim::Physics::FemPlyReaderDelegate.

std::string SurgSim::Physics::Fem2DPlyReaderDelegate::getElementName ( ) const
overrideprotectedvirtual
void SurgSim::Physics::Fem2DPlyReaderDelegate::processFemElement ( const std::string elementName)
overrideprotectedvirtual

Callback function to process one FemElement.

Parameters
elementNameName of the element.

Implements SurgSim::Physics::FemPlyReaderDelegate.

bool SurgSim::Physics::Fem2DPlyReaderDelegate::registerDelegate ( SurgSim::DataStructures::PlyReader reader)
overrideprotectedvirtual

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.

Reimplemented from SurgSim::Physics::FemPlyReaderDelegate.

Member Data Documentation

double SurgSim::Physics::Fem2DPlyReaderDelegate::m_thickness
private

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