MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
VtkWriter (std::string base_name, Interface *interface) | |
ErrorCode | visit (EntityHandle node, int depth, bool &descend) |
Visit a node in the tree during a traversal. | |
ErrorCode | leaf (EntityHandle) |
Process a leaf node during tree traversal. | |
Private Attributes | |
std::string | baseName |
Interface * | instance |
Definition at line 684 of file obb_test.cpp.
VtkWriter::VtkWriter | ( | std::string | base_name, |
Interface * | interface | ||
) | [inline] |
Definition at line 687 of file obb_test.cpp.
ErrorCode VtkWriter::leaf | ( | EntityHandle | node | ) | [inline, virtual] |
Process a leaf node during tree traversal.
Implements moab::OrientedBoxTreeTool::Op.
Definition at line 691 of file obb_test.cpp.
References MB_SUCCESS.
{ return MB_SUCCESS; }
ErrorCode VtkWriter::visit | ( | EntityHandle | node, |
int | depth, | ||
bool & | descend | ||
) | [virtual] |
Visit a node in the tree during a traversal.
This method is called for each node in the tree visited during a pre-order traversal.
node | The EntityHandle for the entity set for the tree node. |
depth | The current depth in the tree. |
descend | Output: if false, traversal will skip children of the current node, or if the current node is a leaf, the 'leaf' method will not be called. |
Implements moab::OrientedBoxTreeTool::Op.
Definition at line 701 of file obb_test.cpp.
References ErrorCode, and MB_SUCCESS.
{ descend = true; ErrorCode rval; int count; rval = instance->get_number_entities_by_handle( node, count ); if( MB_SUCCESS != rval || 0 == count ) return rval; int id = instance->id_from_handle( node ); char id_str[32]; sprintf( id_str, "%d", id ); std::string file_name( baseName ); file_name += "."; file_name += id_str; file_name += ".vtk"; return instance->write_mesh( file_name.c_str(), &node, 1 ); }
std::string VtkWriter::baseName [private] |
Definition at line 697 of file obb_test.cpp.
Interface* VtkWriter::instance [private] |
Definition at line 698 of file obb_test.cpp.