16 #ifndef SURGSIM_PHYSICS_FEMPLYREADERDELEGATE_H
17 #define SURGSIM_PHYSICS_FEMPLYREADERDELEGATE_H
34 class FemRepresentation;
63 void*
beginVertices(
const std::string& elementName,
size_t vertexCount);
91 void*
beginMaterials(
const std::string& elementName,
size_t materialCount);
121 std::shared_ptr<FemRepresentation>
m_fem;
124 std::shared_ptr<SurgSim::Math::OdeState>
m_state;
149 #endif // SURGSIM_PHYSICS_FEMPLYREADERDELEGATE_H
Definition: DriveElementFromInputBehavior.cpp:27
double * m_vertexIterator
Internal iterator to save the "vertex" element.
Definition: FemPlyReaderDelegate.h:115
void processVertex(const std::string &elementName)
Callback function to process one vertex.
Definition: FemPlyReaderDelegate.cpp:155
double youngModulus
Definition: FemPlyReaderDelegate.h:131
std::shared_ptr< FemRepresentation > m_fem
The fem that will be created by loading.
Definition: FemPlyReaderDelegate.h:121
Internal data to receive the "material" data.
Definition: FemPlyReaderDelegate.h:127
FemPlyReaderDelegate(std::shared_ptr< FemRepresentation > fem)
Constructor.
Definition: FemPlyReaderDelegate.cpp:29
double massDensity
Definition: FemPlyReaderDelegate.h:129
Internal data to receive the fem element.
Definition: FemPlyReaderDelegate.h:136
void * beginMaterials(const std::string &elementName, size_t materialCount)
Callback function, begin the processing of materials.
Definition: FemPlyReaderDelegate.cpp:180
virtual std::string getElementName() const =0
Common part of implementation of PlyReaderDelegate for FemRepresentations.
Definition: FemPlyReaderDelegate.h:39
void endVertices(const std::string &elementName)
Callback function to finalize processing of vertices.
Definition: FemPlyReaderDelegate.cpp:161
unsigned int vertexCount
Definition: FemPlyReaderDelegate.h:141
int64_t overrun
Used to check for buffer overruns.
Definition: FemPlyReaderDelegate.h:142
struct SurgSim::Physics::FemPlyReaderDelegate::ElementData m_femData
struct SurgSim::Physics::FemPlyReaderDelegate::MaterialData m_materialData
Wrapper for the C .ply file parser This class wraps the main functionality for the original C ...
Definition: PlyReader.h:85
unsigned int m_boundaryConditionData
Internal data to receive the "boundary_condition" element.
Definition: FemPlyReaderDelegate.h:112
unsigned int * indices
Definition: FemPlyReaderDelegate.h:140
void * beginFemElements(const std::string &elementName, size_t elementCount)
Callback function, begin the processing of FemElements.
Definition: FemPlyReaderDelegate.cpp:166
void startParseFile()
Callback for beginning of PlyReader::parseFile.
Definition: FemPlyReaderDelegate.cpp:125
void * beginVertices(const std::string &elementName, size_t vertexCount)
Callback function, begin the processing of vertices.
Definition: FemPlyReaderDelegate.cpp:147
void * beginBoundaryConditions(const std::string &elementName, size_t boundaryConditionCount)
Callback function, begin the processing of boundary conditions.
Definition: FemPlyReaderDelegate.cpp:193
virtual void endParseFile()
Callback for end of PlyReader::parseFile.
Definition: FemPlyReaderDelegate.cpp:135
virtual void processFemElement(const std::string &elementName)=0
Callback function to process one FemElement.
void endFemElements(const std::string &elementName)
Callback function to finalize processing of FemElements.
Definition: FemPlyReaderDelegate.cpp:172
virtual bool registerDelegate(SurgSim::DataStructures::PlyReader *reader) override
Registers the delegate with the reader.
Definition: FemPlyReaderDelegate.cpp:41
void endMaterials(const std::string &elementName)
Callback function, end the processing of materials.
Definition: FemPlyReaderDelegate.cpp:186
ElementData()
Definition: FemPlyReaderDelegate.cpp:37
std::shared_ptr< SurgSim::Math::OdeState > m_state
The state that will be created by loading.
Definition: FemPlyReaderDelegate.h:124
void processBoundaryCondition(const std::string &elementName)
Callback function to process one boundary condition.
Definition: FemPlyReaderDelegate.cpp:199
std::array< double, 3 > m_vertexData
Internal data to receive the "vertex" element.
Definition: FemPlyReaderDelegate.h:118
int64_t overrun
Used to check for buffer overruns.
Definition: FemPlyReaderDelegate.h:132
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...
Definition: FemPlyReaderDelegate.cpp:104
bool m_hasBoundaryConditions
Flag indicating if the associated file has boundary conditions.
Definition: FemPlyReaderDelegate.h:109
double poissonRatio
Definition: FemPlyReaderDelegate.h:130
PlyReaderDelegate abstract class.
Definition: PlyReaderDelegate.h:31