Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SurgSim::Physics::FemPlyReaderDelegate Class Referenceabstract

Common part of implementation of PlyReaderDelegate for FemRepresentations. More...

#include <SurgSim/Physics/FemPlyReaderDelegate.h>

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

Classes

struct  ElementData
 Internal data to receive the fem element. More...
 
struct  MaterialData
 Internal data to receive the "material" data. More...
 
struct  Vertex6DData
 Vertex data containing 6 dofs (3 translational and 3 rotational) More...
 

Public Member Functions

 FemPlyReaderDelegate ()
 Constructor. More...
 
- Public Member Functions inherited from SurgSim::DataStructures::PlyReaderDelegate
virtual ~PlyReaderDelegate ()
 Virtual destructor. More...
 

Protected Member Functions

virtual std::string getElementName () const =0
 
bool registerDelegate (SurgSim::DataStructures::PlyReader *reader) override
 Registers the delegate with the reader. More...
 
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 ()=0
 Callback for end of PlyReader::parseFile. More...
 
virtual void * beginVertices (const std::string &elementName, size_t vertexCount)
 Callback function, begin the processing of vertices. More...
 
virtual void processVertex (const std::string &elementName)=0
 Callback function to process one vertex. More...
 
virtual 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...
 
virtual void processFemElement (const std::string &elementName)=0
 Callback function to process one FemElement. 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...
 
virtual void processBoundaryCondition (const std::string &elementName)=0
 Callback function to process one boundary condition. More...
 

Protected Attributes

struct SurgSim::Physics::FemPlyReaderDelegate::Vertex6DData m_vertexData
 
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...
 
struct SurgSim::Physics::FemPlyReaderDelegate::MaterialData m_materialData
 
bool m_hasMaterial
 
bool m_hasPerElementMaterial
 
struct SurgSim::Physics::FemPlyReaderDelegate::ElementData m_elementData
 
bool m_hasRotationDOF
 

Detailed Description

Common part of implementation of PlyReaderDelegate for FemRepresentations.

This is an abstract class and needs to be inherited. Methods 'registerDelegate()' and 'fileIsAcceptable()' need to be overridden.

Constructor & Destructor Documentation

◆ FemPlyReaderDelegate()

SurgSim::Physics::FemPlyReaderDelegate::FemPlyReaderDelegate ( )

Constructor.

Member Function Documentation

◆ beginBoundaryConditions()

void * SurgSim::Physics::FemPlyReaderDelegate::beginBoundaryConditions ( const std::string elementName,
size_t  boundaryConditionCount 
)
protected

Callback function, begin the processing of boundary conditions.

Parameters
elementNameName of the element.
boundaryConditionCountNumber of boundary conditions.
Returns
memory for boundary conditions data to the reader.

◆ beginFemElements()

void * SurgSim::Physics::FemPlyReaderDelegate::beginFemElements ( const std::string elementName,
size_t  elementCount 
)
protected

Callback function, begin the processing of FemElements.

Parameters
elementNameName of the element.
elementCountNumber of elements.
Returns
memory for FemElement data to the reader.

◆ beginMaterials()

void * SurgSim::Physics::FemPlyReaderDelegate::beginMaterials ( const std::string elementName,
size_t  materialCount 
)
protected

Callback function, begin the processing of materials.

Parameters
elementNameName of the element.
materialCountNumber of materials.
Returns
memory for material data to the reader.

◆ beginVertices()

void * SurgSim::Physics::FemPlyReaderDelegate::beginVertices ( const std::string elementName,
size_t  vertexCount 
)
protectedvirtual

Callback function, begin the processing of vertices.

Parameters
elementNameName of the element.
vertexCountNumber of vertices.
Returns
memory for vertex data to the reader.

◆ endFemElements()

void SurgSim::Physics::FemPlyReaderDelegate::endFemElements ( const std::string elementName)
protected

Callback function to finalize processing of FemElements.

Parameters
elementNameName of the element.

◆ endMaterials()

void SurgSim::Physics::FemPlyReaderDelegate::endMaterials ( const std::string elementName)
protected

Callback function, end the processing of materials.

Parameters
elementNameName of the element.

◆ endParseFile()

virtual void SurgSim::Physics::FemPlyReaderDelegate::endParseFile ( )
protectedpure virtual

◆ endVertices()

void SurgSim::Physics::FemPlyReaderDelegate::endVertices ( const std::string elementName)
protectedvirtual

Callback function to finalize processing of vertices.

Parameters
elementNameName of the element.

◆ fileIsAcceptable()

bool SurgSim::Physics::FemPlyReaderDelegate::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.

Implements SurgSim::DataStructures::PlyReaderDelegate.

◆ getElementName()

virtual std::string SurgSim::Physics::FemPlyReaderDelegate::getElementName ( ) const
protectedpure virtual

◆ processBoundaryCondition()

virtual void SurgSim::Physics::FemPlyReaderDelegate::processBoundaryCondition ( const std::string elementName)
protectedpure virtual

Callback function to process one boundary condition.

Parameters
elementNameName of the element.

Implemented in SurgSim::Physics::Fem3DPlyReaderDelegate, SurgSim::Physics::Fem2DPlyReaderDelegate, and SurgSim::Physics::Fem1DPlyReaderDelegate.

◆ processFemElement()

virtual void SurgSim::Physics::FemPlyReaderDelegate::processFemElement ( const std::string elementName)
protectedpure virtual

Callback function to process one FemElement.

Parameters
elementNameName of the element.

Implemented in SurgSim::Physics::Fem3DPlyReaderDelegate, SurgSim::Physics::Fem2DPlyReaderDelegate, and SurgSim::Physics::Fem1DPlyReaderDelegate.

◆ processVertex()

virtual void SurgSim::Physics::FemPlyReaderDelegate::processVertex ( const std::string elementName)
protectedpure virtual

Callback function to process one vertex.

Parameters
elementNameName of the element.

Implemented in SurgSim::Physics::Fem3DPlyReaderDelegate, SurgSim::Physics::Fem2DPlyReaderDelegate, and SurgSim::Physics::Fem1DPlyReaderDelegate.

◆ registerDelegate()

bool SurgSim::Physics::FemPlyReaderDelegate::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.

Implements SurgSim::DataStructures::PlyReaderDelegate.

Member Data Documentation

◆ m_boundaryConditionData

unsigned int SurgSim::Physics::FemPlyReaderDelegate::m_boundaryConditionData
protected

Internal data to receive the "boundary_condition" element.

◆ m_elementData

struct SurgSim::Physics::FemPlyReaderDelegate::ElementData SurgSim::Physics::FemPlyReaderDelegate::m_elementData
protected

◆ m_hasBoundaryConditions

bool SurgSim::Physics::FemPlyReaderDelegate::m_hasBoundaryConditions
protected

Flag indicating if the associated file has boundary conditions.

◆ m_hasMaterial

bool SurgSim::Physics::FemPlyReaderDelegate::m_hasMaterial
protected

◆ m_hasPerElementMaterial

bool SurgSim::Physics::FemPlyReaderDelegate::m_hasPerElementMaterial
protected

◆ m_hasRotationDOF

bool SurgSim::Physics::FemPlyReaderDelegate::m_hasRotationDOF
protected

◆ m_materialData

struct SurgSim::Physics::FemPlyReaderDelegate::MaterialData SurgSim::Physics::FemPlyReaderDelegate::m_materialData
protected

◆ m_vertexData

struct SurgSim::Physics::FemPlyReaderDelegate::Vertex6DData SurgSim::Physics::FemPlyReaderDelegate::m_vertexData
protected

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