Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::vtkGeometryCacheReader Class Reference

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

Detailed Description

Reads the Geometry Cache from the file to the Object.

Author
Srikanth Nagella
Date
January 2009
Version
1.0

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.

Constructor & Destructor Documentation

◆ vtkGeometryCacheReader()

Mantid::Geometry::vtkGeometryCacheReader::vtkGeometryCacheReader ( std::string  filename)

Constructor.

Definition at line 36 of file vtkGeometryCacheReader.cpp.

References Init().

◆ ~vtkGeometryCacheReader()

Mantid::Geometry::vtkGeometryCacheReader::~vtkGeometryCacheReader ( )

Destructor.

Definition at line 43 of file vtkGeometryCacheReader.cpp.

References m_doc, and m_pParser.

Member Function Documentation

◆ getElementByObjectName()

Poco::XML::Element * Mantid::Geometry::vtkGeometryCacheReader::getElementByObjectName ( const std::string &  name)
private

Get the Element by using the object name.

Definition at line 104 of file vtkGeometryCacheReader.cpp.

References m_doc.

Referenced by readCacheForObject().

◆ Init()

void Mantid::Geometry::vtkGeometryCacheReader::Init ( )
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().

◆ readCacheForObject()

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().

◆ readPoints()

void Mantid::Geometry::vtkGeometryCacheReader::readPoints ( Poco::XML::Element *  pEle,
int  noOfPoints,
std::vector< double > &  points 
)
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().

◆ readTriangles()

void Mantid::Geometry::vtkGeometryCacheReader::readTriangles ( Poco::XML::Element *  pEle,
int  noOfTriangles,
std::vector< uint32_t > &  faces 
)
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().

Member Data Documentation

◆ m_doc

Poco::XML::Document* Mantid::Geometry::vtkGeometryCacheReader::m_doc
private

The XML document.

Definition at line 35 of file vtkGeometryCacheReader.h.

Referenced by getElementByObjectName(), Init(), and ~vtkGeometryCacheReader().

◆ m_filename

std::string Mantid::Geometry::vtkGeometryCacheReader::m_filename
private

The file name.

Definition at line 37 of file vtkGeometryCacheReader.h.

Referenced by Init().

◆ m_pParser

Poco::XML::DOMParser* Mantid::Geometry::vtkGeometryCacheReader::m_pParser
private

The XML parser.

Definition at line 36 of file vtkGeometryCacheReader.h.

Referenced by Init(), and ~vtkGeometryCacheReader().


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