Mantid
|
Reads the Geometry Cache from the file to the Object. More...
#include <vtkGeometryCacheReader.h>
Public Member Functions | |
void | readCacheForObject (IObject *obj) |
Set the geometry for the object. More... | |
vtkGeometryCacheReader (std::string filename) | |
Constructor. More... | |
~vtkGeometryCacheReader () | |
Destructor. More... | |
Private Member Functions | |
Poco::XML::Element * | getElementByObjectName (const std::string &name) |
Get the Element by using the object name. More... | |
void | Init () |
Initialise Reading of the cached file. More... | |
void | readPoints (Poco::XML::Element *pEle, int noOfPoints, std::vector< double > &points) |
Read the points from the element. More... | |
void | readTriangles (Poco::XML::Element *pEle, int noOfTriangles, std::vector< uint32_t > &faces) |
Read triangle face indexs. More... | |
Private Attributes | |
Poco::XML::Document * | m_doc |
The XML document. More... | |
std::string | m_filename |
The file name. More... | |
Poco::XML::DOMParser * | m_pParser |
The XML parser. More... | |
Reads the Geometry Cache from the file to the Object.
This class reads the geometry (triangles) cached in the vtk format file and copies them to the object.
Definition at line 33 of file vtkGeometryCacheReader.h.
Mantid::Geometry::vtkGeometryCacheReader::vtkGeometryCacheReader | ( | std::string | filename | ) |
Mantid::Geometry::vtkGeometryCacheReader::~vtkGeometryCacheReader | ( | ) |
Destructor.
Definition at line 43 of file vtkGeometryCacheReader.cpp.
|
private |
Get the Element by using the object name.
Definition at line 104 of file vtkGeometryCacheReader.cpp.
References m_doc.
Referenced by readCacheForObject().
|
private |
Initialise Reading of the cached file.
Definition at line 51 of file vtkGeometryCacheReader.cpp.
References m_doc, m_filename, and m_pParser.
Referenced by vtkGeometryCacheReader().
void Mantid::Geometry::vtkGeometryCacheReader::readCacheForObject | ( | IObject * | obj | ) |
Set the geometry for the object.
Definition at line 64 of file vtkGeometryCacheReader.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::Geometry::g_log, getElementByObjectName(), obj, readPoints(), and readTriangles().
|
private |
Read the points from the element.
Definition at line 117 of file vtkGeometryCacheReader.cpp.
References Mantid::Kernel::Logger::error(), and Mantid::Geometry::g_log.
Referenced by readCacheForObject().
|
private |
Read triangle face indexs.
Definition at line 141 of file vtkGeometryCacheReader.cpp.
References Mantid::Kernel::Logger::error(), and Mantid::Geometry::g_log.
Referenced by readCacheForObject().
|
private |
The XML document.
Definition at line 35 of file vtkGeometryCacheReader.h.
Referenced by getElementByObjectName(), Init(), and ~vtkGeometryCacheReader().
|
private |
|
private |
The XML parser.
Definition at line 36 of file vtkGeometryCacheReader.h.
Referenced by Init(), and ~vtkGeometryCacheReader().