Raytrix Light Field SDK  4.0
Logo
Public Member Functions | Protected Member Functions | List of all members
Rx::FileIO::CUVTKEncode_Impl Class Reference

Detailed Description

Unstructured grid encoder for a series of xml vtk files. (implementation)

Inherits Rx::FileIO::IFileDataFramesEncode.

Public Member Functions

 CUVTKEncode_Impl ()
 Default constructor. More...
 
 ~CUVTKEncode_Impl ()
 Destructor. More...
 
virtual void AddData (size_t nDataId, double dData)
 Adds a double to the current frame. The double is the time step for the current frame. Supported data cases are: More...
 
virtual void AddData (size_t nDataId, const Interop::Runtime30::IMemoryAccess *pSrcMem)
 Not supported for this file type. Will throw an exception if called with any case. More...
 
virtual void AddData (size_t nDataId, const Interop::Runtime30::IMemory2DAccess *pSrcMem)
 Adds a CRxMatrix<double> as IMemory2D block to the current frame. The IMemory2D block contains either the point values or the vector values. Supported data cases are: More...
 
virtual void Close ()
 Closes this object. Writes the last frame file and afterwards the index file. More...
 
virtual void Destroy ()
 Destroys this object. More...
 
virtual void NextFrame ()
 When there is data to write, the last frame will be written and a new one will be opened. Otherwise just the new frame will be opened. More...
 
virtual void Open (const CRxString &sxFullPath)
 Opens this object and sets the output folder for all files to the given path. This function already opens the first frame. More...
 

Protected Member Functions

void AddPointsAndCellsToXmlNode (const Interop::Runtime30::IMemory2DAccess *pSrcMem, xmlNode *pxParentPieceNode)
 Adds point and cell data to a vtk-xml piece node. The cell data will be generated from the point data. More...
 
void AddVectorsToXmlNode (const Interop::Runtime30::IMemory2DAccess *pSrcMem, xmlNode *pxParentPieceNode)
 Adds vector data to a vtk-xml piece node. More...
 
void WriteXmlDocToFile (const CRxString &sxFilePath, xmlDoc *pxXmlDoc)
 Writes a XML document to file. More...
 

Constructor & Destructor Documentation

Rx::FileIO::CUVTKEncode_Impl::CUVTKEncode_Impl ( )

Default constructor.

Rx::FileIO::CUVTKEncode_Impl::~CUVTKEncode_Impl ( )

Destructor.

Member Function Documentation

virtual void Rx::FileIO::CUVTKEncode_Impl::AddData ( size_t  nDataId,
double  dData 
)
virtual

Adds a double to the current frame. The double is the time step for the current frame. Supported data cases are:

FileIO::EDataTypeVtk::TimestepData - current time step data

All other cases will throw an exception.

Parameters
nDataId[in] Identifier for the data.
dData[in] The time step.

Implements Rx::FileIO::IFileDataFramesEncode.

virtual void Rx::FileIO::CUVTKEncode_Impl::AddData ( size_t  nDataId,
const Interop::Runtime30::IMemoryAccess pSrcMem 
)
virtual

Not supported for this file type. Will throw an exception if called with any case.

Parameters
nDataId[in] Identifier for the data.
pSrcMem[in] Source memory.

Implements Rx::FileIO::IFileDataFramesEncode.

virtual void Rx::FileIO::CUVTKEncode_Impl::AddData ( size_t  nDataId,
const Interop::Runtime30::IMemory2DAccess pSrcMem 
)
virtual

Adds a CRxMatrix<double> as IMemory2D block to the current frame. The IMemory2D block contains either the point values or the vector values. Supported data cases are:

FileIO::EDataTypeVtk::PointData - 3d point data

FileIO::EDataTypeVtk::VectorData - 3d vector data

All other cases will throw an exception.

Parameters
nDataId[in] Identifier for the data.
pSrcMem[in] Source memory.

Implements Rx::FileIO::IFileDataFramesEncode.

void Rx::FileIO::CUVTKEncode_Impl::AddPointsAndCellsToXmlNode ( const Interop::Runtime30::IMemory2DAccess pSrcMem,
xmlNode *  pxParentPieceNode 
)
protected

Adds point and cell data to a vtk-xml piece node. The cell data will be generated from the point data.

Parameters
pSrcMem[in] Source memory containing the point data.
pxParentPieceNode[in,out] The parent XML node where the data should be attached to.
void Rx::FileIO::CUVTKEncode_Impl::AddVectorsToXmlNode ( const Interop::Runtime30::IMemory2DAccess pSrcMem,
xmlNode *  pxParentPieceNode 
)
protected

Adds vector data to a vtk-xml piece node.

Parameters
pSrcMem[in] Source memory containing the vector data.
pxParentPieceNode[in,out] The parent XML node where the data should be attached to.
virtual void Rx::FileIO::CUVTKEncode_Impl::Close ( )
virtual

Closes this object. Writes the last frame file and afterwards the index file.

Implements Rx::FileIO::IFileDataFramesEncode.

virtual void Rx::FileIO::CUVTKEncode_Impl::Destroy ( )
virtual

Destroys this object.

Implements Rx::FileIO::IFileDataFramesEncode.

virtual void Rx::FileIO::CUVTKEncode_Impl::NextFrame ( )
virtual

When there is data to write, the last frame will be written and a new one will be opened. Otherwise just the new frame will be opened.

Implements Rx::FileIO::IFileDataFramesEncode.

virtual void Rx::FileIO::CUVTKEncode_Impl::Open ( const CRxString sxFullPath)
virtual

Opens this object and sets the output folder for all files to the given path. This function already opens the first frame.

Parameters
sxFullPath[in] Full pathname where all files should be stored.

Implements Rx::FileIO::IFileDataFramesEncode.

void Rx::FileIO::CUVTKEncode_Impl::WriteXmlDocToFile ( const CRxString sxFilePath,
xmlDoc *  pxXmlDoc 
)
protected

Writes a XML document to file.

Parameters
sxFilePath[in] Full pathname of the file.
pxXmlDoc[in] The XML document which should be written.